27 February 2012

PHP 5 attempts to load php4ts.dll

You might get an error similar to the below, especially if you attempt to run PHP from command line (i.e. php -m or php -v):

---------------------------------------------------
This application has failed to start because php4ts.dll
was not found. Re-installing the application may fix the problem
---------------------------------------------------

If you look at the PHP error logs (If these are not enabled via php.ini, make sure these are enabled of course!) you are also likely to find errors such as "Unable to load dynamic library" for specific DLL's (or PHP extensions).

Use common sense to identify if the DLL that is causing the error is present in the "ext" folder and confirm that PHP attempts load the extensions from the correct "ext" location using a phpinfo file.

If you have confirmed all that and you still see that PHP 5 is asking for "php4ts.dll" when loading, it means that at least one of those DLL's found in the "ext" folder is compiled for PHP 4 not PHP 5. Replacing it with the correct DLL should resolve your issue.

No comments: