Hacks:Engine:PHP vhcp-phpmanager
From VHCP Support
VHCP-PHPMANAGER HACK
I. WHAT IS IT ?
This hack is a new function for application VHCP. It adds a function to the panel of VHCP side customer, the latter making it possible to the users to choose which version of PHP (PHP4 or PHP5) they wish to carry out.
To be able to install this hack, you must have installed application VHCP 1.0 version on a system having a distribution Debian Sarge or Etch or a distribution Ubuntu Dapper Drake (6.06) or Edgy Eft (6.10). You must also have to correct bug TIMESTAMP SOA.
II. Stop VHCP daemon
Before install vhcp-phpmanager, you can stop the vhcp deamon :
/etc/init.d/vhcp_daemon stop
III. Download VHCP-PHPMANAGER hack
To download the latest version of vhcp-phpmanager, you can type this command into shell :
1. Go to /root directory :
cd /root
2. Download the latest vhcp-phpmanager :
wget http://download.nuxwin.com/vhcs/hacks/vhcs-php-manager1.0-beta.tar.bz2
IV. Unpack :
tar -xjf /root/vhcs-php-manager1.0-beta.tar.bz2
V. backup of actual files
/root/vhcs-php-manager1.0-beta/set-backup-files.sh
VI. Update your VHCP installation
apt-get install php5-cgi php5-mysql
apt-get update
VII. Activate of the actions
a2enmod actions
Restart the httpd Apache Serveur :
/etc/init.d/apache2 force-reload
VIII. Install vhcp-phpmanager hack
cp -R /root/vhcs-php-manager-1.0/up/* /
IX. fixed permissions
1. To ENGINE directory :
/var/www/webadmin/engine/setup/set-engine-permissions.sh
2. To GUI directory :
/var/www/webadmin/engine/setup/set-gui-permissions.sh
3. To /ETC/VHCP directory :
/var/www/vhcp/engine/setup/set-vhcp-permissions.sh
Attention : If vous have installed VHCP with apt the below script is not present on your system :
1. /var/www/webadmin/engine/setup/set-engine-permissions.sh ; 2. /var/www/webadmin/engine/setup/set-gui-permissions.sh. You must download this :
1. Go to /var/www/webadmin/engine/setup :
cd /var/www/webadmin/engine/setup
2. Download set-engine-permissions.sh script :
wget http://download.nuxwin.com/vhcs2-2.4.7.1/engine/setup/set-engine-permissions.sh
3. Set permissions to set-engine-permissions.sh :
chmod 0755 set-engine-permissions.sh
4. Download set-gui-permissions.sh script :
wget http://download.nuxwin.com/vhcs2-2.4.7.1/engine/setup/set-gui-permissions.sh
5. Set permission to set-gui-permissions.sh :
chmod 0755 set-gui-permissions.sh
6. And execute this :
/var/www/webadmin/engine/setup/set-engine-permissions.sh
/var/www/webadmin/engine/setup/set-gui-permissions.sh
X. Update database
1. Connect to SQL :
mysql -u root -p
2. Execute this requete for created the domain_phpv field into domain table :
ALTER TABLE `vhcp`.`domain` ADD `domain_phpv` varchar(15) default NULL;
3. Execute this requete for created the subdomain_phpv field into subdomain table :
ALTER TABLE `vhcp`.`subdomain` ADD `subdomain_phpv` varchar(15) default NULL;
4. Quit SQL monitor :
quit
XI. Set default value for the exists domains and subdomains
1. Connect to SQL monitor
mysql -u root -p
2. Select vhcp database :
USE vhcp;
3. Fixed default value for all domain_phpv fileds present into domain table :
UPDATE domain SET domain_phpv='php4';
4. Fixed default value for all subdomain_phpv fields present into subdomain table :
UPDATE subdomain SET subdomain_phpv='php4';
5. Quit SQL monitor :
quit
XII. Regenerate VHCP configuration file
1. Del the /etc/apache2/sites-available/vhcp.conf file :
rm /etc/apache2/sites-available/vhcp.conf
2. Del the /etc/vhcp/apache/working/vhcp.conf file :
rm /etc/vhcp/apache/working/vhcp.conf
3. Copy vhcp_base.tpl file into /etc/apache2/sites-available directory :
cp /etc/vhcp/apache/parts/vhcp_base.tpl /etc/apache2/sites-available/vhcp.conf
4. Copy vhcp_base.tpl file into /etc/vhcp/apache/working directory :
cp /etc/vhcp/apache/parts/vhcp_base.tpl /etc/vhcp/apache/working/vhcp.conf
5. Connect to SQL monitor :
mysql -u root -p
6. Select VHCP database :
USE vhcp
7. Update the domain_status field :
UPDATE domain SET domain_status='change';
8. Update the subdomain_status field :
UPDATE subdomain SET subdomain_status='change';
9. Udapte the alias_status field :
UPDATE domain_aliasses SET alias_status='change';
10. Quit SQL monitor :
quit
11. Execute the vhcp-rqst-mngr program for generate configuration file :
/var/www/webadmin/engine/vhcp-rqst-mngr
12. Restart httpd Apache2 :
/etc/init.d/apache2 restart
13. Start the vhcp daemon :
/etc/init.d/vhcp_daemon start
