checkfx Posted July 24, 2017 Share Posted July 24, 2017 (edited) 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 July 25, 2017 by checkfx Quote Link to comment Share on other sites More sharing options...
checkfx Posted July 24, 2017 Author Share Posted July 24, 2017 (edited) 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 July 24, 2017 by checkfx Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 24, 2017 Share Posted July 24, 2017 1 hour ago, checkfx said: 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 ! Yes you can use V6 under the Open Source licence and upgrading is definitely recommended Ian 1 Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 24, 2017 Share Posted July 24, 2017 Making CC3 work with later versions of PHP will require some edits to the code. The latest versions of all the CubeCart version families are now configured to not have any licensing requirements. 1 Quote Link to comment Share on other sites More sharing options...
checkfx Posted July 24, 2017 Author Share Posted July 24, 2017 bsmither can you elaborate about the edits you mention please ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 24, 2017 Share Posted July 24, 2017 (edited) 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 July 25, 2017 by bsmither Quote Link to comment Share on other sites More sharing options...
checkfx Posted July 24, 2017 Author Share Posted July 24, 2017 @bsmither it remove the fist error but not the other one ! Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 24, 2017 Share Posted July 24, 2017 Please read again my response. I added more to it since you last read it. Quote Link to comment Share on other sites More sharing options...
checkfx Posted July 25, 2017 Author Share Posted July 25, 2017 (edited) @bsmither yep i just saw it ! Ty ! I will contact my provider ! Edited July 25, 2017 by checkfx Quote Link to comment Share on other sites More sharing options...
checkfx Posted July 25, 2017 Author Share Posted July 25, 2017 @bsmither Thank's veeeeeeery much for the help ! Problem solved ! website back online ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.