Different PHP versions are used on the same domain. How can this happen?


2016-11-16 13:26:01 UTC


2017-08-16 16:12:09 UTC


Was this article helpful?

Have more questions?

Submit a request

Different PHP versions are used on the same domain. How can this happen?

Applicable to:

  • Plesk 11.x for Windows
  • Plesk 12.0 for Windows


Different PHP versions are used on the same domain.One of our customers have defined PHP 5.4 version for their hosting account in our server.For any reason the customer is able to use different PHP versions on different directories.For example, if you check http://example.com/News/phpinfo.php you can check that's PHP 5.4.* configured. But for the same website (different directory) you can check that another PHP version is used if you go to http://example.com/News/administrator/phpinfo.php

How can this happen? I want to use only PHP 5.4 for the domain.


Different PHP version is configured in the virtual directory (for Windows only).

A virtual directory is a link to an existing physical directory that is present on the server's hard disk. Virtual directories can have a number of specific settings like custom ASP.NET configuration, access permissions, and protection with a password.

Because any virtual directory can have its own settings, including customized ASP.NET configuration, virtual directories are very useful in setting up your web applications, especially those written in ASP.NET. For example, if you have three web applications that use ASP.NET version 1.1, and you need to install one web application that uses ASP.NET version 2.0, you can create a virtual directory for the ASP.NET 2.0 application, configure ASP.NET settings for this directory so as to enable support for version 2.0, and then successfully install the required application.

Read more info in the official documentation .


Configuring PHP for Virtual Directories

To be able to use web applications that require PHP4 or PHP5, you can select the required PHP version for individual virtual directories.

To select PHP version for a virtual directory within a website go to :

Plesk -> Subscriptions -> example.com > Websites & Domains > Virtual Directories > my_dir > PHP Settings

Here different versions can be selected for different directory of the same domain.


Have more questions? Submit a request
Please sign in to leave a comment.