after installation cmsimple 4.0.3

Questions about how to install and problems installing - please read the documentation first!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: after installation cmsimple 4.0.3

Post by cmb » Sun Dec 09, 2012 11:43 am

Hi Rob, hi Gert,
Gert wrote:No, the cookie path should be "/", if you login to haptonomiedommelen.nl,
Yes, of course you're right.

I just wanted to do some debugging by echoing the relevant $_SERVER variable from the template. But after saving I can't log in to the site anymore (via the direct URL, not the redirected):
Language config file ./cmsimple/languages/enconfig.php missing
@Rob: could you please fix the template. I've inserted one line directly above </body> at the end of the template. Please delete this line via FTP, or upload the template(s) again.

I've just seen your latest post. Perhaps we were working in parallel. If everything works now, of course you don't have to upload the template again.

@Gert: I guess the following is happening. When the installation is browsed via http://www.haptonomiedommelen.nl/, REQUEST_URI is "/", but SCRIPT_NAME is something like ".../haptonomiedommelen/index.php". The latter causes CMSimple 4 (and probably CMSimple_XH on IIS) to set CMSIMPLE_ROOT wrongly. Regarding those redirects the use of SCRIPT_NAME should be avoided at all for setting CMSIMPLE_ROOT.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: after installation cmsimple 4.0.3

Post by Gert » Sun Dec 09, 2012 12:01 pm

cmb wrote:but SCRIPT_NAME is something like ".../haptonomiedommelen/index.php".
And that's wrong, SCRIPT_NAME should be "/index.php", if you call the domain directly. So it is on my and the most servers, if the domain is moved permanently to a folder,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: after installation cmsimple 4.0.3

Post by Gert » Sun Dec 09, 2012 12:26 pm

Hi Rob,

could you give me the password (PM) for some further tests? (1-2 hours)

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: after installation cmsimple 4.0.3

Post by cmb » Sun Dec 09, 2012 2:34 pm

Hi Gert, hi Rob,

a file containig the following might suffice to get the relevant information:

Code: Select all

<?php phpinfo(); 
This file should be placed in the installation folder right beside index.php. The file name doesn't matter, but it's better to keep it secret and sent it only via PM.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

roze
Posts: 270
Joined: Tue Jun 03, 2008 7:13 am
Location: NL
Contact:

Re: after installation cmsimple 4.0.3

Post by roze » Sun Dec 09, 2012 6:08 pm

Gert wrote:Hi Rob,

could you give me the password (PM) for some further tests? (1-2 hours)

Gert

PM has been send.
Rob Zeijen,

Valkenswaard (NL)

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: after installation cmsimple 4.0.3

Post by Gert » Sun Dec 09, 2012 7:05 pm

Hi Rob,

thanks for allow me to do some tests.

I have found following:

In case of calling the domain "haptonomiedommelen.nl", the server gives a wrong "$_SERVER['SCRIPT_NAME']" ("/haptonomiedommelen/index.php" instead of "/index.php").

So "CMSIMPLE_ROOT" also is wrong, because it is based on "$_SERVER['SCRIPT_NAME']".

Using "$_SERVER['REQUEST_URI']" for CMSIMPLE_ROOT is not a good idea, because "$_SERVER['REQUEST_URI']" includes the QUERY_STRING.

You should ask your provider, why "$_SERVER['SCRIPT_NAME']" is "/haptonomiedommelen/index.php" in case of calling the domain "haptonomiedommelen.nl", it should be "/index.php",

Gert

PS: A wrong CMSIMPLE_ROOT also can make problems with some plugins using CMSIMPLE_ROOT
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: after installation cmsimple 4.0.3

Post by cmb » Sun Dec 09, 2012 7:19 pm

Hi Gert,

what is the value of $_SERVER['PHP_SELF']? I assume it identical to $_SERVER['SCRIPT_NAME'], but I'm not sure.
Gert wrote:Using "$_SERVER['REQUEST_URI']" for CMSIMPLE_ROOT is not a good idea, because "$_SERVER['REQUEST_URI']" includes the QUERY_STRING.
Yes. But the QUERY_STRING can be removed. That's done to determine $sn since at least CMSimple 2:

Code: Select all

$sn = preg_replace('/([^\?]*)\?.*/', '\1', sv(($iis ? 'SCRIPT_NAME' : 'REQUEST_URI'))); 
The greater problem is, that REQUEST_URI isn't available on IIS (at least on unpatched older versions); hence the fallback to SCRIPT_NAME in the code.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

roze
Posts: 270
Joined: Tue Jun 03, 2008 7:13 am
Location: NL
Contact:

Re: after installation cmsimple 4.0.3

Post by roze » Sun Dec 09, 2012 7:54 pm

Gert wrote: You should ask your provider, why "$_SERVER['SCRIPT_NAME']" is "/haptonomiedommelen/index.php" in case of calling the domain "haptonomiedommelen.nl", it should be "/index.php",
I've send a e-mail to my provider.
Rob Zeijen,

Valkenswaard (NL)

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: after installation cmsimple 4.0.3

Post by Gert » Mon Dec 10, 2012 12:55 am

cmb wrote:what is the value of $_SERVER['PHP_SELF']? I assume it identical to $_SERVER['SCRIPT_NAME'], but I'm not sure.
The same problem ("/haptonomiedommelen/index.php" instead of "/index.php"),

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: after installation cmsimple 4.0.3

Post by cmb » Mon Dec 10, 2012 2:04 pm

Hi Gert,

thanks for the info. :) So it's probably best to wait for the reply of Rob's hosting provider.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply