Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2006
Posts: 49
W
journeyman
journeyman
W Offline
Joined: Oct 2006
Posts: 49
All,

I get this error when trying to run the install script on a test server. I'm a bit mystified as I already have phpmyadmin running so connecting to the server isn't a problem.

Fatal error: Call to undefined function mysql_connect() in /var/www/apache2-default/bitog/forums/install/install.php on line 505

OS is Debian Linux

Any help is appreciated,

Wayne

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Hi Wayne,

Please take a look at this post and see if it helps

mysql_connect error

Joined: Oct 2006
Posts: 49
W
journeyman
journeyman
W Offline
Joined: Oct 2006
Posts: 49
Ntdoc,

I don't think the older version problem applies as I'm using newer versions:

debian:# mysqld --version
mysqld Ver 5.0.32-Debian_7etch4-log for pc-linux-gnu on i486 (Debian etch distribution)
debian:# mysql --version
mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2

I ran this code:

<?php

$dbh = mysql_connect("localhost","username","password");
mysql_select_db("databasename",$dbh);

?>

And came up with this error:

Fatal error: Call to undefined function mysql_connect() in /var/www/apache2-default/test.php on line 4

Am I wrong about the versions?

Thanks,

Wayne

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
It appears that the connection string for the password or user may be incorrect.

Do you have console terminal access or through a control panel on the server?

Try to logon via the phpMyAdmin or similar in Control Panel if you have it otherwise via SSH maybe like this and verify the username and password and it is case sensitive.
mysqld -u root (use your logon name)

Somewhere the connection is not being verified it looks like.

Joined: Oct 2006
Posts: 49
W
journeyman
journeyman
W Offline
Joined: Oct 2006
Posts: 49
ahhhh - got it...

For some reason the test server didn't have the option in phpmyadmin to choose pre or post 4.1 authentication. The production server has the option and 4.1+ is selected. I went ahead and ran:

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;

and restarted Apache - it works now....

Still don't understand why the production server has post 4.1 auth as an option and the test server doesn't.... Both Debian and both pretty new installs.

Wayne

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well glad to hear you got it going. grin


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (1 invisible), 920 guests, and 238 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)