Link to home
Start Free TrialLog in
Avatar of johnsy32
johnsy32

asked on

Problem with php4ts.dll and PHP CLI installation with IIS on Windows 2008 Server

Have installed PHP 5.2.1 using the microsoft web platform installer, using IIS on a windows 2008 r2 server.

While all is working well with the web server, I am unable to use the CLI, i.e. at the command prompt if I type php.exe -v for example, it throws the following error:

The program can't start because php4ts.dll is missing from your computer.  Try reinstalling the program to fix the problem.

I've tried downloading the php4ts.dll file and putting it in the PHP directory.  This is obviously having an effect, as the error changes, but it still throws an error:

The procedure entry point _zend_list_delete could not be located in the dynamic link library php4ts.dll.

Any advice gratefully received...

Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

php4ts.dll is the PHP4 version of the php5ts.dll library. I would check your php.ini and make sure it references php5ts.dll and make sure that the dll is present.

Avatar of johnsy32
johnsy32

ASKER

There is no mention of php4ts.dll or php5ts.dll in my php.ini file.

I have tried putting php5ts.dll into the PHP directory, but it still gives an error referring to php4ts.dll (which is also located in the PHP directory).

I have even tried removing the php4ts.dll file, and renaming the php5ts.dll to php4ts.dll so that that is the DLL file that gets loaded.  When I do this the error changes to:

"The procedure entry point _zval_copy_ctor could not be located in the dynamic link library php4ts.dll"

... but obviously it's still throwing an error.
ASKER CERTIFIED SOLUTION
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As an aside, have you tried copying php4ts.dll to c:\windows\system32 (or whatever it's called these days if you're on Win7 / Vista)?
As predicted, the error was being caused by an extension being called in the php.ini file.

In this case, the php4ts.dll file must have been being called by the mcrypt extension.  After commenting the mcrypt extenstion out of the php.ini file, everything now works correctly.

Many thanks...
I'm surprised that mcrypt is the problem. If you ever need to do encryption there is a series of  PEAR class that will do it for you.

http://pear.php.net/search.php?q=encrypt&in=packages&x=0&y=0