1751972 Members
4832 Online
108783 Solutions
New Discussion юеВ

Re: php help

 
Ragni Singh
Super Advisor

php help

Not sure how to proceed but here it is..

I have redhat default php installed in /usr/bin...

[root@dtccdr bin]# which php
/usr/bin/php
[root@dtccdr bin]# /usr/bin/php -v
PHP 4.3.9 (cgi) (built: May 4 2007 11:04:51)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[root@dtccdr bin]#

I have another version installed in /usr/local/bin/php..

[root@dtccdr bin]# /usr/local/bin/php -v
PHP 5.2.2 (cgi) (built: May 27 2007 15:52:45)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
[root@dtccdr bin]#

Now we would like to use the 5.2.2 and I need to know where to specify the path stement so it will always look at this one versus the one in /usr/local.

The customer doesn't want us removing the older version.

Thakns and points will be assigned.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: php help

Hi:

Specify '/usr/local/bin' ahead of '/usr/bin' in your PATH variable to get the 5.2.2 version by default, first.

Regards!

...JRF...
Ivan Ferreira
Honored Contributor

Re: php help

You have to modify your PATH environment variable to list first the /usr/local/bin/ directory, for example:

export PATH=/usr/local/bin/:$PATH

Then you have to ensure that the apache configuration to use the right php_module, normally the file is /etc/httpd/conf.d/php.conf.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ragni Singh
Super Advisor

Re: php help

Ivan was almost somewhat correct.

Here are my findings..

I looked at the version of php that was installed and although it is the correct version, it does not have any modules installed for apache and thus apache cannot use this version.