How to Turn Off Safe Mode in PHP

PHP is a server side scripting language used on many websites. As such, PHP scripts are often attacked. If the web server that the PHP script is running on has vulnerabilities, it may become compromised. Safe mode restricts functions in an attempt to close off the vulnerabilities. The safe mode setting will be removed in PHP 6.0 because it is not appropriate to solve server security issues at the scripting language level.

Instructions

    • 1

      Create a PHP script that contains the line "<?php phpinfo(); ?>"

    • 2

      Run the script and look for the line that says "Loaded Configuration File => /etc/php5/cli/php.ini". This contains the path to the "php.ini" file.

    • 3

      Open the "php.ini" file in any text editor.

    • 4

      Locate the line with the "safe_mode" variable.

    • 5

      Change the line to say "safe_mode = Off". This will turn off Safe Mode in PHP.

    • 6

      Save and close the file.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured