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!
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*
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.
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.
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
Related
Okay.
I'm trying to use MongoDB with Node.js and PHP/XAMPP on Windows 7, but I can't seem to install the PHP MongoClient Class at all.
I am a complete beginner with MongoDB and I have to say that if I wasn't committed to solving this I'd have given up by now.
After lots of fiddling around trying to install the correct device driver version etc., I have come across yet another problem. But first, let me explain the steps I have taken so far.
Installed XAMPP v3.2.1, keeping all defaults.
Looked at phpinfo() on localhost:
PHP Version: 5.5.15. PHP Architecture: x86. Thread-Safe: Enabled.
Figured out where to download the software, as well as the correct version, etc.
Went to pecl.php.net/package/mongo/1.5.5/windows/.
At "DLL List" (PHP 5.5), I selected: `5.5 Thread Safe (TS) x86.
Went to PHP.ini (not the development or production version, but the actual one), and added 1 line: extension=php_mongo.dll. (line 887). No semicolon in front.
Started Apache.
Error: PHP Startup: C:\xampp\php\ext\php_mongo.dll could not be found on your computer.
I found out that when you manually type the file extension of a program that is already saved as a specific type, my computer simply prepends it to the existing one. The program was saved with the extension dll.dll. I got rid of that.
Restarted Apache.
Then I got this... Error: PHP Startup: Libsasl.dll is not found on your computer. Unable to load dynamic library C:\xampp\php\ext\php_mongo.dll. Try reinstalling the program.
I reinstalled the program. As I suspected, no missing file was magically created.
I then looked online to try to find this 'dll' file. After some searching, I was able to install Libsasl.dll via dll-files.com.
I restarted Apache.
Next problem:
Error: PHP Startup: Unable to load dynamic library C:\xampp\php\ext\php_mongo.dll - Access is denied.
I tried running XAMPP as an administrator. Same result.
The program is definitely there, but I can't seem to access it for whatever reason.
Why? I am getting quite frustrated with this and I would love everything to start working properly.
I have a hunch that it has something to do with read/write privileges but I don't know where to look.
Some help would be appreciated.
I was facing same issue, then after adding the path of the ".dll" file's folder to the environment variable as a system variable path, it worked. It is then able to find the file. At the end that was the only step which was stopping xampp to load the ".dll" file, although it was present in that folder. Often people miss this step as it is no where pointed out clearly.
I installed a plugin for NB 7.0.1 which enabled CodeIgniter but when I went to create a project using it, I was told I need to specify a PHP interpreter for Netbeans. I tried to do this using the php.exe you get with Xampp but I get a Java null pointer error. I can't seem to fix this but I'm thinking, why do I need an interpreter on Windows when the Linux machine can do that? I have already set this up on the VM.
Any advice from here? Thanks a lot!
I am using NB 7.1.1 and had similar issue with CodeIgniter plugin when creating a new project. NetBeans would complain No PHP Interpreter was defined in Tools->Options->PHP General. It would not enable finish button so a New Project could not be setup.
I just created a dummy batch file called nb_cli.bat and pointed NB to that for the PHP interpreter. I don't plan on executing (or debugging) CodeIgniter CLI code on local machine so that file will likely never get executed.
If you want to debug or run php locally, make sure xammp works OK outside of NetBeans. But if not, this fix should get you by the NetBeans issues.
I have a separate linux server on my local network for development as I don't need apache/php locally when I use multiple machines for dev/testing/etc.
NetBeans should bugfix that by downing that PHP Interpreter message from an Alert preventing project setup to a warning that No PHP interpreter is defined (or found) so CLI testing may not function.
As an alternative, if you have a linux box with NB installed, you can create the New project there and copy the whole folder (including the nbproject folder) to your PC and you should be able to get by having No PHP Interpreter defined.
Hopefully that gets you going with NB and CodeIgniter. If you need additional details, just ask.
I am looking to see what it takes to have multiple installs of php in osx 10.5.
I found this page that goes on to explain it for windows.
I was looking for confirmation from someone that knows better than me, if the steps are very similar for 10.5.
I am a novice user. Having only scripted with php, not actually building or installing it.
My web host runs a php older than I have installed. And I'd like to at least test locally on a version the same as my remote option.
Any help is appreciated. Thanks.
Is one of the servers running PHP 5 and the other PHP 4?
If so you can run PHP 5 in PHP 4 mode by enabling the following in your php.ini file:
zend.ze1_compatibility_mode = 1
If you can't edit the php.ini file then you can't change the local version for the script running by adding the following to your PHP script:
#ini_set('zend.ze1_compatibility_mode', 1);
You should find a tutorial for Linux or BSD, which would be a lot more helpful then a Windows-based one.
Some time ago I managed to do it on WIndows and wrote a quick how-to. While I don't believe it could be much relevant to OS X (except maybe for the part showing how to switch engine in .htaccess) I can give you some hint about the basic points:
Install as CGI, not as an Apache module;
ignore any instruction to put your php.ini in a common location or set up environment variables pointing to a single php.ini: what you definitely need is a separate php.ini for each PHP version, so you have to put them in the respective PHP folder to be found;
when testing check with phpinfo() which php.ini is actually being loaded.
Just for sake of completeness I'd add that at the time of writing (2007) both PHP4 and PHP5 were happy to run with each other's php.ini - until I started loading extensions: those are compiled for their PHP version only and go into a spin if used with the wrong PHP.
Hope I've been helpful.
I recently installed Windows 7 on my desktop and the following problem has begun occuring:
I regularly run some PHP scripts from the commandline that are now giving this error in a popup window:
CLI has stopped working.
I cancel this and my script terminates. Not good...
I've googled around and tried most of the few ideas suggested but still i am plagued by this annoyance. Right now it appears to regularly occur when I do a file_get_contents() of a url pointing to an image file. Only happens when the url is http protocol, works fine for ftp files. It also happens spuriously doing other things as well.
This is PHP 5.3.0 as distributed in a xampp 1.7.2 .zip. All exe's and dll's have been unblocked by copying thru FAT32 and back.
hints from anyone who's cracked this would be most helpful.
Try updating your PHP version bundled with xampp. You might have to update some php_XXX.dll extension files.
More info: http://web2.0entrepreneur.com/31/cli-has-stopped-working-on-windows-vista.html
PHP-CLI stops under these circumstances: Windows 7 64bit, PHP 5.6.8 64bit, only when Zend OpCache extension is ENABLED!!!
Just edit php.ini and comment zend_extension=php_opcache.dll (with ; in front of it)
I found that this happened to me when I had the APC extension enabled. I switched to using the Wincache for PHP extension instead.
If you receive this error after installing WAMP, most likely you have another installation of PHP on your machine. This may have been installed using the Microsoft Web Platform Installer or by other means. The first thing you should do is un-install PHP.
If this doesn't work, check to make sure that IIS and Apache are not trying to use the same port. WAMP starts out with Port 80 as standard and IIS usually will be the same. The easiest way to fix this is to turn off IIS while running WAMP, but you can set either of them servers to port 81 or another port.
If this doesn't work, my last suggest is to look for multiple copies of php.ini on your machine. You may find them in places like the Windows directory. Make a backup of the file just in case, and then remove them from all of the folders except the WAMP folder.
it happened to me in laravel 5.I searched every where but no solution that fix my problem then i debug my web application at different points and found that if you comment your php code in laravel comments in blade template like
{{--print_r($date_a);--}}
Now comment like this
//print_r($date_a);
works
The solution for me was to stop using PHP 5.3.0 and go back to 5.2.11. Once I did this the "CLI has stopped working" issue disappeared.
I have the same issue with Windows 7 Professional.
My Apache Server has no problem finding and executing PHP within my web application but the command line execution gives the infamous message "CLI has stopped working."
The User Account Settings seem to allow executions.
Perl has no problem.
I always have to take my code to an XP machine and run it there to debug it.
You didn't specify that you were using xdebug, but just in case you were, I may be able to help. I had this error for a long time. It turned out I was on a slightly older version of Xdebug (php_xdebug-2.2.0-5.4-vc9.dll).
I replaced that file with "php_xdebug-2.2.2-5.4-vc9.dll" and it magically started working immediately.
I'm on wamp, and I updated both php.ini files (one is for cli, one for normal use) with the latest filename.
"zend_extension = c:\wamp\bin\php\php5.4.3\ext\php_xdebug-2.2.2-5.4-vc9.dll"
Then dropped the new file into the php ext folder and instant success.
I had the same issue on Windows 7 (Home premium). I had a hunch that it is caused by one of the extensions I installed so I started commenting them out one-by-one.
Turned out it was caused by a non-compatible mongodb extension I was using
Edit php.ini and comment zend_extension=opcache.enable_cli=1 (with ; in front of it)
Try to use another php version instead.
It works perfectly for me.
Try to run scripts with php-cgi.exe instead of php.exe. For me it works.
I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP script from my localhost test directory that I created, I get a slew of missing DLL errors. I have seen posts out there which indicate that its possible and has been done. I dont see any bug reports for this MSI at PHP.NET support. Any ideas?
Not sure if you already have this but I use WAMP from http://www.wampserver.com/en
It's easy and simple to set up, it has an icon in the system tray to show that its active and you can make it go online or available to the outside by clicking the icon and setting it. I used this when I was first learning PHP since it has everything in one, no need to setup any other service like IIS.
Probably the installer didn't configure your server to use PHP properly. Check out Microsoft's page on enabling PHP on IIS or alternatively switch to Apache if that's a viable option.
I'll see if I can remember it correctly:
Unzip PHP zip file into c:\Program Files\php (or run the installer)
Copy php5ts.dll into c:\windows\system32
Copy php.ini.dist into c:\windows and rename it to php.ini
Edit c:\windows\php.ini and look for extension dir - make it point to c:\Program Files\php\extensions (or wherever you put it)
This is where my memory gets fuzzy: Edit your IIS application settings, add a script map for .php files, and set the executable to php5ts.dll
Profit!?!??!?!