Page 1 of 1

Fatal Error When Accessing Website and Admin site

Posted: Thu Dec 17, 2020 2:13 am
by BostonRedSox001
Currently using 1.5.2. Opencart and receiving the following fatal error when trying to access our homepage and admin. Thoughts of what might be causing this?

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home1/xxxxxx/public_html/system/database/mysql.php:6 Stack trace: #0 /home1/xxxxxxx/public_html/system/library/db.php(12): MySQL->__construct('localhost', 'xxxxxx_admin', 'xxxxxxxx', 'xxxxxxx_xxxxxx...') #1 /home1/xxxxxx/public_html/index.php(38): DB->__construct('mysql', 'localhost', 'xxxxxx_admin', 'xxxxxxx', 'xxxxxxx_xxxxxxx...') #2 {main} thrown in /home1/xxxxxxx/public_html/system/database/mysql.php on line 6

Re: Fatal Error When Accessing Website and Admin site

Posted: Thu Dec 17, 2020 2:54 am
by straightlight
Not a bug. OC v1.5x are pretty old as mysql with PHP is deprecated. mysqli must be used instead and since many years.

Re: Fatal Error When Accessing Website and Admin site

Posted: Thu Dec 17, 2020 7:35 am
by BostonRedSox001
straightlight wrote:
Thu Dec 17, 2020 2:54 am
Not a bug. OC v1.5x are pretty old as mysql with PHP is deprecated. mysqli must be used instead and since many years.
Is this an easy fix? Ideally we want to get the existing site back up and running as soon as we can and then consider upgrade options from there.

Re: Fatal Error When Accessing Website and Admin site

Posted: Thu Dec 17, 2020 8:12 am
by straightlight
BostonRedSox001 wrote:
Thu Dec 17, 2020 7:35 am
straightlight wrote:
Thu Dec 17, 2020 2:54 am
Not a bug. OC v1.5x are pretty old as mysql with PHP is deprecated. mysqli must be used instead and since many years.
Is this an easy fix? Ideally we want to get the existing site back up and running as soon as we can and then consider upgrade options from there.
At this point, I'd say to consider upgrade as a custom job would be more ideal in order to be more up-to-date with Industry compliance. You could, either, create a new service request in the Commercial Support section of the forum, or contact an Opencart partner by using the Resources link at the top menu of the site, or contact me directly via PM to get this done.