Page 1 of 1

Installing 2.x on Plesk

Posted: Wed Oct 14, 2015 6:47 pm
by utopia
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.

Re: Installing 2.x on Plesk

Posted: Wed Oct 14, 2015 7:21 pm
by calguy1000
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
The REQUEST_URI is the proper server variable to use in redirecting back to the same page again. it should represent exactly the URI that was requested (by definition). If that variable is not populated properly then the first thing I would look at is any rewrite rules and/or redirects that your host is using.

You may have to contact your host about this. I did some googling and found that those 'preview URL's' can be problematic in plesk.

Re: Installing 2.x on Plesk

Posted: Wed Oct 14, 2015 7:23 pm
by Dr.CSS
If you are trying to install a second instance on an existing site account you may want to try the subfolder way of doing it, somesite.com/dev with the /dev being a subfolder in the sites root folder...

I do this when I am doing upgrades, site redesigns, etc. on many sites...

Re: Installing 2.x on Plesk

Posted: Wed Oct 14, 2015 10:26 pm
by utopia
calguy1000 wrote:
You may have to contact your host about this. I did some googling and found that those 'preview URL's' can be problematic in plesk.
I have logged a ticket with the host - time to change to oen still offering cPanel!.

I assume having ~xxxx/ will work in the install of 2.x?

With my hacks I got it installed and also put the full path into $config['ssl_url'] but now the admin page just loops around