Overriding PHP settings

You’re migrating your site to your brand new Plesk server and your site doesn’t behave like it should. This is probably because of the default PHP settings that Plesk enforces.
Examples are safe_mode and magic_quotes_gpc.
Here’s how to take care of that:

First, you need to create or edit the vhost.conf file for the domain:
The file is located at /home/httpd/vhosts/<domainname>/conf/vhost.conf
Create a <Directory> entry like so:

 <Directory "/home/httpd/vhosts/<domainname>/httpdocs">  

To disable safe_mode enter the following line inside the directive:
php_admin_flag safe_mode off
To toggle magic_quotes_gpc add:
php_admin_flag magic_quotes_gpc [on/off]
Now run the following commmand:
/usr/local/psa/admin/bin/websrvmng -a -v
Now all you need to do is restart apache.