I am having a problem with my PHP files. It seems they do not work correctly on Network Solutions. They told me that I need to update my php files from PHP 4 to PHP 5. I was wondering how I can do this? Im a designer so im not really good when it comes to coding. Please help.Hey there Y2B,
Welcome to the forum. There is a guide for migration from php4 to php5 (<!-- m --><a class="postlink" href="http://www.php.net/manual/en/migration5.php">http://www.php.net/manual/en/migration5.php</a><!-- m -->)
Do you have specific problems that occur?
JWithout understanding what it is about the scripts that are causing them to not work in the new environment, it is impossible for me to give any definite solutions. It is probably not strictly a case of a difference in PHP versions (there are very few - and mostly rare - situations where PHP 4 functions will not work in PHP 5), but rather a difference in configuration settings. One of the most common culprits is register_globals, which in older PHP versions was turned on by default but is now turned off by default. If your scripts depend on that "feature", then you can put in a quick fix by adding the following at the start of each script that requires that functionality:
<?php
import_request_variables('gpc');
?>
Note that this is a "band-aid", and for future compatibility with PHP 6, you will need to actually change the code and remove any dependency on the register_globals behavior (by referencing the applicable values directly from the $_POST, $_GET, or $_COOKIE arrays).
Welcome to the forum. There is a guide for migration from php4 to php5 (<!-- m --><a class="postlink" href="http://www.php.net/manual/en/migration5.php">http://www.php.net/manual/en/migration5.php</a><!-- m -->)
Do you have specific problems that occur?
JWithout understanding what it is about the scripts that are causing them to not work in the new environment, it is impossible for me to give any definite solutions. It is probably not strictly a case of a difference in PHP versions (there are very few - and mostly rare - situations where PHP 4 functions will not work in PHP 5), but rather a difference in configuration settings. One of the most common culprits is register_globals, which in older PHP versions was turned on by default but is now turned off by default. If your scripts depend on that "feature", then you can put in a quick fix by adding the following at the start of each script that requires that functionality:
<?php
import_request_variables('gpc');
?>
Note that this is a "band-aid", and for future compatibility with PHP 6, you will need to actually change the code and remove any dependency on the register_globals behavior (by referencing the applicable values directly from the $_POST, $_GET, or $_COOKIE arrays).