2
votes

When I run php from the command line (on Windows), I receive the following message

Failed loading C:\Users\Nickey K\Documents\AMD APP\bin\x86_64;C:\Users\Nickey K\ Documents\AMD APP\bin\x86;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program F iles (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Window s Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Prog ram Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C :\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program F iles (x86)\Calibre2\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core- Static;C:\Program Files (x86)\EasyPHP-12.0\php\php544x120715104042;\php\php544x1 20715104042\php_xdebug-2.2.0-5.4-vc9.dll

x_debug seems to be installed properly based on phpinfo, and I have the following line in php.ini

zend_extension = "C:\Program Files (x86)\EasyPHP-12.0\php\php544x120715104042\php_xdebug-2.2.0-5.4-vc9.dll"

I've put the dll file in both the above the the ...\ext directory and tried a few variants of the above line, but I'm unable to get rid of this error message.

Any ideas?

2
Ah yes, EasyPHP. One of the more ironically named distributions... That looks like the entire contents of the %PATH% environment variable, have you used in by name anywhere in the config file? - DaveRandom
yea. that is the PATH environment variable. Not sure if it's meant to dump the whole thing by default. But I haven't really changed. Easyphp uses ${path} for it's installation path, but I've had to replace them with absolute paths to get rid of all the missing extension errors. The xdebug was the only error msg remaining - user1530385
If you compare the results of phpinfo() in a browser and php -i at the command line, do they use the same ini file? - DaveRandom
Different files, but it seems to have the same configuration. I think PHP copies it across when the server is restarted. Both files have the same zend_extension line in my opening post. - user1530385
gave up on easyphp and just used uniform server instead. Haven't made any changes to configuration, but at least executing php from command line doesn't throw up errors so far. - user1530385

2 Answers

2
votes

The regular command line PHP from EasyPHP did not work as is. The problem is EasyPHP replaces the PATH variable with its own. That is just dumb that it doesn't use a different variable.

But, the following worked for me after some experimentations. I created a batch file php5.bat and placed it in C:\Windows\Sytem32 for easier access, with the following code (where C:\Program Files (x86)\EasyPHP-12.1\php\php548x121030011600 is the location my easyPHP php.exe was).

@echo off
REM Set the path for easy PHP and then start PHP.
set OLD_PATH=%PATH%
set PATH=C:\Program Files (x86)\EasyPHP-12.1
set PHP_DIR=C:\Program Files (x86)\EasyPHP-12.1\php\php548x121030011600
call "%PHP_DIR%\php.exe" -c "%PHP_DIR%\php.ini" %*
set PATH=%OLD_PATH%
@echo on

And then calling the batch file php5 -v will give you the php version. You might need to copy some DLLs from the Apache folder into the PHP folder as it will complain the DLLs are not found.

1
votes

lets try to use zend_extension_tc instead of zend_extension if you're using window.