Good evening everyone. Let me start by saying I am nowhere near a pro here. I'm learning what I need as I go (for the most part), but I'm pretty stuck right now. I'm also sorry ahead of time for the length of this post, I just want to do my best to include all necessary information and all steps I've taken thus far.
This morning we noticed a flood (thousands) of error emails coming in. Most of the emails were for the use of mysql vs mysqli (see below). Our forum was down also.
Line 311 read as follows... (i attached the file also for review)
After some research, I found that we needed to change the "mysql" functions to "mysqli". I changed them in the class_core.php file, and also changed "mysql_pconnect" to mysqli_connect", as it seems persistent connections aren't supported in mysqli (at least according to what I read today. Again, I'm no expert here.).
I uploaded the file, and got a new error email (see below).
More research told me that I can't have 'Server:Port', so I edited line 311 as follows...
And I got another error email...
MORE research showed me that the order of "$servername, $port, $username, $password" was incorrect. So I edited line 311 again as follows...
You guessed it, another error...
So I figured it was looking for $database before $port. I edited it again to this...
Another error...
I won't lie, I don't know how to define a variable, so I just tried line 311 like this...
Since the last edit, I'm not seeing any line-specific errors. Instead the forum is still down and I get this error email...
I'm really not sure where to go from here. Any help would be greatly appreciated!
This morning we noticed a flood (thousands) of error emails coming in. Most of the emails were for the use of mysql vs mysqli (see below). Our forum was down also.
-Database error in vBulletin :
-
-mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead /home4/nemotors/public_html/boards/includes/class_core.php on -line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:11:42 AM
-Error Date : Wednesday, January 13th 2016 @ 09:11:42 AM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 93.92.217.228
-Username :
-Classname : vB_Database
-MySQL Version :
-
-
-mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead /home4/nemotors/public_html/boards/includes/class_core.php on -line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:11:42 AM
-Error Date : Wednesday, January 13th 2016 @ 09:11:42 AM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 93.92.217.228
-Username :
-Classname : vB_Database
-MySQL Version :
-
Line 311 read as follows... (i attached the file also for review)
PHP Code:
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
After some research, I found that we needed to change the "mysql" functions to "mysqli". I changed them in the class_core.php file, and also changed "mysql_pconnect" to mysqli_connect", as it seems persistent connections aren't supported in mysqli (at least according to what I read today. Again, I'm no expert here.).
I uploaded the file, and got a new error email (see below).
-Database error in vBulletin :
-
-mysqli_connect(): (HY000/2005): Unknown MySQL server host 'localhost:3306' (0) /home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:13:02 PM
-Error Date : Wednesday, January 13th 2016 @ 09:13:02 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
-
-mysqli_connect(): (HY000/2005): Unknown MySQL server host 'localhost:3306' (0) /home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:13:02 PM
-Error Date : Wednesday, January 13th 2016 @ 09:13:02 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
PHP Code:
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']($servername, $port, $username, $password);
-Database error in vBulletin :
-
-mysqli_connect(): (28000/1045): Access denied for user '3306'@'localhost' (using password: YES) /home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:20:35 PM
-Error Date : Wednesday, January 13th 2016 @ 09:20:35 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
-
-mysqli_connect(): (28000/1045): Access denied for user '3306'@'localhost' (using password: YES) /home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:20:35 PM
-Error Date : Wednesday, January 13th 2016 @ 09:20:35 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
PHP Code:
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']($servername, $username, $password, $port);
-Database error in vBulletin :
-
-mysqli_connect(): (42000/1044): Access denied for user 'nemotors_nem'@'localhost' to database '3306'
-/home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:23:26 PM
-Error Date : Wednesday, January 13th 2016 @ 09:23:26 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
-
-mysqli_connect(): (42000/1044): Access denied for user 'nemotors_nem'@'localhost' to database '3306'
-/home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:23:26 PM
-Error Date : Wednesday, January 13th 2016 @ 09:23:26 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
PHP Code:
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']($servername, $username, $password, $database, $port);
-Database error in vBulletin :
-
-Undefined variable: database
-/home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:26:34 PM
-Error Date : Wednesday, January 13th 2016 @ 09:26:34 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
-
-Undefined variable: database
-/home4/nemotors/public_html/boards/includes/class_core.php on line 311
-
-MySQL Error :
-Error Number :
-Request Date : Wednesday, January 13th 2016 @ 09:26:34 PM
-Error Date : Wednesday, January 13th 2016 @ 09:26:34 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
PHP Code:
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']($servername, $username, $password);
Since the last edit, I'm not seeing any line-specific errors. Instead the forum is still down and I get this error email...
-Database error in vBulletin :
-
-Cannot use database nemotors_boardedup
-
-MySQL Error :
-Error Number : 0
-Request Date : Wednesday, January 13th 2016 @ 09:29:18 PM
-Error Date : Wednesday, January 13th 2016 @ 09:29:18 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
-
-Cannot use database nemotors_boardedup
-
-MySQL Error :
-Error Number : 0
-Request Date : Wednesday, January 13th 2016 @ 09:29:18 PM
-Error Date : Wednesday, January 13th 2016 @ 09:29:18 PM
-Script : http://nemotorsport.com/
-Referrer :
-IP Address : 98.229.237.162
-Username :
-Classname : vB_Database
-MySQL Version :
-
Comment