Re: still without-mysql after yum install php-mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 30 May 2007, Tim McGeary wrote:

To: php-install@xxxxxxxxxxxxx
From: Tim McGeary <tmm8@xxxxxxxxxx>
Subject: Re:  still without-mysql after yum install php-mysql

My responses are between your checklist:

Keith Roberts wrote:
Hi Tim. Please check out the following:

First make sure you are dealing with the correct php.ini file. Look for the path to the Configuration file in the output from phpinfo(). It's the 6th entry down.

It is look at /etc/php.ini and I search the server and this is the only php.ini file on the server.

Next make sure that you have the required mysql module(s) installed, so php can find it to load it. It should be under your php installation directory somewhere.

In your php.ini file (wherever that is) you need to set the values for the following:

; Directory in which the loadable extensions (modules) reside.
; tells php where to find loadable extensions for php
extension_dir = /usr/local/php-5.2.0/lib/php/extensions/no-debug-non-zts-20060613

I have in my /etc/php.ini file:
extension_dir = "/usr/lib/php/modules"

; now you need to actually tell php which
; loadable extensions you want php to use

; load the mysql ext
extension=mysql.so

; load the mysqli ext
extension=mysqli.so

I have in my /etc/php.ini file:
extension=mysql.so
extension=mysqli.so

The next thing to check is that the php module itself is being loaded into apache. This should be apparent at boot up time. (I'm on Fedora core so cannot comment on your OS type)

OK, I don't see any mention of the php module. I found the appropriate line thru google to put into the httpd.conf file.

You will need to restart - stop then start - Apache to make php re-read the altered php.ini file. It only does this once at apache start up.

I restarted apache.

If you check the output of phpinfo() you should then have the mysql extension loaded.

It worked!  Great, thank you very much!

Pleased to hear that Tim.

Have a nice day,

Regards

Keith

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux