Re: [PHP] php path and relink
Am 11.05.2010 02:23, schrieb Augusto Flavio: > Hi, > > > I have a shell account with limited access. The php cli version installated > is 4.4.6. But the server have also the php 5.2.6. I checked the php version > and i got this: > > > $ php -v > PHP 4.4.9 (cli) (built: Sep 17 2008 11:04:03) > . > > But i want that the php command be a link to the php5. > > How can i "re-link" this php command to the path /usr/local/php5/bin/php ? > > I tried include this path in the PATH variable env but didn't worked. > > > Some idea? > > > Thanks > > Augusto Morais. > > If it's only for your shell: Edit .bashrc and paste this: alias php="/usr/local/php5/bin/php" Save and re-login. -- Piero -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php path and relink
I did it: .bash_profile PATH=/usr/local/php5/bin:$PATH export PATH worked well Thanks
RE: [PHP] php path and relink
then try different paths to locate the version you want: /usr/bin/php /usr/local/bin/php /usr/sbin/php etc etc I don't have root permission to unistall the old version or remove the link or create a link in /usr/loca/bin/php I'm just call the php -v command and get the version 4. Thanks Augusto Morais _ Diseñar aplicaciones tiene premio. ¡Si eres desarrollador no esperes más! http://www.imaginemobile.es
RE: [PHP] php path and relink
do strace php -v and see what's the path for the old version. It'd be better if you uninstall the old version, but it you don't know how was it installed, simply remove the old php binary or overwrite it with newer. I. Lopez. Hi, I have a shell account with limited access. The php cli version installated is 4.4.6. But the server have also the php 5.2.6. I checked the php version and i got this: $ php -v PHP 4.4.9 (cli) (built: Sep 17 2008 11:04:03) . But i want that the php command be a link to the php5. How can i "re-link" this php command to the path /usr/local/php5/bin/php ? I tried include this path in the PATH variable env but didn't worked. Some idea? Thanks Augusto Morais. _ Diseñar aplicaciones tiene premio. ¡Si eres desarrollador no esperes más! http://www.imaginemobile.es
Re: [PHP] php path and relink
On Mon, 2010-05-10 at 21:23 -0300, Augusto Flavio wrote: > Hi, > > > I have a shell account with limited access. The php cli version installated > is 4.4.6. But the server have also the php 5.2.6. I checked the php version > and i got this: > > > $ php -v > PHP 4.4.9 (cli) (built: Sep 17 2008 11:04:03) > . > > But i want that the php command be a link to the php5. > > How can i "re-link" this php command to the path /usr/local/php5/bin/php ? > > I tried include this path in the PATH variable env but didn't worked. > > > Some idea? > > > Thanks > > Augusto Morais. How are you calling the script to be executed by PHP? Can't you add the path to the version of PHP you want to use there? Thanks, Ash http://www.ashleysheridan.co.uk