Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change php-cli Version (Wamp)

Tags:

php

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 ?

like image 542
G. Trennert Avatar asked Sep 17 '12 22:09

G. Trennert


People also ask

How to check PHP CLI version?

1. Type the following command, replacing [location] with the path to your PHP installation. 2. Typing php -v now shows the PHP version installed on your Windows system.


2 Answers

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.

like image 116
Nadeem0035 Avatar answered Oct 12 '22 22:10

Nadeem0035


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.

like image 20
Mike Mackintosh Avatar answered Oct 12 '22 22:10

Mike Mackintosh