Post by castrogstar » Thu Jan 10, 2019 9:02 pm

Hello,

I have upgraded my server to php 5.6 and I am getting errors regarding mysql vs mysqli. I have read through the forums and found a solution to change mysql to mysqli in the config.php files. After doing this, I receive the following error:

Parse error: syntax error, unexpected 'else' (T_ELSE), expecting function (T_FUNCTION) in /home/content/40/8668740/html/www.sensobuildingsupplies.ca/system/database/mysqli.php on line 54

line 54 of that file shows this

} else {
trigger_error('Error: ' . mysql_error($this->link) . '<br />Error No: ' . mysql_errno($this->link) . '<br />' . $sql);
exit();
}

What shall I do?

Newbie

Posts

Joined
Thu Jan 10, 2019 8:57 pm

Post by xxvirusxx » Fri Jan 11, 2019 12:22 am

Edit config.php and change from mysql to mysqli

My Extensions | OC 3.0.3.1, 3.0.2.0, 2.3.0.2 with bugs fixed | Buy me a beer or coffee


Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm

Post by pprmkr » Fri Jan 11, 2019 3:55 pm

xxvirusxx wrote:
Fri Jan 11, 2019 12:22 am
Edit config.php and change from mysql to mysqli
castrogstar wrote:
Thu Jan 10, 2019 9:02 pm
I have read through the forums and found a solution to change mysql to mysqli in the config.php files. After doing this, I receive the following error:
Wich version are you using?

An } else { on line 54 sounds like an altered file !
Copy system/database/mysqli.php from OpenCart archive and try again.

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by johnp » Sun Jan 20, 2019 7:57 pm

I would set up a new and clean version of OC 1.5.6.5 in a sub folder and see if that works. From that you can identify where the problem lies and if necesary change the config files in that to access the live database.

++ Quote OC10 for 10% off your first order ++
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD 2.6.1 lover, user and geek.
Fast and Affordable Service for Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
https://www.asandwhenbusinessservices.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by Elevate » Tue Jan 22, 2019 10:20 pm

castrogstar wrote:
Thu Jan 10, 2019 9:02 pm
Hello,

I have upgraded my server to php 5.6 and I am getting errors regarding mysql vs mysqli. I have read through the forums and found a solution to change mysql to mysqli in the config.php files. After doing this, I receive the following error:

Parse error: syntax error, unexpected 'else' (T_ELSE), expecting function (T_FUNCTION) in /home/content/40/8668740/html/www.sensobuildingsupplies.ca/system/database/mysqli.php on line 54

line 54 of that file shows this

} else {
trigger_error('Error: ' . mysql_error($this->link) . '<br />Error No: ' . mysql_errno($this->link) . '<br />' . $sql);
exit();
}

What shall I do?
What were you running before if you are just now upgrading to PHP 5.6? PHP 5.6 has been EOL (End of Life) now for almost a month.

ELEV8TE Website Development
https://www.elev8your.com


New member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA
Who is online

Users browsing this forum: No registered users and 11 guests