[Sussex] Getting PHP to work with MySQL

Brendan Whelan b_whelan at mistral.co.uk
Wed Feb 6 09:10:15 UTC 2008


I have found and fixed the problem - I had (carelessly) copied the 
settings in php.ini from a 64 bit server to a 32 bit server and not 
reset the pointer to the extension directory.
On a 64 bit system the setting is extension_dir = "/usr/lib64/php/modules"
On a 32 bit system the setting is extension_dir = "/usr/lib/php/modules"
Thanks for all the responses as they nudged me in various directions and 
made me reconsider all my settings.
Brendan

Simon Dawson wrote:
> Sorry don't know how much PHP you know, so apologies if I am being a bit 
> simple for you.
>
> Can you run and post the output from phpinfo().
>
> ie run a php file on the webserver that contains:
>
> <?php
> 	echo phpinfo();
> ?>
>
> We'll see if that gives any clues.
>
>
> On Tuesday 05 February 2008 19:45, Brendan Whelan wrote:
>   
>> No I haven't tried recompiling as it looks (from php info) that the php
>> to mysql link is enabled. I have never had to recompile in the past when
>> setting up a Fedora server.  Brendan
>>
>> Peter Jones wrote:
>>     
>>> Have your tried compiling the soruce with --with-mysql
>>> ?
>>>
>>> --- Brendan Whelan <b_whelan at mistral.co.uk> wrote:
>>>       
>>>> I have just installed a copy of Fedora Core 6 and
>>>> I'm having trouble
>>>> getting PHP programs to connect to a MySQL database.
>>>> Individually, the PHP and MySQL both work but when I
>>>> try to connect from
>>>> a PHP program to MySQL I get "Call t undefined
>>>> function
>>>> mysql-connect()".  The mysql connection looks to be
>>>> configured in
>>>> php.ini. The log files aren't showing anything
>>>> useful. I tried did a
>>>> search in yum for php-mysql and then ran "yum
>>>> install php-mysql.i386",
>>>> which gave "nothing to do".  A mysql.so file resides
>>>> in
>>>> /usr/lib/php/modules/
>>>> I have exhausted what I can think of doing - any
>>>> suggestions. Thanks,
>>>> Brendan
>>>>
>>>> __
>>>> Sussex mailing list
>>>> Sussex at mailman.lug.org.uk
>>>> E-mail Address: sussex at mailman.lug.org.uk
>>>> Sussex LUG Website: http://www.sussex.lug.org.uk/
>>>> https://mailman.lug.org.uk/mailman/listinfo/sussex
>>>>         
>>>      
>>> _________________________________________________________________________
>>> ___________ Never miss a thing.  Make Yahoo your home page.
>>> http://www.yahoo.com/r/hs
>>>
>>> __
>>> Sussex mailing list
>>> Sussex at mailman.lug.org.uk
>>> E-mail Address: sussex at mailman.lug.org.uk
>>> Sussex LUG Website: http://www.sussex.lug.org.uk/
>>> https://mailman.lug.org.uk/mailman/listinfo/sussex
>>>       
>> __
>> Sussex mailing list
>> Sussex at mailman.lug.org.uk
>> E-mail Address: sussex at mailman.lug.org.uk
>> Sussex LUG Website: http://www.sussex.lug.org.uk/
>> https://mailman.lug.org.uk/mailman/listinfo/sussex
>>     
>
>   





More information about the Sussex mailing list