Page 1 of 1

PHP 500 error

Posted: Sun Apr 25, 2021 2:55 am
by RAC
Hello all.

I have just had my host transfer my new, (14/3/21) Phoenix installation to another account due to PHP issues with my live Edge shop.

Now my Phoenix site is giving a HTTP error 500 as follows :

[24-Apr-2021 11:33:54 Europe/London] PHP Parse error: syntax error, unexpected '[' in /home/*/retro-antiques-curios.uk/includes/application_top.php on line 39


Line 39 is $result = [ $result ];

Any ideas?

TIA
Shaun

Re: PHP 500 error

Posted: Sun Apr 25, 2021 3:24 am
by ecartz
RAC wrote: Sun Apr 25, 2021 2:55 am[24-Apr-2021 11:33:54 Europe/London] PHP Parse error: syntax error, unexpected '[' in /home/*/retro-antiques-curios.uk/includes/application_top.php on line 39

Line 39 is

Code: Select all

    $result = [ $result ];
The minimum PHP version for Phoenix is 7.0. Your version seems to be 5.3 or older.

Re: PHP 500 error

Posted: Sun Apr 25, 2021 4:36 am
by RAC
Thanks for your reply @ecartz.

The current php is set to 7.3!
How can you see 5,3 or older?
This is for my (.uk) domain, not my live (.co.uk)

Re: PHP 500 error

Posted: Sun Apr 25, 2021 4:59 am
by zipurman
php 5.4 introduced short syntax arrays. Your error shows that php does not support this. You must be running php 5.3 or earlier or this error would not occur.

Re: PHP 500 error

Posted: Sun Apr 25, 2021 5:17 am
by RAC
Thanks both, @ecartz @zipurman
I will get back to my host to find out what is going on.
Shaun

Re: PHP 500 error

Posted: Mon Apr 26, 2021 10:14 am
by RAC
Just for information :

It seems my host used an incomplete name and path within the configure.php files.
Once these were updated the site was visible.

Thanks again for your help.