Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 11:12:07 AM

Pages: [1]   Go Down
  Print  
Author Topic: Fatal error: Call to undefined function: mysqli_connect()  (Read 2507 times)
shrg18
Trekkie
**
Offline Offline

Posts: 14


« on: October 20, 2008, 07:53:46 PM »

Hi,

This error is what I encountered on all my domain and subdomains today.

The php scripts of configuration to connect to the databases are untouched. I tested on using mysql_connect(), it works fine.

In the php.ini files, mysqli extensions are enabled.

Anyone can give me an idea of what is going wrong?

Sent two messages to the service but no response received yet.

Thanks.
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5219



« Reply #1 on: November 02, 2008, 07:58:00 AM »

Have you been running with PHP 5 enabled? If so, if your server was moved or upgraded, it may be back to PHP 4 even though cPanel (and the .htaccess entry) says "PHP 5". Back up your public_html/.htaccess file, and try disabling PHP 5 from cPanel and then re-enabling it. I did a quick search for mysqli in these forums, and problems with it not working seem to often be related to PHP 5 not being properly enabled. It's worth a shot...
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
shrg18
Trekkie
**
Offline Offline

Posts: 14


« Reply #2 on: November 02, 2008, 07:12:16 PM »

Have you been running with PHP 5 enabled? If so, if your server was moved or upgraded, it may be back to PHP 4 even though cPanel (and the .htaccess entry) says "PHP 5". Back up your public_html/.htaccess file, and try disabling PHP 5 from cPanel and then re-enabling it. I did a quick search for mysqli in these forums, and problems with it not working seem to often be related to PHP 5 not being properly enabled. It's worth a shot...
Hi, thanks. That php5 setting solved the problem.

After removed php5 and installed it again, mysqli_connect() works.

Though don't know how it was disabled, it happened once before, long ago.

The site is back to normal, thank you.
« Last Edit: November 02, 2008, 07:23:37 PM by shrg18 » Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5219



« Reply #3 on: November 02, 2008, 07:20:10 PM »

Hi, thanks. That php5 enabling fixed the problem.

After removed php5 and installed it again, mysqli_connect() works.

It happened once before, long ago.

The site is back to normal, thank you.

That's great news!
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
shrg18
Trekkie
**
Offline Offline

Posts: 14


« Reply #4 on: November 02, 2008, 07:25:20 PM »

Hi, thanks. That php5 enabling fixed the problem.

After removed php5 and installed it again, mysqli_connect() works.

It happened once before, long ago.

The site is back to normal, thank you.

That's great news!

It bothered me for almost two weeks. The php5 setting was shown "enabled".

thanks a lot!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: