开发者

Upgrading web server from PHP 4 to PHP 5. Any risks for existing websites?

I'm doing a project for a comapny and I ran into a small problem using CakePHP 1.3. I found out that the problem was that the 1&1 hosting they currently have is using PHP 4, and my problem could be easily solved using PHP 5.

In the Control Panel of the hosting there's an option to change the Global PHP version from 4 to 5. However, in the same server where I'm developing this project, this company has a bunch of websites already running (like 8 or so), all of them with a high amount of PHP and MySQL code...

Is there an开发者_StackOverflowy real risk to just switch the PHP version? Because of course I don't want to upgrade and suddently all the other websites stop working.

I don't know if there's an "easy" way to check the code in the server files. Making the switch and then trying everything again would be almost impossible, too much content to try...

Should I just deal with PHP 4? Are they going to have to upgrade no matter what? Any advice for this issue would be great, thank you!


There is definitely a risk of breaking something by simply dropping in PHP5. See the PHP 4 to PHP 5 migration index, most notably, the Backward Incompatible Changes section. Considering that PHP5 came out in, what... 2004? -- I think it's perfectly reasonable to have clients expect that you're going to keep your environment up to date and that clinging to PHP4 prevents you from doing so. In addition, not embracing PHP5 is going to just cause more problems like this as you continue to develop sites with 3rd party libraries that are being kept up-to-date. I.e., if they're expecting more work, this will just continue to happen more and more often.

Edit: Alternatively, if you simply can't switch them to 5, you might be able to get them to start another hosting account and set that one to 5 -- then use that to migrate the sites over one at a time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