Page 1 of 1

php 5.6 upgrade issues

Posted: Thu Jan 10, 2019 9:02 pm
by castrogstar
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?

Re: php 5.6 upgrade issues

Posted: Fri Jan 11, 2019 12:22 am
by xxvirusxx
Edit config.php and change from mysql to mysqli

Re: php 5.6 upgrade issues

Posted: Fri Jan 11, 2019 3:55 pm
by pprmkr
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.

Re: php 5.6 upgrade issues

Posted: Sun Jan 20, 2019 7:57 pm
by johnp
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.

Re: php 5.6 upgrade issues

Posted: Tue Jan 22, 2019 10:20 pm
by Elevate
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.