Hi All,
This may seem like a dumb question.. but here goes..
I have inherited some old php code that I need to maintain on a new server. I've got the code running by turning register_globals on. Not the best I know. But the errors logs are still throwing lots of warnings etc. And occasionally something will cause a record not to update. We never had this issue with the older version.
Does anyone have any suggestions apart from a 'proper' code re-write and turning off warning logging etc?
tks, Will/
OLD PHP Code vs New Server
Moderator: General Moderators
Re: OLD PHP Code vs New Server
Is there a third, practical, way?facets wrote:Does anyone have any suggestions apart from a 'proper' code re-write and turning off warning logging etc?
There's five options:
1. Don't upgrade the server at all. Not really an option I imagine.
2. Upgrade the server hardware, keep all the software the same. (This is what I usually do. I only upgrade to a new version if I really, really have to.)
3. Upgrade the server and try to hack some sort of settings in that appear to work. You'll never be 100% sure the site is working perfectly if you do a quick fix. Definitely not something I'd recommend. But it's the cheap and 'easy' option.
4. Upgrade the server and bug fix like crazy. You don't have to completely rewrite everything if the code works, you just need to fix whatever is throwing the errors. This is the proper solution.
5. Upgrade the server and rewrite the application. It's a solution, but it's pretty daft if you have code you know works elsewhere. You'll probably introduce new problems while you fix old ones.
2 or 4 in my opinion depending on the reason for the server upgrade.
1. Don't upgrade the server at all. Not really an option I imagine.
2. Upgrade the server hardware, keep all the software the same. (This is what I usually do. I only upgrade to a new version if I really, really have to.)
3. Upgrade the server and try to hack some sort of settings in that appear to work. You'll never be 100% sure the site is working perfectly if you do a quick fix. Definitely not something I'd recommend. But it's the cheap and 'easy' option.
4. Upgrade the server and bug fix like crazy. You don't have to completely rewrite everything if the code works, you just need to fix whatever is throwing the errors. This is the proper solution.
5. Upgrade the server and rewrite the application. It's a solution, but it's pretty daft if you have code you know works elsewhere. You'll probably introduce new problems while you fix old ones.
2 or 4 in my opinion depending on the reason for the server upgrade.