Site Header MYSQL Error

Status
Not open for further replies.

qwerty52

New Member
Messages
5
Reaction score
0
Points
1
In the last 4 days I have an error displayed in the header of my site and also I can't access the admin panel. Please help!

This is the error message :
" Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/pretulmi/public_html/pretulmini.com/system/database/mysql.php on line 6

Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50173 Library:50531 in /home/pretulmi/public_html/pretulmini.com/system/database/mysql.php on line 6 "

Thank you!
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
as for the "Deprecated: mysql_connect()..." error
With the update to PHP version [ 5.5.X ] on the free-hosting servers by x10hosting - the issue is - starting with PHP version 5.5.0 this function [ mysql_connect() ] will generate (throw) an [ E_DEPRECATED ] error - this is by PHP and not by x10hosting

while PHP [ mysql_connect ] extension is deprecated as of PHP 5.5.0, and will be removed in the future - it is still supported

AFTER you receive that [ E_DEPRECATED ] error
you might receive one or more like "Warning: session_start(): Cannot send session cookie - headers already sent by..."
which will stop (kill) some CMS
 

contactskn35

New Member
Messages
7
Reaction score
0
Points
1
I am also facing the same problem
Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50173 Library:50531 in
since last week.
Will it be rectified or is there any method to remove the error at the programming level please help and post a good answer which could resolve the thing as such.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Will it be rectified or is there any method to remove the error at the programming level please help and post a good answer which could resolve the thing as such.
To receive only those errors that cause applications to stop working put this line at the top of your PHP script file that throws the errors
PHP:
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));
This will stop PHP from throwing notice, warning and deprecated errors.

if you use WordPress put that code after [ require_once( ABSPATH .'wp-settings.php' ); ] in the wp-config.php file
 

qwerty52

New Member
Messages
5
Reaction score
0
Points
1
From yesterday only one error remains :
" Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/pretulmi/public_html/pretulmini.com/system/database/mysql.php on line 6 "

The other one was solved by x10hosting staff. Will be this error solved too or personally I need to do something?

Thank you!
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi qwerty52,

We recently updated to PHP 5.5, which is the latest version of PHP. Your script is using the mysql_ extension, which is, as of PHP 5.5, deprecated. This means that, though it is still included for now in PHP, its usage is discouraged in favour of PDO. The message are you are seeing can be safely ignored; it will not affect the proper usage of the mysql_ extension.

However, if you wish to hide the deprecated notice, you can use the following line of PHP:
Code:
error_reporting(E_ALL ^ (E_DEPRECATED));

Thank you,
 
Status
Not open for further replies.
Top