Jump to content

SOLVED: Can't access to my web site: Parse error: syntax error, unexpected ';', expecting ')'


malcek

Recommended Posts

today something is happened to my store.

At morning my employee handle orders and she was at order detail page and try to change status of order to DELIVERED and first browser has frozen and after that we all get error

Parse error: syntax error, unexpected ';', expecting ')' in /home/veleproda/public_html/katalog/config/defines.inc.php on line 29

I have check this line and it is same as on any other web sites that runs on PrestaShop, but on this domain it won't work. Here is also link to this web site: https://figura-ms.si/katalog/

Now we can't access to BO or FO. I can even enable debugging, because this is first error that has to be handle.

Any suggestion how to solve that?

Martin

PrestaShop ver: 1.7.7.1
PHP ver: 7.2 or 7.3 on both i get same error
 

Link to comment
Share on other sites

Hi 

Bit tricky situation to debug.

Do you have some more info on error, like from hosting error logs or maybe from var/logs folder ?

Sounds maybe like PHP issue so check how it works with PHP 7.1. Also do check .htaccess for

any trace of code that hosting might add with connection to PHP. And in your root folder check

if there are any php.ini and user.ini files.

Link to comment
Share on other sites

I agree, i use prestashop from 2009 and never have such problems.

Last two error from var/logs:

[2021-03-10 19:16:20] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Return value of CartCore::getCartPriceFromCatalog() must be of the type float, null returned" at /home/veleproda/public_html/katalog/classes/Cart.php line 1086 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Return value of CartCore::getCartPriceFromCatalog() must be of the type float, null returned at /home/veleproda/public_html/katalog/classes/Cart.php:1086)"} []

[2021-03-15 09:42:11] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 1 passed to PrestaShop\Module\Ps_metrics\Helper\DataHelper::modifyArrayMainKeys() must be of the type array, null given, called in /home/veleproda/public_html/katalog/modules/ps_metrics/classes/Data/VisitsData.php on line 109" at /home/veleproda/public_html/katalog/modules/ps_metrics/classes/Helper/DataHelper.php line 34 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Argument 1 passed to PrestaShop\\Module\\Ps_metrics\\Helper\\DataHelper::modifyArrayMainKeys() must be of the type array, null given, called in /home/veleproda/public_html/katalog/modules/ps_metrics/classes/Data/VisitsData.php on line 109 at /home/veleproda/public_html/katalog/modules/ps_metrics/classes/Helper/DataHelper.php:34)"} []

 

also .httacess contet

 

httaccess.txt

Link to comment
Share on other sites

Maybe sounds like bad idea but could you try to remove 

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

from end of .htaccess. Just to be sure if that is not source of issues.

Link to comment
Share on other sites

 

39 minutes ago, joseantgv said:

Debug this function

CartCore::getCartPriceFromCatalog

It seems that some data in the database is corrupted.

is it possible to know where to look? I know on which order my employee was when it happened..

Link to comment
Share on other sites

  • malcek changed the title to SOLVED: Can't access to my web site: Parse error: syntax error, unexpected ';', expecting ')'

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...