i have an old PHP/MySQL Project developped by php 5.6 and i want to know if the website will be hosted correctly even if the version is old
Asked
Active
Viewed 319 times
1
-
1It will be insecure but you should be able to. Have you tried it and had issues? – user3783243 Aug 05 '22 at 14:53
-
thanks ill try and security its not very important for this website because its just a class project so i just need it to work properly – El Arabi Youssef Aug 05 '22 at 15:06
-
1Should let instructor know resources being used are outdated, ~8 years old. – user3783243 Aug 05 '22 at 15:15
-
See also: [Proper steps to migrate PHP 5.6 code into PHP 7.3](https://stackoverflow.com/q/56354257/) – joeljpa Aug 10 '23 at 06:12
-
And: [PHP 5.6 isn't supported with security, So Why PHP 5.6 is not deprecated yet?](https://stackoverflow.com/q/57052031/) – joeljpa Aug 10 '23 at 06:17
1 Answers
3
tl;dr: No.
PHP 5.6 is an unsupported branch. It has not received security updates since 2018. If you run a server using PHP 5.6 then it may be vulnerable to attack.
Every supported version of PHP is has a different major version. At the time of writing, only PHP 8.x has active support.
Major versions often remove features from PHP. The mysql_*
extension is a prime example. Lots of PHP 5.x code uses it and it was removed entirely in PHP 7.
Code written for PHP 5.6 might not run on currently supported versions of PHP.

Quentin
- 914,110
- 126
- 1,211
- 1,335
-
1I think we could assume that he'll run it on some 5.x version, not 7.x. – Barmar Aug 05 '22 at 14:54
-
1@Barmar — Given most cheap hosting will have a supported version of PHP, trying to run it on a modern PHP is also likely. That's why I covered both cases. – Quentin Aug 05 '22 at 14:56
-
@Quentin is there any sollution to host this old website without editing the code ? – El Arabi Youssef Aug 05 '22 at 15:02
-
@ElArabiYoussef — Not without the aforementioned problems. You can ignore the problems, but you'll need to take them into account when doing the risk assessment. – Quentin Aug 05 '22 at 15:03
-
@Quentin the security is not very important for this website because is just a class project i just need it to be hosted and work properly – El Arabi Youssef Aug 05 '22 at 15:07
-
1@ElArabiYoussef — It wouldn't be good if your class project was compromised in such a way that the attacker gets to execute arbitrary code on your server and then use it as the attack point for further attacks against other targets that would be traced back to you. (Just because your data isn't important doesn't mean that security isn't). – Quentin Aug 05 '22 at 15:08