Two versions of php installed! How can I fix it?

Rick Stevens rstevens at vitalstream.com
Mon Jun 28 17:53:44 UTC 2004


Leila Lappin wrote:
> Hello everyone,
> 
> I know this list is mostly for the installation of the
> operating system, but please help me figure this out
> if you can.   When I do rpm –q php I get two versions
> listed: 
>             php-4.2.2-17 and php-4.2.2-17.2  

All that indicates is that you didn't "rpm -e" the previous version of
php (you did an "rpm -u").

> I think this is giving me a problem when I try to use
> php with mysql because I have only one version of the
> php-mysql installed and that is php-mysql-4.2.2-17
> 
> I get an error 'Call to undefined function:
> mysql_connect()'.  

Did you install the php-mysql RPM?  You need that if want MySQL
connectivity under PHP.
> 
> I also did phpinfo();  and confirmed that I am using
> php version 4.2.2 with apache 2.0 and I have
> –with-mysql=shared,/usr set.  Eliminating all the
> obvious problems, if I use my layman’s deduction, I
> would say the problem is that I am picking up
> php-4.2.2-17.2 libraries with php-mysql-4.2.2-17 and
> because they are two different versions (php 17.2 and
> mysql 17)I get the errors.  If I'm correct how should
> I fix this? Could someone please help?

Try doing "rpm -qa | grep php" to get a listing of all RPMs that have
"php" in their name.  If you don't have "php-mysql", you won't be able
to get at MySQL.

BTW, the latest release of php-mysql for FC1 is php-mysql-4.3.6-1.3,
for FC2, it's php-mysql-4.3.6-5
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-               The Theory of Rapitivity: E=MC Hammer                -
-                                  -- Glenn Marcus (via TopFive.com) -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list