Cannot Load Php5ts Dll File

Active5 years, 8 months ago

I'm having some difficulty installing Apache 2.4.7 with PHP 5.5.7 on Windows Vista Service Pack 2.

When trying to start Apache, I'm getting the error:

  • Unable to load dynamic library 'C: php ext php_pgsql.dll' - The specified module could not be found. Another solution: copy libpq.dll/all files from zip (if you have php from installer).
  • Solution to the problem Cannot load php5apache2.dll php5ts.dll Code: From the directory where install php copy the file php5ts.dll to 'C: wi.
  • Apr 26, 2012  Solution to the problem Cannot load php5apache2.dll php5ts.dll Code: From the directory where install php copy the file php5ts.dll to 'C: wi.

The file can be opened if the extension is changed to something other than dll or exe, and other files in the same folder can be opened even if renamed to php5ts.dll (replacing the original). Windows permissions apache-http-server php.

Syntax error on line 176 of C:/Program Files/Apache/conf/httpd.conf: Cannot load C:/Program Files/PHP/php5apache2_4.dll into server: Access is denied.

I've looked at related topics, both on here and other sites, but the only issues I can find are where the error is 'The specified procedure could not be found' or 'The specified module could not be found', neither of which are relevant to my problem.

PHP5 Apache2 Handler load bad php5ts.dll - posted in PHP: Hi, I use UniformServer for use at home, at office, at different locations. At office, my workstation has php standart distribution installed (an old 5.3.3). If the php5ts.dll file is not in the DLL Cache, or the DLL Cache is corrupted, you will be prompted to insert the Windows installation disc to recover the original files. To run System File Checker ( Windows XP, Vista, 7, 8, and 10 ).

