For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > May 2007 > Re: [PHP-INSTALL] still without-mysql after yum install php-mysql









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] still without-mysql after yum install php-mysql
Tim McGeary

2007-05-30, 7:00 pm

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 musql
> extension loaded.


It worked! Great, thank you very much!


>
> On Tue, 29 May 2007, Tim McGeary wrote:
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com