PHP rpm problem


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers PHP rpm problem
# 1  
Old 06-06-2005
PHP rpm problem

I did not know where to ask this problem so posting it here

The version of php used is 4.3.2.

1. If I say rpm -qa | grep php, I get mod_php4-4.2.2 and mod_php4-core-4.2.2

If I do php -v, I get 4.3.2. How could that be possible? I am sure the version which is being used is 4.3.2.

2. The second question is how different are the 2 versions? Could it pose many problems if I choose to revert to php 4.2.2?

Thanks
# 2  
Old 06-06-2005
Hi !
1. Try to see what phpinfo() is returning. That's the right version of php Smilie
2. The diference is not so big... and if you don't know the diference betwen those two versions, probably you don't use that "different things". Anyway, on http://www.php.net/ you can get more informations Smilie
# 3  
Old 06-06-2005
Quote:
Originally Posted by superprogrammer
1. If I say rpm -qa | grep php, I get mod_php4-4.2.2 and mod_php4-core-4.2.2

If I do php -v, I get 4.3.2. How could that be possible? I am sure the version which is being used is 4.3.2.
It can be that you have more than one PHP installations on your system. For instance, my ancient Mandrake system at work comes with mod_php4.xx with its Apache advx server but I also installed PHP 5 for work testing requirements. The Apache module loaded by the Web server is 4.x but on the command line the 5.0.x version is loaded (because it is in /usr/local which comes before /usr/bin). It's really confusing, so I plan to remove the 4.x with "rpm -e" sooner or later.

Try this. Do a "which php" and check whether the returned path agrees with the list of files returned by "rpm -ql mod_php4". Mine doesn't:

