For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > October 2005 > PHP / MySQL on Fedora - can't make it work









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 PHP / MySQL on Fedora - can't make it work
Dan

2005-09-26, 6:57 pm

Hi,

I can't figure out why PHP can't access any MySQL databases on my Fedora
2.6.8. I have no problem executing php scripts that do not deal with MySQL.
Also, I have no problem accessing MySQL databases using mysql (locally or
remotely).
phpinfo() reports '--with-mysql=shared,/usr' '. Initially I thought that
certain php's and mysql defaults are not in sync so I created /etc/my.cnf
with:

[client]
socket=/var/lib/mysql/mysql.sock
port=3306
[myssqld]
socket=/var/lib/mysql/mysql.sock
port=3306

and then updated /etc/php.ini as follows:

mysql.default_socket = /var/lib//mysql/mysql.sock
mysql.default_port = 3306

I restarted both apache and MySQL. Still no luck.

I'm running apache 2.0.51 and PHP 4.1.

Could someone please give me some ideas what could be wrong here?

Thanks,
Dan.





Vigil

2005-09-29, 6:57 pm

On Mon, 26 Sep 2005 17:55:36 -0400, Dan wrote:

> Could someone please give me some ideas what could be wrong here?


See if you can narrow down the problem - can other clients, eg.
phpMyAdmin, connect to the database? Do command line DB/PHP scripts
connect to it?

--

..

J.O. Aho

2005-10-01, 6:56 pm

Dan wrote:
> Hi,
>
> I can't figure out why PHP can't access any MySQL databases on my Fedora
> 2.6.8. I have no problem executing php scripts that do not deal with MySQL.
> Also, I have no problem accessing MySQL databases using mysql (locally or
> remotely).



You need to install the php_mysql package.


//Aho
Sponsored Links







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

Copyright 2008 codecomments.com