Htmlaw.php ?
Htmlaw.php ?
Hi,
My code works nicelyon my local server, but when I put it on remote production server I get the following message as response to XHR:
<b>Parse error</b>: syntax error, unexpected '[' in <b>/home/d37109/public_html/LAGVERKTYG/php/lib/Vendor/Htmlaw.php</b> on line <b>39</b>
The remote protocol is https.
What would be the cause for that? Please advice.
Debug: ujopiv
Best Regards,
M
This question has accepted answers - jump to:
This discussion has been closed.
Answers
What version of PHP is your remote server using? Is it the same as your local server?
My guess is that, from the error, the remote server is using PHP 5.3 and doesn't like the
[]
array shorthand that was introduced in 5.4. Given how old and out of support 5.3 is, it would be worth upgrading your PHP.Is that the version of Htmlaw that comes with Editor?
Allan
Thanks for your quick answer, Allan.
I run 5.5.12. The production server runs 5.3.29.
And yes, the version of Htmlaw comes with Editor.
I will contact the server people.
/ M
Could you show me what is on line 39 in the
Vendor/Htmlaw.php
file? In the current release of Editor it is an empty line.What version of Editor are you using? And are you using the PHP libraries that came with that version?
Allan
Thank you for pointing me in this direction.
Without yet getting our webhost to upgrade their php version, I was able to solve the problem by replacing the Htmlaw.php that uses the new way of defining an array. It seems to work fine now.
The old Htmlaw.php line 39 is:
public static $defaultConfig = [
Eric