Error - Deprecated: mysql_connect() (v. 1.0 - 2.25)
If you are seeing an error that looks like:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in userpathincopen.php on line 74
It means that your host is showing warnings. In future releases, the system will be using mysqli functionality. For current releases, to remove the warnings, change the code:
mysql_connect
to:
@mysql_connect
In version 2.25, this will be in the open.php and stylecss.php files in the /inc/ folder:
-
Open the open.php file in the /inc/ folder.
-
Around line 73, change the code:
mysql_connect($Host_Name,$DB_User_Name,$DB_Password) OR DIE("Unable to connect to database");to:
@mysql_connect($Host_Name,$DB_User_Name,$DB_Password) OR DIE("Unable to connect to database"); -
Open the stylecss.php file in the /inc/ folder.
-
Around line 6, change the code:
mysql_connect($Host_Name,$DB_User_Name,$DB_Password) OR die (mysql_error());
to:
@mysql_connect($Host_Name,$DB_User_Name,$DB_Password) OR die (mysql_error());