Code:
[testcn@bernardchan testcn]$ which php
/usr/local/bin/php
[testcn@bernardchan testcn]$ rpm -qa | grep php
apache2-mod_php-2.0.47_4.3.2-2mdk
libphp_common432-4.3.3-2mdk
php-ini-4.3.3-1mdk
[testcn@bernardchan testcn]$ rpm -ql libphp_common432
/usr/lib/libphp_common.so.432
/usr/share/doc/libphp_common432-4.3.3
/usr/share/doc/libphp_common432-4.3.3/CREDITS
/usr/share/doc/libphp_common432-4.3.3/INSTALL
/usr/share/doc/libphp_common432-4.3.3/LICENSE
/usr/share/doc/libphp_common432-4.3.3/NEWS
/usr/share/doc/libphp_common432-4.3.3/ZEND_LICENSE
/usr/share/doc/libphp_common432-4.3.3/php.ini-dist
/usr/share/doc/libphp_common432-4.3.3/php.ini-recommended
[testcn@bernardchan testcn]$ rpm -ql apache2-mod_php
/etc/httpd/conf.d/70_mod_php.conf
/usr/lib/apache2-extramodules/mod_php4.so
/usr/share/doc/apache2-mod_php-2.0.47_4.3.2
/usr/share/doc/apache2-mod_php-2.0.47_4.3.2/PHP_FAQ.php
/var/www/html/addon-modules/apache2-mod_php-2.0.47_4.3.2
[testcn@bernardchan testcn]$ ldd /usr/lib/apache2-extramodules/mod_php4.so
        libapr-0.so.0 => /usr/local/lib/libapr-0.so.0 (0x40009000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40039000)
        librt.so.1 => /lib/i686/librt.so.1 (0x40089000)
        libm.so.6 => /lib/i686/libm.so.6 (0x4009c000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x400bf000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x400ec000)
        libdl.so.2 => /lib/libdl.so.2 (0x40100000)
        libaprutil-0.so.0 => /usr/local/lib/libaprutil-0.so.0 (0x40103000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40118000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x40120000)
        libphp_common.so.432 => /usr/lib/libphp_common.so.432 (0x40141000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40276000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40345000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        libintl.so.2 => /lib/libintl.so.2 (0x40475000)
        libz.so.1 => /lib/libz.so.1 (0x4047e000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x4048d000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x404bf000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x405c1000)
[testcn@bernardchan testcn]$ php -v
PHP 5.0.3 (cli) (built: Mar 29 2005 09:46:45)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies

I did not install the PHP4 executable from the RPMs, so there is no /usr/bin/php but Apache will load PHP4 with the shared object.

To add more confusion, the two PHP installations may actually read different configuration files (php.ini). So, to see the exact configuration you need to run phpinfo() with the intended PHP installation to find it out.
Code:
[root@bernardchan testcn]# echo '<?phpinfo()?>' | php | grep 'php.ini'
Configuration File (php.ini) Path => /usr/local/lib/php.ini

while the distribution php.ini points to /etc/php.ini. Confusing, huh?

Last edited by cbkihong; 06-06-2005 at 09:38 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Update php 4.3 RPM to php 5.3.3 php

Dear All, My redhat version is: # cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 4) # # uname -a Linux cotapplication3.cot.com 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux # I want to update my php from: # php... (1 Reply)
Discussion started by: monojcool
1 Replies

2. Red Hat

Problem with rpm installation

When i try to install rpm with rpm -ivh ntp* it shows package is already install and when i query for same package it shows package is not installed ?How to resolve DSA signature error for rpm? How to choose rpm package except redhat version(el5) and architecture(i386) and site link for that? (5 Replies)
Discussion started by: amitbharad
5 Replies

3. AIX

Problem Installing Apache from rpm

I am attempting to install an rpm of Apache from perzl.org on an AIX 6100-07-03-1207 server and it is failing. I think I have all of the dependencies installed. Can anyone help? Any help would be appreciated. It fails with the following error: # rpm -Uvh httpd-2.4.2-2.aix5.1.ppc.rpm ... (3 Replies)
Discussion started by: lbholde
3 Replies

4. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

5. UNIX for Dummies Questions & Answers

RPM install problem

I'm trying to install mysql on a server, but I keep getting an error. Can anyone offer any help? Below I've listed a bunch of info that you might find helpful. Here are the commands I'm using. $ ls MySQL-client-community-5.1.35-0.rhel3.i386.rpm... (2 Replies)
Discussion started by: wsetchell
2 Replies

6. UNIX for Advanced & Expert Users

Problem After removing glibc-2.3.4-2.39 rpm

Dear All, I have messed up my server which was running rhel4U6 by removing the rpm package glibc-2.3.4-2.39 . kindly guide me how can i fix this problem . I have tried to chroot /mnt/sysimage but it is not working. Any idea's how to fix the problem regrds (2 Replies)
Discussion started by: xander
2 Replies

7. AIX

[AIX 5.2] Problem with rpm

I downloaded gcc-cplusplus-4.0.0-1.aix5.2.ppc.rpm from IBM AIX Toolbox Download Page - Alphabetical Listing but: -bash-3.00# rpm -ivh gcc-cplusplus-4.0.0-1.aix5.2.ppc.rpm error: gcc-cplusplus-4.0.0-1.aix5.2.ppc.rpm cannot be installed I can't understand wht kind of error is it... Can be... (1 Reply)
Discussion started by: untamed
1 Replies

8. Red Hat

rpm problem

I installed gnome-libs-1.4.1.2.90-34.2.src.rpm using rpm # rpm -ivvh gnome-libs-1.4.1.2.90-34.2.src.rpm D: ============== gnome-libs-1.4.1.2.90-34.2.src.rpm D: Expected size: 3903306 = lead(96)+sigs(344)+pad(0)+data(3902866) D: Actual size: 3903306 D: opening db environment... (3 Replies)
Discussion started by: fredao
3 Replies

9. UNIX for Dummies Questions & Answers

Installing php-4.3.3-2.i386.rpm

Ok when i try to run the install the is what i get How can i fix this can anyone help (8 Replies)
Discussion started by: Blackrose
8 Replies

10. Linux

Red Hat RPM problem

I have my system setup different then the conventional setup: # df -h Filesystem Size Used Avail Use% Mounted on /dev/hdc2 2.0G 977M 936M 52% / /dev/hdc1 97M 9.0M 83M 10% /boot none 251M 0 251M 0% /dev/shm So when I try... (2 Replies)
Discussion started by: jasonr
2 Replies
Login or Register to Ask a Question