Page 1 of 1
OLD PHP Code vs New Server
Posted: Tue Aug 29, 2006 8:44 am
by facets
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/
Re: OLD PHP Code vs New Server
Posted: Tue Aug 29, 2006 9:01 am
by Oren
facets wrote:Does anyone have any suggestions apart from a 'proper' code re-write and turning off warning logging etc?
Is there a third, practical, way?
Posted: Tue Aug 29, 2006 9:04 am
by facets
I guess that's the question I am asking.
Like a tweak to the php.ini file for example that I don't know about that perhaps might make ensure php 5 acts like it's pre 4.23.
Posted: Tue Aug 29, 2006 9:11 am
by Oren
facets wrote:I guess that's the question I am asking.
I know, and I was asking it again, but as a rhetorical question... since the answer is probably no.
facets wrote:Like a tweak to the php.ini file for example
That would be turning warnings off

Posted: Tue Aug 29, 2006 9:18 am
by onion2k
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.
Posted: Tue Aug 29, 2006 9:20 am
by facets
tks all!
Yup. Option 4 is what I have done. I've fixed most bugs/features, just a few I can;t nail down.