• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Site specific php.ini-file

jhuedder

Basic Pleskian
Hi,

I would like to turn "register_globals" to ON on some of my clients sites. Is there a way to alter PHP-settings just to specific virtual sites? I am using Plesk 8.6 with PHP5.

Thankx.
 
Should be no problem. PHP offers the possibility to modify ini-Directives in your scripts - or, the better way i think is activate the flag in your apache conf-file of the domain. And even better, modify the PHP-Programm to work without regsiter_globals on ;)

Edit /srv/www/vhosts/<domain>/conf/httpd.include and look for
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/srv/www/vhosts/<domain>/httpsdocs:/tmp"
</IfModule>

And add the following line to the flags:
php_admin_flag register_globals on


Don't forget to reload Apache after ;) :
rcapache2 reload

You could also add a flag to display the errors in the browser, while you're developing:
php_admin_flag display_errors on
 
Back
Top