As you can see by the download links, I'm using Win32 versions of both Apache and PHP and the thread safe version of PHP. I've made sure that the C:/Program Files/PHP/php5apache2_4.dll file exists and reinstalled the Visual C++ Redistributable (http://www.microsoft.com/en-gb/download/details.aspx?id=30679; VSU_4vcredist_x86.exe). I've also tried moving both the Apache and the PHP folders outside of the Program Files but this didn't resolve the issue.

As the error I'm getting is 'Access is denied', I assume the issue is one of file permissions, but I'm not sure what permissions to change and what to change them to. So any assistance I can get will be much appreciated.

Edit

After some testing it seems that this problem only arises from PHP 5.5.4 onwards. Rolling back to 5.5.3 resolves the issue.

Edit 2

The issue seems to be that php5ts.dll cannot be read despite showing readable permissions. Even when programs are 'run as administrator', the file cannot be opened (but can be deleted and renamed). The file can be opened if the extension is changed to something other than dll or exe, and other files in the same folder can be opened even if renamed to php5ts.dll (replacing the original).

Community
MichaelRushtonMichaelRushton

2 Answers

Let’s analyse the facts:

  1. It works with an extension other than typical executable/code extensions like .dll, .exe, etc.
  2. It does not work with a different filename
  3. It worked just fine with a previous version; only the latest version is having trouble
  4. It works just fine in safe-mode
  5. Safe-mode disables all non-essential drivers and service
  6. It shows no locks or open-handles
  7. It says access denied
  8. It cannot be moved, opened, copied, etc.

Points 1-3 indicates that something about the contents of the file are triggering the problem. This sounds a lot like some sort of anti-virus program throwing a false-positive.

Points 4-6 point to some sort of service or driver that is causing the problem.

Security software, like anti-virus programs usually have to run at a low-level to avoid letting malware sneak in, so they use drivers and run under the System process. This prevents most programs from being able to detect that a file is locked by the security program (which is why Unlocker could not find any open handles), and even if they can, they only show that System has it open which isn’t very helpful.

Cannot load resource dll

You said that you had AVG installed at one point, but uninstalled it. Apparently AVG did not uninstall completely (missed a reboot?) and so its drivers was left behind.

So now, whenever you access a file, the driver locks it to scan, but because the rest of the program is gone, there is no way for it prompt you if it thinks the file is suspicious. If the program were still installed, it would show a prompt and ask you want to do (or more likely these days, automatically quarantine/delete the file to “protect” you). Since the program is gone, the driver component sits there waiting, while keeping the file locked.

Since you had uninstalled AVG a while ago, it probably doesn’t have the latest definitions (if any?), so it would not be able to leave the latest version of php5ts.dll alone, and threw a false-positive, thus locking the file with no way of telling it knock it off.

I don’t know if AVG ever complained about this specific version of php5ts.dll when it first came out, but it doesn’t now.

Also, I don’t know if AVG is known for having a lot of false-positives, though I’m sure I’ve read that about some AV vender; but a cursory check seems to indicate that searching for false positive has at least 33% more hits for AVG than other AV vendors.

This problem occurred because AVG did not uninstall completely and left remnants behind. Unfortunately this is an all–too-common problem. In the future, when uninstalling any software be it anti-virus programs, printer drivers/software, etc. always check if the vendor has provided some sort of removal/cleanup tool/utility (try different combinations of words to make sure you find it).

Most security software and printer vendors, as well as some other software firms and hardware manufacturers will have a (usually small) program that you can download and run to wipe out all traces of their software. Unfortunately, this is usually not built into the uninstaller and must be downloaded manually from their site. Sometimes it will be in the normal parts of their site, sometimes it will be buried somewhere in their support forums. (These are usually compiled from bug-reports from people who found left-over files, registry entries, services, etc. that are left behind by the uninstaller, which is why they are separate.)

In your case, you could have (and still should), use the AVG “remover”.

NB: when searching for a cleanup utility for security software, be careful not to mix it up with a virus-removal tool.

SynetechSynetech
58.4k30 gold badges191 silver badges324 bronze badges

Normally these kind of errors mean that you are missing a dependency that is used by php5apache2_4.dll, probably introduced in PHP 5.5.4.

Hp laserjet p3005 printer driver free download - HP LaserJet 1020 Printer Driver, HP LaserJet 5/5MP PCL Printer Driver, HP LaserJet 6L Printer Driver, and. Download the latest driver, firmware, and software for your HP LaserJet P3005dn Printer.This is HP's official website to download drivers free of cost for your HP Computing and Printing products for Windows and Mac operating system. Hp laserjet p3005 drivers download free download - HP LaserJet Postscript Drivers, HP LaserJet Standard PCL Drivers, HP LaserJet Enhanced PCL Drivers, and many more programs. Reviews News Video. HP LaserJet P3005 Printer Driver Free Download and Review - When it comes has a champion start to sack your confused toner, you have two options. HP offers a 6,500-page art batting for $129 and a 13,000-page center for $215. Hp p3005n driver.

To verify which one is missing, use the Dependency Walker,that displays the missing DLLs in red color.Missing DLLs that are marked as 'delayed load' are usually not a problem.

Ensure that you do not have a 32-bit/64-bit mismatch.As everything is in C:/Program Files, I suppose that all software is 64-bit.In this case use also the 64-bit version of Dependency Walker.

harrymcharrymc
284k16 gold badges302 silver badges615 bronze badges

Not the answer you're looking for? Browse other questions tagged windowspermissionsapache-http-serverphp or ask your own question.

Active3 years, 9 months ago

cannot load c:/PHP5/php5apache2_2.dll into server I am getting this error while running apache 2.2 on window XP machine

anyone have any idea what could be the problem. I can see there is no php5apache2_2.dll in c:/php5 folder.

user965884user965884Php
2,49514 gold badges60 silver badges92 bronze badges

13 Answers

First you must downlaod de .dll file (php5apache2_2.dll)then put it in your extensions directory.

Then edit your php.ini file, find de text:

;extension=php5apache2_2.dll

// and change y toextension=php5apache2_2.dll

if the text is not present put the line yourself.Then restart apache and it should load your extension.

PD: you can see where your extensions directory is located looking for the text 'extension_dir' in your php.ini, sometimes looks like:extension_dir = C:phpextensions

Hope this help you, if not please paste the error here, you can findan error log file in apache/error/error.log or something like that.

Dane411
4091 gold badge8 silver badges25 bronze badges

Cannot Load Php5ts Dll File

sandinosandino
3,3801 gold badge15 silver badges22 bronze badges

What worked for me was obtaining php5apache2_4.dll-php-5.4-win32.zip from apachelounge and using 'php5apache2_4.dll' file from the 'PHP 5.4.8' unzipped folder. I had apache 2.3.4 (32-bit) from apachelounge.com and php 5.4.9 (32-bit) from windows.php.net installed on my Win 7 (64-bit).

The dll worked despite 5.4.8 - 5.4.9 mismatch.

The corrsponding changes within 'php.ini' and 'httpd.conf' are to be maintained acoording to this helpful guide.

Best regards.

NactNact

You should download the dll file from PHP distribution package. And see three ways to set up PHP to work with Apache 2.x.

Php5ts.dll

You can configure PHP as Apache handler in <[apache_home]>confhttpd.conf as follow:

NOTE: To avoid the error while starting apache, the php ini dir path should be in single quotes with backslash. Don't forget to end it with backslash.

Mihai Iorga
34.1k13 gold badges86 silver badges95 bronze badges
Nirolivier RazafindrabekotoNirolivier Razafindrabekoto

Here is how I got it to GO:

  1. Created the folder C:Apache
  2. Downloaded and installed http-2.2.22-win32-x86-no-ssl.msiDuring install, entered localhost as Network Domain and Server Name
  3. From browser, typed in url http://localhost/ and page came up with 'It Works'(I do not know if there is a God, but took that as a good sign:)

  4. Created the folder C:PHP

  5. Downloaded and installed php-5.2.17-Win32-VC6-86.msi
  6. Created a new file in notepad with the following:
  7. Saved it in the Apache/htdocs folder as phpinfo.php
  8. From browser, typed in url http://127.0.0.1/phpinfo.php
    It did not work (i.e. it did not run the .php program file)

  9. Hmm, oh yeah, you have to restart Apache for it to see updates to itsown configuration file
    Start, Apache, Control.
    -> generated the error that it could not find C:Apachephp5apache2_2.dll

  10. Well, I found it in C:PHP and I copied it to C:Apache
    Start, Apache, Control.
    -> generated an error about a problem with the PHPINIDir directive on line 495 of C:/Apache/conf/httpd.conf

  11. Fixed that by editing this line in the above file to

  12. Tried to restart Apache again, run the test file in the browser. Still, it did not work:(

    Product Name: ProDesk 600 G2 SFF Operating System: Microsoft Windows 7 (32-bit) I am trying to install all the drivers for my HP ProDesk 600 G2, but after trying everything on the support site I cannot seem to get the correct drivers for the PCI Serial Port & the PCI Simple Communications Controller. Pci serial port driver hp pro desk 600 g2 sff. Specifications page for HP ProDesk 600 G2 Small Form Factor Business PC. IBM WebSphere Portal. HP ProDesk 600 G2 Small Form Factor Business PC Specifications. Product image. Graphics card. Hard disk and solid state storage. Optical drives. UL, CSA, and CE Mark Serial Port Profile (SPP) Service Discovery Application Profile (SDAP. HP ProDesk 600 G1 SFF Drivers Download. This page contains the list of device drivers for HP ProDesk 600 G1 SFF. To download the proper driver, first choose your operating system, then find your device name and click the download button. Intel(R) 8 Series/C220 Series PCI Express Root Port #1 - 8C10 Intel(R) 8 Series/C220 Series USB EHCI #1. Download the latest driver, firmware, and software for your HP ProDesk 600 G2 Small Form Factor PC.This is HP's official website to download drivers free of cost for your HP Computing and Printing products for Windows and Mac operating system.

  13. Recalled seeing this before and decided to reboot computerRestarted (or started) the Apache Server

  14. Ran the test file again.IT WORKED!

Note that in some of the above I may have mixed up some forward and back slashesGood luck!

superjos
8,8403 gold badges69 silver badges113 bronze badges
RobRob

Please check that for using Apache you should download VC6 version of PHP. If you use VC9 Apache will not start. It is clearly given in the site.

Peter O.
22.1k9 gold badges60 silver badges71 bronze badges
adhadh

You are getting an error due to the fact that the c:/PHP5/php5apache2_2.dll is not shipped with the non-thread safe version of PHP that you probably downloaded. Two options:

  • Download and install the thread safe version of PHP instead and youwill get everything you need.

  • If the non-thread safe version is important to what you want to accomplish, download the zip bundle of the thread safe version and take only the .dll you need from there.

Which version: For Apache Server 2.2, you need to download PHP 5.4 thread safe, which is shipped with both php5apache2_2.dll and php5apache2_4.dll. Some earlier versions probably work as well. PHP 5.5 is only shipped with php5apache2_4.dll which will mismatch with your version.

Cf the download links here on the official site: http://windows.php.net/download/.

DarkaneDarkane

For me the problem was resolved by replacing the file php5apache2_2.dll from another site, somehow the file downloaded from the php.net site was corrupt.

I had already the file php5apache2_2.dll on my wamp 2.2 and the PHP version 5.3.13 so I just copied that file into my version 5.4.35 and it worked.

I did not have to mess with the apache configuration as other people suggest.

One more thing I did was to install the Visual C++ Redistributable for Visual Studio 2008 for my x64 machine running Windows 7 Ultimate Edition. I don't think this helped since I had already the x86 version and working with my previous PHP version, but is part of the action I taken.

ReedysethReedyseth

None of the suggestions above worked for me. I tried replacing the php5apache2_2.dll file and restarting everything, but got the same error. I ended up uninstalling Apache, MySQL, and PHP, removing the path variables, and then installing WampServer. Had everything up and running in less than 5 minutes.

By the way, I uninstalled PHP by just deleting the folder in Program Files, since it did not turn up in Add/Remove Programs. I also deleted any leftover Apache and MySQL folders after the uninstalls.

pleiovnpleiovn

Even file exist and apache shows error that this file don't exists, install Microsoft C++ Redistributable Package. Note, that you have to install 2008 version, then 2010. Install both packages, not only 2010 version.

acrossacross

I've had a similar problem. I found out after following a particular Youtube tutorial that if you go and edit the httpd.conf file while Apache is running.. it will mess up.Make sure that you install Apache first.. then turn it off, then install php afterward. It should then edit the httpd.conf file itself. This Youtube tutorial solved my problem. http://www.youtube.com/watch?v=UKbEzmMliNMHope it helps. I got MySQL installed and working too.. but had to install the .Net 4 Framework.

Ross T.Ross T.

You need to install 'http-2.2.22-win32-x86-no-ssl.msi' instead.

Qantas 94 Heavy
12.6k15 gold badges57 silver badges75 bronze badges
GoldieGoldie

I had the same error.I had installed x64 version of Apache and x86 version of php.After a lof of searching I found that this doesn't work.

So I had to install x64 (threadsafe) version of PHP.After this Apache works fine . :)Hope this helps!

kanikani

If your php5apache2_4.dll is missing:

My problem was the php5apache2_4.dll was not included in PHP install zip. It is included only the Thread Safe version of PHP 5.4.38

Laszlo LugosiLaszlo Lugosi
3,0511 gold badge14 silver badges16 bronze badges

Not the answer you're looking for? Browse other questions tagged phpapache or ask your own question.