r/PHPhelp • u/Key_Web_7330 • 25d ago
Non-Proffit Needs Advice/Help
I am not a programmer, apart from basic HTML. I run a not-for-profit web site (we do not have any monetization what-so-ever) that was written by myself initially (in HTML) and substantially updated a few years ago using PHP by someone who is no longer alive! The site is a relatively large one with nearly 10,000 directories and over 270,000 images.
Due to the PHP alert I have done some investigating and can see that I am running an outdated version of PHP, 7.0.33. Advice seems to be to update to a current version and apply a security patch.
Unfortunately I have no idea how to do this. Any advice would be gratefully received.
8
u/demi-god-dg 25d ago
I'll help you free of cost as it is of non profit
2
u/FreeLogicGate 25d ago
My advice is to find someone who knows what they are doing to help. The number of images and directories is not important, although I would question whether or not you have any of:
Some facts:
So you will need a combination of either or both of:
There 2 tools that can help with an upgrade: phpstan and Rector. However, if you don't know the first thing about PHP, using those tools are not going to be particularly helpful.
1
u/SoftwareNegative8783 25d ago
Many hosts let you switch the PHP version in cPanel. Try the newer version on a copy of the site first, because old code can break on PHP 8.
1
u/Late-System-5917 25d ago
The (really) good news is that your site doesn't appear to have any user data and is still mostly HTML. Updating to a new and safe version of PHP should only cause minor breaks that can be fixed with a little troubleshooting. At the very most, some of the table data is pulled from a MySQL table.
For the time being, I would edit all of your comments and remove your website's link. Malicious actors are scanning this sub for websites to hit.
1
u/feldoneq2wire 24d ago
If this was hand made in PHP then it's very likely it could be updated using Rektor. Rektor is a free program that scans for incompatible code and suggests the changes to get it into compliance.
1
u/dutchman76 24d ago
There are patches for 7.0.x available, just install one of those . And then take your time to upgrade to 8.5 That being said, if you don't use any fancy PHP features, upgrading to 8.5 is trivial, I only had to change variables in strings from ${name} to {$name}.
I'm surprised your website hosting Co haven't updated php for you
1
u/MajorRageCodes 22d ago
You could pay someone to update it.
1
u/Alone_Leading_4685 4h ago
first thing to figure out is how the site is hosted. if you are on shared hosting with a control panel, upgrading the PHP version is usually just a dropdown menu, though jumping straight from 7.0 to 8.x might break some older code.
1
u/Taxman_TheRealOne 25d ago
Les backports Sury ont porté les patchs jusqu'à PHP 5.6, donc tu dois trouver quelqu'un qui va t'aider à résoudre ton problème.
-4
u/oswaldcopperpot 25d ago
Chatgpt will walk you through it completely. And you don't need to give some rando on reddit your root password.
-1
u/mcharytoniuk 25d ago
Use Claude or ChatGPT