Page 1 of 1

Can't connect to mysql database

Posted: Thu Jun 26, 2008 8:26 am
by shanedara
Hi Im new to php/datase development and have gotten really stuck. Im trying to connect to a database I created in mysql but cant. Im not getting any errors that say it wont connect but I know that php is just ignoring all the mysql_connect and mysql_query functions. When I dont encase the $cxn variable in " " I get an error message saying

Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 13

can some one please help me with this.

Re: Can't connect to mysql database

Posted: Thu Jun 26, 2008 12:15 pm
by Christopher
You do not have the mysqli extension installed. Check your php.ini file or use phpinfo() to determine which MySQL extension you have installed (maybe mysql or PDO?)

Re: Can't connect to mysql database

Posted: Thu Jun 26, 2008 2:40 pm
by shanedara
Thanks for the reply. I looked into my php.ini file and found this line with no semi-colon infront

extension=php_mysqli.dll

is that what you mean? Is that what should be there? Sorry Im really new to this.

Re: Can't connect to mysql database

Posted: Tue Oct 21, 2008 1:29 pm
by shrg18
I have encountered the same error: Fatal error: Call to undefined function: mysqli_connect() in ...includes/mysql.inc.php on line 58

It occurs in the domain and all subdomains yesterday.

Before yesterday, it had never happened. All domains worked fine. I didn't upload new scripts.

Looked at each php.ini, mysqli extensions are commented out. Sent messages to the customer support, they didn't respond. Usually they respond quickly.

I use mysql i/o mysqli, the testing script works fine.

Can anyone give me a clue or guidance?