Support Centre

Changing a Domain's Scripting Settings (Plesk 11)



First, log into your Plesk control panel and then click on Domains from the main menu.

Menu - Domains

Click on the domain that you wish to modify.

Select - Domain

Click Websites & Domains from the tab menu at the top of the page.

Select - Websites & Domains

Domains under this subscription will be at the bottom of the page so scroll down and click on the domain that you would like to configure.

Select - Hosting Domain

From here you can configure which scripting languages your domain can use as well as the statistics logging system, custom error logging and SSL support.

Set - Hosting Settings

Also note that you can configure advanced PHP options under the PHP Settings tab at the top of the page. This will let you change values such as the PHP memory limit, safe mode, max post size and much more.

Advanced PHP Settings

We will only cover the most common options here, the other settings rarely need to be modified so they will be skipped for simplicity.

  • memory_limit - The amount of RAM that each script may use. As this is the allowance for each script and not PHP as a whole, we recommend setting this no-higher than 1/30th the amount of RAM that your server has. This value can be overridden on a per-site and per-script basis anyway if you have special scripts that need much more than your regular site scripts.
  • max_execution_time - This is how long a PHP script may run before it is killed off automatically. This should not be raised too high otherwise scripts that malfunction (and do not finish promptly on their own) may continue using a large amount of resources for some time.
  • max_input_time - Similar to the above, this is how long your PHP scripts may spend working on information that they have been sent.
  • post_max_size - This is the total size allowed for all data on a single post form, for example a contact form, image upload form, etc.
  • upload_max_filesize - Going hand-in-hand with post_max_size, upload max filesize is the maximum allowed size of any one item in your form, for example an image, a file, etc.
  • safe_mode - This option restricts PHP and should always be set to "Off" unless you have good reason to enable it.
  • register_globals - This puts lots of common variables into a super-global. It was used commonly because it could make life easier but it has since been removed from PHP 5.3 (and newer) therefore this option should be left alone. If you need register_globals then you will need to recode your scripts to reference variables a different way.
  • open_basedir - This is a key security feature in that it only allows your website to access files and folders that reside within the folders shown here. If your website needs to access files in a different location to the default then you can add it to the list. By default the list consists of two items, your website's base path and the server's temp folder. When written out fully it would look like this: "/var/www/vhosts/".
  • error_reporting - This lets you select which types of errors are displayed on your pages when PHP encounters a problem. The default should be sufficient.
  • display_errors - Turns error_reporting on or off entirely on your publicly viewable pages. If you're getting error messages on your websites, such as notices and warnings and you would rather just hide them, turn this Off.
  • allow_url_fopen - This option allows PHP to use the fopen function to call in pages or content from external websites. It is disabled by default as it can be seen as a security vulnerability due to its common use in cross site injection attacks.
  • short_open_tag - Allows you to use the PHP short tag to start your PHP code rather than the full start tag. This isn't recommended as it won't always be available, but it may be needed for compatibility with some PHP based software.
  • magic_quotes_gpc - This option has PHP automatically escape certain characters in Post/Get and Cookies. Again, this may required for compatibility with some PHP software, but it is advised against as you should be sanitising the data yourself in a more fail-safe fashion.

Rate This Article

How useful was this article?

Not useful A little useful Useful Very useful Everything I needed