The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Errors in server log
Seeing many of these.. running php 5.6.30
[Thu Mar 02 23:24:31.397570 2017] [proxy_fcgi:error] [pid 4188:tid 139985248311040] [client ###########] AH01071: Got error 'PHP message: PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/vhosts/#########.com/httpdocs/global.php(29) : eval()'d code on line 274\nPHP message: PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/vhosts/#######.com/httpdocs/global.php(29) : eval()'d code on line 336\n', referer: https://#########.com/showthread.php?t=236793&page=11 i know it is a plug in but I could use help tracking it down.. Thanks:up: |
#2
|
|||
|
|||
Check for a "global_start" hook.
Looks like the hook you're looking for has a couple hundred lines of code in it. |
#3
|
||||
|
||||
Thanks, That makes sense Dave.
It has to be one of the following plug ins then. Any thoughts? |
#4
|
|||
|
|||
Hard to tell, open each of them and see which one contains the function "mysql_connect".
|
#5
|
||||
|
||||
Thanks Dave,
I believe it is Photopost.. Still looking though. Anything wrong with this? $dblink = mysql_connect ("$vbhost", "$vbuser", "$vbpass") or die('I cannot connect to the database.'); mysql_select_db ("$dbname2")or die("Could not select forum database"); |
#6
|
|||
|
|||
Yes, that's what makes use of the mysql_* functions which is deprecated in your PHP version.
You can fairly easy change it to make use of the mysqli_* functions though: https://www.phpclasses.org/blog/pack...to-MySQLi.html |
#7
|
||||
|
||||
Oh yeah, I see what you mean now...
Like this.. $connection = mysqli_connect( 'host', 'username', 'password'); or die('I cannot connect to the database.'); ok, I got you. Thanks Dave ##The full replacement would be: $connection = mysqli_connect( 'host', 'username', 'password'); or die('I cannot connect to the database.'); mysqli_select_db( $link, $database) or die("Could not select forum database"); } |
#8
|
|||
|
|||
You can change it to
PHP Code:
I assume that it also makes use of other mysql_* functions, I would double check that. To port a mysql_query to mysqli_query, you need to specify the connection variable as the first argument and the second argument will be the actual query. |
#9
|
||||
|
||||
Thanks!
The only other ones are $vbhost, $vbuser, $vbpass, $dbname and they should not hard to convert. |
#10
|
||||
|
||||
A product or plugin should never be using native MySQL or MySQLi functions to connect to the database (or for subsequent commands), it should be using the vbulletin database object.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|