Jump to content

Depreced error [SOLVED]


Recommended Posts

hello !

On a cummunity server, after a php update from Hostpapa, the open source cubecart installation that i have now indicate this error.


 

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; db has a deprecated constructor in /home/tech4610/public_html/classes/db.inc.php on line 35

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/tech4610/public_html/classes/db.inc.php:45 Stack trace: #0 /home/tech4610/public_html/index.php(51): db->db() #1 {main} thrown in /home/tech4610/public_html/classes/db.inc.php on line 45



Im not a programmer but i can fix problem if some one can explain me what to do. 

Can plz some one give me an answer about this ?

first language is french so plz be patient with me ;-) 


Cubecart V3

 

Edited by checkfx
Link to comment
Share on other sites

are we still able to use cubecart at the version 6 in open source mode ? 


Cause if it's the case i will make the upgrade and continue to use it like i was ! i Dont even use the selling options ! i just use it as static website ! 

Edited by checkfx
Link to comment
Share on other sites

CubeCart 3 needs an instruction to have PHP suppress the reporting of "deprecated" notices. To do that:

In the CC3 file /includes/ini.inc.php, near line 3, find:

error_reporting(E_ALL ^ E_NOTICE);

Change to:

error_reporting(E_ALL & ~(E_NOTICE | E_DEPRECATED | E_USER_DEPRECATED) );

A bigger challenge is to find and recode all occurrences of the ereg() family of PHP functions, and the mysql() family of functions. According to the PHP documentation, both ereg() and mysql() family of functions are still deprecated - that is, they still work but warnings are given - but have actually been removed in PHP7.

The second error you have, the undefined function, is likely caused by the PHP update not having the mysql extension enabled. Consult with your hosting provider to determine how to enable this extension. (Not to be confused with the mysqli extension.)

Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...