Jump to content

PHP version support


gongpex

Recommended Posts

Hello everyone, I'm work currently using php version 5.1.2, But yesterday I ask on to my web hosting, what version of PHP that supported by them, They answer to me if they support only php version : 4.4.2 and version : 5.3.1 My work already created on php version 5.1.2, should I create my work again on version 5.3.1? if no need to create again, which setting that I must be choosed, 4.4.2 or 5.3.1? Please told me. Thanks

Link to comment
Share on other sites

You dont need to change whole code if you are upgrading version. As previous version are usually compatible with later versions (forward compatibility). You may need to change some setting though. You can check change log of version from php.net and see what is the differences of both version and can decide if it needs to make changes or not. It is always best to be same enviourment of you development server and production server. before deploying your application you should run and test it in you development server with same version of php as is in your host. There is no need to use php 4 anymore. There is reason they upgrade it everytime. why not taking advantage of better php?

  • Like 1
Link to comment
Share on other sites

So I just move my work (code) to hosting on development server, then I test it , whether it's run or not right? Thanks for answer____________________________________________________________________________________ By the way , basedon topic : http://w3schools.invisionzone.com/index.php?showtopic=44722 , how to prevent site from hacked? I use mysql_real_escape_string to prevent it from sql injection, but, Is there another trick to prevent site from hacking?(make our site more secure) please give me advice once again thanks.

Edited by gong
Link to comment
Share on other sites

yes, it is ok. but testing locally would be better specially if your site is a running site. mysql_real_escape_string() good but prepared statement is most secure option to prevent sql injection. sql injection is not the only way. there is many others exploits, you can read them herehttp://owsap.org

Link to comment
Share on other sites

sorry, made typo there. here is the onehttp://owasp.org another one from php official sitehttp://in3.php.net/manual/en/security.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...