Installing 2.x on Plesk
Posted: Wed Oct 14, 2015 6:47 pm
Hi there
I have tried to install the unpacked version of CMS 2.0.1.1 on to a Plesk server using the site preview link provided by the Plesk control panel. This is because is a new hosting account on a different server to the customers current website. The "site preview" install link under Plesk would look as follows:
https://some.server.co.nz:8443/sitepreview/http/customer-domain.co.nz/cms-install
I have read that it is better to use a hosts file but this means my client cannot easily test the site out AND still access their own website.
The problems - which are for a Plesk install using a site preview URL were:
1/ First install screen appears but clicking Next gives a page not found. The <form> tag on the page is posting to "/cms-install/index.php". It does not have a server OR the fullpath. So line 27 of class.wizard_step.php needs to include reference to the install path as well.
2/ I hard coded in the full site preview address in to line 27 in an attempt to proceed. This caused a looping effect for screen 2. I discovered that in class.wizard_step2.php there is also a reference to just $_SERVER['REQUEST_URI'] which does not return the complete url
3/ Further research lead me to class.utils.php which handles redirects. It appears under Plesk the variables that are all used are missing:
a) The correct server name - instead of some.server.co.nz:8443 we get customer-domain.co.nz. The base domain of the account
b) The full path to the script - instead of sitepreview/http/customer-domain.co.nz/ we just get /
I cannot work out a simple workaround. One solution could be to provide an overriding BASE url on the first screen. It would normally be ok but in the event of using Plesk and the site preview URL you could override it
PS: I also tried the single PHAR install but it failed through other reasons so I used the unpacked one
PPS: I have not tested this on a cPanel server where you can use ~ in the name.
I have tried to install the unpacked version of CMS 2.0.1.1 on to a Plesk server using the site preview link provided by the Plesk control panel. This is because is a new hosting account on a different server to the customers current website. The "site preview" install link under Plesk would look as follows:
https://some.server.co.nz:8443/sitepreview/http/customer-domain.co.nz/cms-install
I have read that it is better to use a hosts file but this means my client cannot easily test the site out AND still access their own website.
The problems - which are for a Plesk install using a site preview URL were:
1/ First install screen appears but clicking Next gives a page not found. The <form> tag on the page is posting to "/cms-install/index.php". It does not have a server OR the fullpath. So line 27 of class.wizard_step.php needs to include reference to the install path as well.
2/ I hard coded in the full site preview address in to line 27 in an attempt to proceed. This caused a looping effect for screen 2. I discovered that in class.wizard_step2.php there is also a reference to just $_SERVER['REQUEST_URI'] which does not return the complete url
3/ Further research lead me to class.utils.php which handles redirects. It appears under Plesk the variables that are all used are missing:
a) The correct server name - instead of some.server.co.nz:8443 we get customer-domain.co.nz. The base domain of the account
b) The full path to the script - instead of sitepreview/http/customer-domain.co.nz/ we just get /
I cannot work out a simple workaround. One solution could be to provide an overriding BASE url on the first screen. It would normally be ok but in the event of using Plesk and the site preview URL you could override it
PS: I also tried the single PHAR install but it failed through other reasons so I used the unpacked one
PPS: I have not tested this on a cPanel server where you can use ~ in the name.