PHP 500 error

Ask the community for help and support.
Post Reply
User avatar
RAC
Posts: 35
Joined: Mon Apr 19, 2021 5:36 am
Has thanked: 6 times

PHP 500 error

Post 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
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: PHP 500 error

Post 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.
User avatar
RAC
Posts: 35
Joined: Mon Apr 19, 2021 5:36 am
Has thanked: 6 times

Re: PHP 500 error

Post 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)
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Has thanked: 84 times
Been thanked: 147 times

Re: PHP 500 error

Post 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.
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
User avatar
RAC
Posts: 35
Joined: Mon Apr 19, 2021 5:36 am
Has thanked: 6 times

Re: PHP 500 error

Post by RAC »

Thanks both, @ecartz @zipurman
I will get back to my host to find out what is going on.
Shaun
User avatar
RAC
Posts: 35
Joined: Mon Apr 19, 2021 5:36 am
Has thanked: 6 times

Re: PHP 500 error

Post 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.
Post Reply