How to get domain version and type of PHP using CLI

Refers to:

  • Plesk 11.5 for Windows

Created:

2016-11-16 12:50:58 UTC

Modified:

2016-12-21 19:22:09 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to get domain version and type of PHP using CLI

Symptoms

How, using the CLI, the version and type of PHP setup configured on each site on the server can be found?

Resolution

Domain hosting settings information is located in the psa.hosting table, you may use the following query to get the domain name and corresponding PHP handler information:

"%plesk_dir%\\MySQL\\bin\\mysql.exe" -uadmin -P8306 -p<Plesk_Password_Here> psa

mysql> select d.name,h.php_handler_id from domains d join hosting h on h.dom_id=d.id;
+-------------+----------------+

| name | php_handler_id |
+-------------+----------------+

| example.com | fastcgi-5.3 |
+-------------+----------------+

To update subscription PHP to a newer version the " %plesk_cli%\domain.exe " utility can be used:

"%plesk_cli%\\domain.exe" -u example.com -php_handler_id fastcgi-5.4
Have more questions? Submit a request
Please sign in to leave a comment.