Hi there:
today I followed the instructions on http://imthi.com/blog/linux/install-or- ... centos.php ,
Joe's method to upgrade php to 5.2.6 on CentOS 5 (the default one is 5.1.6), the detail steps are as follows:
# wget http://uk2.php.net/get/php-5.2.6.tar.gz ... net/mirror
# tar zxvf php-5.2.6.tar.gz
# cd php-5.2.6
# ./configure –enable-soap
# make
# su -c “make install”
the migration seems fine at the first sight: after I restarted the Apache server, the web works as usual and now I could use those functions in the new extension such as JSON extension etc. However, when I tried to start the php daemon scripts in the terminal window. It seems like it can't locate all the extensions. I'm pretty sure that my php.ini is configured right. in /etc/php.ini: extension_dir = "/usr/lib/php/modules", and the the directory /usr/lib/php/modules/ has all the extensions I called such as mssql.so, mysql.so etc..
Anyone has met this problem before? I attached the first several lines of my phpinfo() as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
phpinfo()
PHP Version => 5.2.6
System => Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 ED
T 2007 i686
Build Date => Nov 25 2008 16:02:03
Configure Command => './configure'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => (none)
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => no
Thread Safety => disabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, data, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg
Registered Stream Filters => string.rot13, string.toupper, string.tolower, strin
g.strip_tags, convert.*, consumed, convert.iconv.*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the only thing which might be abnormal I noticed is "Configuration File (php.ini) Path => /usr/local/lib ", I think the php.ini is in /etc/php.ini, not in /usr/local/lib, I don't know why it shows like that? is it the cause of the problem?
Thank you so much for your help!
weird problems after upgrading to php 5.2.6 on CentOS 5
Moderator: General Moderators
-
WilliamLou
- Forum Newbie
- Posts: 12
- Joined: Fri Mar 14, 2008 1:32 pm
Re: weird problems after upgrading to php 5.2.6 on CentOS 5
Why don't you try making a symlink to your php.ini in the place it is expecting it to be using ln
http://www.computerhope.com/unix/uln.htm
http://www.computerhope.com/unix/uln.htm
-
WilliamLou
- Forum Newbie
- Posts: 12
- Joined: Fri Mar 14, 2008 1:32 pm
Re: weird problems after upgrading to php 5.2.6 on CentOS 5
OK, I found the problem. Because I can't just use all the default for the configure, CentOS 5 used lots of its own configure for php. For example: --prefix=/usr, but the default value is --prefix=/usr/local. Is there someway to use the exact same configure as centOS5?