Support / KnowledgeBase

 
Search the KnowledgeBase Search

Reverting PHP5 for (dv) 3.0 after migrating to a (dv) 3.5

  • Applies to: (dv) 3.5, (dv) Nitro

  • Difficulty: Medium

  • Time needed: 15 minutes

  • Tools needed: root, ssh, vi knowledge

 
  • Applies to: (dv) 3.5
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH, root access, vi knowledge

Overview

This article provides a general walkthrough on how to remove the upgrade to PHP5 on a (dv) 3.0 Dedicated-Virtual Server after you have migrated to a (dv) 3.5 Dedicated-Virtual Server.

Instructions

If you were running PHP via suexec

These changes must be made on a per domain basis. You will need to perform the actions below on all domains on which you originally installed PHP5.

  1. SSH into your server as 'root' and execute this command:
    vi /var/www/vhosts/example.com/conf/vhost.conf
  2. Remove these lines from the vhost.conf file that you are editing with 'vi':
    
    AddHandler fcgid-script .php5
    SuexecUserGroup <domain-user> psacln
    <Directory /var/www/vhosts/example.com/httpdocs>
    FCGIWrapper /var/www/vhosts/example.com/bin/php5 .php5
    Options ExecCGI
    allow from all
    </Directory>
    
  3. Execute this command to reconfigure your server and restart the webserver:
    
    /usr/local/psa/admin/sbin/websrvmng -a -v
    

If you were running PHP without suexec

These changes must be made on a per domain basis. You will need to do the below on all domains on which you originally install PHP5.

  1. SSH into your server as 'root' and execute these commands one at a time:
    
    vi /var/www/vhosts/example.com/conf/vhost.conf
    
  2. Remove these lines from the vhost.conf file that you are editing with 'vi':
    
    AddHandler fcgid-script .php5
    <Directory /var/www/vhosts/example.com/httpdocs>
    FCGIWrapper /opt/php51/cgi-bin]/php5 .php5
    Options ExecCGI
    allow from all
    </Directory>
    
  3. Execute this command to reconfigure your server and restart the webserver:
    
    /usr/local/psa/admin/sbin/websrvmng -a -v
    

If you enabled PHP5 for SSL

This section assumes that you had completed one of the sections above and that you have "SSL support" and "Single directory for housing SSL and non-SSL content" enabled in Plesk for that domain:

  1. Make sure you are in the proper directory:
    
    cd /var/www/vhosts/example.com/conf/
    
  2. Copy your new vhost.conf file into "vhost_ssl.conf"
    
    cp vhost.conf vhost_ssl.conf
    
  3. Re-run the reconfigure webserver command.
    
    /usr/local/psa/admin/sbin/websrvmng -a -v
    

This will remove the old PHP5 so your server will use the standard 3.5 version of PHP5.

Sub-domains

In order to remove the old PHP5 on subdomains, you must edit the "vhost.conf" file in each subdomain's conf directory:


/var/www/vhosts/example.com/subdomains/sub.example.com/conf/

Complete the same steps as above, simply change the directory paths to:


/var/www/vhosts/example.com/subdomains/sub.example.com/httpdocs/

You will need to run the "reconfigure webserver" command listed above.


User Comments

No visitor comments posted. Post a comment
Fields marked with an asterisk(*) are required. Comment on this article
Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue