-
Notifications
You must be signed in to change notification settings - Fork 164
syntax error on PHP 5.2.17, #63
Comments
I think we will not support PHP 5.2. Officially is not supported also 5.3 and 5.4. See: http://php.net/supported-versions.php You can use release of old version 1.0 here: https://github.com/klokantech/tileserver-php/releases |
@daliborjanak is the array() vs [] the only line with problem for compatibility with PHP 5.2+? |
I think yes but hybrid tile support will also not work. We couldn't test it easily. Better to leave old versions of PHP and link to 1.0 in my opinion. This bracket declaration is supported only in PHP >= 5.4 so 5.3 is also out. |
OK. I Agree. We may push this to the checker #48. Ideally - the tileserver.php itself should report what is the problem - if there is one - but only on request for HTML front page and only if it does not significantly slow down the response on default HTML page... |
If you plan on changing the requirements to require something newer than PHP5.2, please change the requirements you documented for it. The webspace I had access to unfortunately was stuck with the quite old 5.2 Currently it reads: "PHP 5.2+ with SQLite module (php5-sqlite)" |
@daliborjanak I am afraid the old PHP happens to be on a many of web hostings for quite some time... Travis #15 seems to support 5.2 as the oldest PHP version. I would be keen to test syntax against HHVM as well. See: https://github.com/travis-ci-examples/php/blob/master/.travis.yml and https://github.com/klokantech/tileserver-php/tree/travis |
Another person with the same problem: |
Bug introduced here https://github.com/klokantech/tileserver-php/blame/master/tileserver.php#L344 To be fixed @daliborjanak |
tileserver.php is not working and ends with a syntax error.
Parse error: syntax error, unexpected '[' in /home/webuser/domains/example.com/public_html/map/tileserver/tileserver.php on line 344
Webhosting uses PHP 5.2.17
I believe the used syntax is only valid from 5.4+ and should be replaced by the array() function.
not working on 5.2:
changed to:
makes is work.
The text was updated successfully, but these errors were encountered: