PHP4 and PHP5 |
[eluser]Ngulo[/eluser]
i have read this: CodeIgniter is written to be compatible with PHP 4. Although we would have loved to take advantage of the better object handling in PHP 5 since it would have simplified some things we had to find creative solutions for (looking your way, multiple inheritance), at the time of this writing PHP 5 is not in widespread use, which means we would be alienating most of our potential audience. Major OS vendors like RedHat are moving slowly to support PHP 5, and they are unlikely to do so in the short term, so we felt that it did not serve the best interests of the PHP community to write CodeIgniter in PHP 5. Note: CodeIgniter will run on PHP 5. It simply does not take advantage of any native features that are only available in that version. but which native features are they talking? if my hosting does just stopping supporting PHP4?which problems will returns? thanks guys ![]()
[eluser]danmontgomery[/eluser]
http://www.webmaster-talk.com/php-forum/...-php5.html
[eluser]cahva[/eluser]
AFAIK Ellislabs are slowly dropping support for PHP4 in CI 2.x(atleast the new features) and deprecate old PHP 4 code. Atleast thats what changelog says ![]()
[eluser]Ngulo[/eluser]
thanks guys can you tell me,if i use exclusively User Guide function,will have i any problem using php4 or php5? does all default CI's user guide functions work on both php versions? maybe ,i guess,comes problems when using our personal classes or functions written to work on PHP5? thanks again for supporting me ![]()
[eluser]cahva[/eluser]
Every library and helper in userguide will work in PHP4/PHP5 server. If your site is moved to PHP5 server(hope they dont just upgrade the PHP from version 4 to 5, thats just asking for trouble), it will work(as long as you have upgraded to latest CI). Theres really no bad things when upgrading PHP4 to PHP5. Some ancient/badly written code might not work straight in PHP5, but usually does and is pretty trivial to get working. And you can make sure that the site works with PHP5 by asking your host to setup webspace and temporary address for you to test it out. And if it does, change the site to point to the new server. This is the usual process for us(I work in a hosting company) to make sure the site works in the new server. If your host dont setup you a webspace with temporary address, they are dicks ![]()
[eluser]Ngulo[/eluser]
thanks for the explanation cahva So if I develop on a server with CodeIgniter php4 probably going to php5 should not have problems? is this what you're saying ? if ever I will not use all PHP5's functions will work on php5 the main php4 code, I hope this, because I also heard that comunnity PHP is developing in such a way that php5 seems to remains backwards compatible with php4 .... ![]()
[eluser]cahva[/eluser]
PHP 5 is mainly backwards compatible so you should be ok if you tend to code in todays standards(=dont use register_globals, dont use old $HTTP_POST_VARS etc.. In general, havent used deprecated functions). If you start developing a new site, why start it in PHP4 server anyway? PHP 4 is mostly dead and the support has been dropped a long time ago. CI itself will work if its a recent version. Check PHP changelog for changes regarding your own code. From version PHP 5.3 theres some dramatic changes and many deprecated functions are removed from PHP. Most webhosts(us included) still havent installed PHP 5.3 because of this and use 5.2.x.
[eluser]Ngulo[/eluser]
yeah ,great ,this is the right answer on what i was wondering i've never used old and deprecated variables ,and never using register_globals ![]() the only problem i have found switching from php4 to php5 is the error on sending email php4 : the email were send no problem(why?) php5:i take the error of SFE_MODE restriction but this is a maybe,non seriously problem,cause now i'm on a free hosting and is it impossible to turn ON Safe_mode ,while is possible to turn it On ,on a serious Hosting i hope not taking veru big problems working with CI,for now i'm enjoying it soooooooo much ![]()
[eluser]Ngulo[/eluser]
yes cahva is not a problem ![]() really thanks for supporting me ![]() here is ,just as info, the error i have take with php5 and email library ![]() Code: A PHP Error was encountered Severity: Warning Message: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE Filename: libraries/Email.php Line Number: 1519 |
Welcome Guest, Not a member yet? Register Sign In |