Use of php_flag or php_value in .htaccess

If you're on a server with SUPHP enabled, some PHP options in .htaccess files, such as php_flag or php_value may not work. You need to move these into the PHP script itself, using the PHP ini_set() function. For example,

  • change php_flag register_globals On in .htaccess to ini_set("register_globals", "On"); in your PHP script.
  • change php_value include_path "dir1:dir2" in .htaccess to ini_set("include_path", "dir1:dir2"); in your PHP script.

If your PHP script still isn't working, please raise a support ticket and we may be able to help.

Also, note that if your script does indeed need flags such as register_globals switched to on, often updating to a newer version of your script would be a good idea. register_globals can indicate a potentially unsecure script. 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

PHP v4

PHP v4 was officially announced as reaching it's End-Of-Life in July 2007. No more PHP v4...

Error 403 - Forbidden

If you're getting error 403 - Forbidden running your PHP script, the chances are that it's...

Error 500 - Internal Server Error

Usually you get this error when the script you're trying to run isn't owned by yourself or it's...

Using PHP in .html files

If you want to use .html or .htm files but still have it parsed by PHP then you'll need to add a...

PHP Tutorials

We came across these tutorials on PHP and have to say we're impressed! If you want to pick up...