Entry Point Error when running PHP script from com

2019-04-28 18:25发布

问题:

I am trying to schedule a PHP script to run on Windows by writing a batch file. Here is the line that runs the script:

C:\Program Files (x86)\PHP>php.exe -f D:\Web\Sites\scriptPage.php

This runs the page and the results of the page process fine but it is poping up this message

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

I am not sure why this is happening. We are not using Zend at all on this. I have tried this on a few different pages and the same thing happens.

Any help on this would be great.

Thanks!

回答1:

I had this problem when I installed xdebug under Apache and PHP.

In your php.ini find a line that looks like this:

zend_extension_ts="c:/PHP/ext/php_xdebug-2.1.2-5.2-vc6.dll"

and comment it out.

If you do need to use xdebug make sure you have downloaded the right version of xdebug for your php installation. I had Apache 2.2.17 with PHP 5.2.17 and I was trying to install xdebug for PHP 5.3 which gave me extactly this error message:

*The procedure entry point zend_ini_string_ex could not be located in the dynamic link library php5.dll*



回答2:

I know it's been a while since this is solved but I run into problem with the same symptoms. I have Zend Server installed on a Windows server and was trying to configure scheduled task but it was not launching

the procedure entry point php_checkuid could not be located in the dynamic limk library php5.dll

Problem was that previously I had another PHP version (standalone, not with Zend Server) installed and in Windows Environment Variables PHPRC variable was pointing to that old version of PHP. I changed this variable so it pointed to Zend Srever's PHP and everything worked.



回答3:

I had a standalone version of PHP installed and then installed Zend Server. Like Juris mentioned, the PHPRC variable was pointing to the stand alone php5.dll. I changed the path and all is good.



回答4:

For future googlers: uncommenting the opcache enable and opcache_cli seemed to fix the problem for me.

That being said, I don't know what the error means