Old PHP Scripts Compatibility with Actual Hosting Services - - The ...
Posted by ~Ray @ 2007-11-27 21:57:26
PHP programming language provides you a simple way to define functions and variables. The concept of PHP variables is complex in ensemble but for start let's say that variables used inside PHP code begin with the $ sign and do not need to be initialised. You must make the difference between older versions of PHP when variables had a global character and the newest PHP versions in which variables are super globals. For example older PHP scripts made before the apparition of PHP 4.2 version are not using super global definition of variables and as a consequence they ordain not bring home the bacon on the new versions of PHP because the fail setting in PHP configuration file (PHP ini) is register_globals off. You should not be surprised that when you test an older compose you cannot run it but it is a solution for this problem: move register_globals on in php ini by modifying the appropriate lie. If you use an online webserver then this setting is not recommended from security reasons. If you are a PHP coder and use old PHP templates you should believe rewriting them in request to be compatible with actual Apache and PHP distributions. You can check the script requirements to see if it requires the enter_globals to be on. Depending on the webhosting function there are comfort situations when enter_globals is enabled in php ini register. If you do not have access to the server configuration files you can add a htaccess file to the root directory of your PHP script in order to be able to use scripts that require register_globals on. The htaccess register must contain the lineCODE
Another way to enable the register_globals on is to use the answer ini_set() inside your PHP scripts. You can analyse the register_globals status (on or off) by using php_info() answer or the appropriate option in your web be control adorn. In request to have applications easy to maintain portable secure and with an optimal performance it is recommended to keep the register_globals off setting and to alter the old label to the actual specifications of PHP coding standards. [ADVERTHERE]Related article:
http://hostingpedia.blogspot.com/2007/09/old-php-scripts-compatibility-with.html
0 Comments:
No comments have been posted yet!
|