简体   繁体   中英

How to change php-cli Version (Wamp)

I have since a long time a wamp installation with php 5.3.5 Now I'm working with Symfony2.1, and need intl extension So I downloaded & installed php 5.4.6 and things worked fine in a first time

But now I'm on a new project where I need to install via the php console (php-cli) some required bundles. One of this bundles is sonata-project/intl-bundle when asking for update by "php composer.phar update" I get error messages that seems to say that the intl extension is not installed

After some Googleing I understand that my php-cli version is still 5.3.5 So I tried to change my windows XP environmental variable PATH and replaced the 5.3.5 path by the 5.4.6 path But now I get the following error on the dos console :

Failed loading c:/wamp/bin/php/php5.3.5/zend_ext/php_xdebug-2.1.0-5.3-vc6.dll
PHP 5.4.6 (cli) (built: Aug 15 2012 21:16:03)</br>
Copyright (c) 1997-2012 The PHP Group</br>
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies</br>

is there anyone who can help me fix this ?

You need to add your PHP installation directory to the %PATH% environment variable. It is usually something like C:\\wamp64\\bin\\php\\php7.0.4 or work from the PHP installation directory.

The above looks to be a conflict with your php.ini. Are both 5.4.6 and 5.3.5 both using the same php.ini file?

If this is the case, 5.4.6 does not have the xdebug extension installed, or, more likely it 5.4.6 is using a newer API version leading to an incompatibility issue. Remove the xdebug clause form your php.ini file and rerun.

In windows 10, You must update the PHP path in the environment variable section for the system not only the user. It would work well after that...

Good luck.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM