espinosaluis / TrackMeViewer

Web viewer for TrackMe app compatible with Android, Windows Phone and Windows Mobile clients
MIT License
15 stars 12 forks source link

Supported PHP versions #78

Open xZise opened 8 years ago

xZise commented 8 years ago

Which version of PHP should this support? The main reason is that when I develop something, it might not work on older systems. According to https://secure.php.net/supported-versions.php only 5.5 and up are actually supported (although 5.5 is almost at its end).

Now it does not support PHP 7 at the moment as there are still files which use the deprecated mysql_ commands (e.g. your recently added cloud.php). The replacement I've been introducing, PDO, is supported since PHP 5.1. And then language.php is now reading JSON files which needs json_decode. That has been introduced in 5.2, so I'd say that the lowest version number we could support. There might be code somewhere else which requires newer versions though.

espinosaluis commented 8 years ago

Unfortunately my host uses 5.3 and they don't have plans to update to 7 yet. It seems I could update to 5.4 though but I need to contact them. Let's stick to 5.3 for now.

xZise commented 8 years ago

Well PHP 7 won't work as there are still mysql_ commands which have been removed. But I'm currently working on requests.php and then only cloud.php is remaining.

And 5.3 for now seems reasonable. This will make it easier for me to know if I can use a feature or not. Unfortunately password_hash and password_verify have been introduced in PHP 5.5 (see #2).

On another note, do you think it is sensible to update to 5.4? Do you have legacy code which needs 5.4 because otherwise updating to 5.5 or even 5.6 seems more sensible as 5.4 is already not supported anymore so it wouldn't be really an upgrade (but obviously this is your responsibility).

espinosaluis commented 8 years ago

If you think that's the case (I don't know anything about PHP versions) I will have to wait until they decide to update to 5.5 or 5.6. I'm actually surprised why they go so behind while 7 is already out.

xZise commented 8 years ago

Well Ubuntu 12.04 is still using 5.3 as well. But they are probably backporting the security patches.