[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] PHP and MYSL connection errors..anyone have any idea?
- Subject: Re: [cobalt-developers] PHP and MYSL connection errors..anyone have any idea?
- From: Michael Jaffrey <mike@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri Jan 11 01:54:14 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
> On Thursday 10 January 2002 05:45 pm, Jamie Rossi wrote:
> > The error I get is this>
> > Fatal error: Call to undefined function: mysql_connect() in
> > /home/sites/site22/web/mambo/classes/database.php on line 25
I had this same problem on a qube3.
couple of things to do:
1- use this code to check that php has mysql support, <?php phpinfo(); ?>
2- check php.ini (probable somewhere like etc/httpd/. It needs to have unix extention "extension=mysql.so" uncommented.
3-I have found that even if php is compiled with mysql support you may still need to open a TCP port. I use this in my code:
mysql_connect("localhost:/var/lib/mysql/mysql.sock","mysql","secret");
where "mysql" is the dbname and "secret" is the password. I would check the path to mysql.sock as I am not sure where it is on a raq.
Hope this helps
Mike