after login I can't do anything
Re: after login I can't do anything
Hi Rob,
the most important thing is, that the problem is solved and you can go ahead with the website.
About editing the files: you can use whatever editor you prefer. The only requirement for the editor: it has to give the option to store the files as UTF-8 without BOM. I guess all but the simplest editors allow to do so (famous exception: Windows Notepad), perhaps even the editor of your FTP client (you can have a look at its options). Or perhaps you can choose another editor as editor for your FTP client (as is described for FileZilla/Notepad++ here: http://linhost.info/2008/01/notepad-and-filezilla-tip/).
I for myself like editing files online on my server too, instead of download, edit, upload. Fortunately I can do this with my familiar editor (Komodo Edit -- probably a bit heavyweight for occasional editing) by "Open Remote File". A nice alternative too.
Christoph
the most important thing is, that the problem is solved and you can go ahead with the website.
About editing the files: you can use whatever editor you prefer. The only requirement for the editor: it has to give the option to store the files as UTF-8 without BOM. I guess all but the simplest editors allow to do so (famous exception: Windows Notepad), perhaps even the editor of your FTP client (you can have a look at its options). Or perhaps you can choose another editor as editor for your FTP client (as is described for FileZilla/Notepad++ here: http://linhost.info/2008/01/notepad-and-filezilla-tip/).
I for myself like editing files online on my server too, instead of download, edit, upload. Fortunately I can do this with my familiar editor (Komodo Edit -- probably a bit heavyweight for occasional editing) by "Open Remote File". A nice alternative too.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: after login I can't do anything
again the same issue
I made a fresh upload cmsimple 443
the default password works.
when I want to change it in the CMS setting, the back-end menu disappears.
I didn't change anything in a file. Can someone give me advise?
www.psychologiedommelen.nl
I made a fresh upload cmsimple 443
the default password works.
when I want to change it in the CMS setting, the back-end menu disappears.
I didn't change anything in a file. Can someone give me advise?
www.psychologiedommelen.nl
Rob Zeijen,
Valkenswaard (NL)
Valkenswaard (NL)
Re: after login I can't do anything
The problem is that the login cookies are not sent back to the server, so effectively you are not logged in at all.roze wrote:when I want to change it in the CMS setting, the back-end menu disappears.
The details are that the path the cookies are valid for, is wrong. It is /psychologiedommelen/, but it shoud be /. (When I change the cookie this way in the browser manually, I stay logged in.) It is arguable whether this is a deficiency of CMSimple 4.x or of your server's setup. I assume, however, that CMSimple_XH would work on your server.
Anyway, you can use the following quick fix: remove all CMSIMPLE_ROOT parameters to setcookie() in cmsimple/login.php (there are 5 occurences). For instance change line 113 from
Code: Select all
setcookie('status' . str_replace('.','xc6oMd3Rs689',str_replace('index.php','',$sn)), 'adm', 0, CMSIMPLE_ROOT);
Code: Select all
setcookie('status' . str_replace('.','xc6oMd3Rs689',str_replace('index.php','',$sn)), 'adm', 0);
Code: Select all
define('CMSIMPLE_ROOT', $cmsimpleRootVarNew);
Code: Select all
define('CMSIMPLE_ROOT', '/');
Christoph M. Becker – Plugins for CMSimple_XH
Re: after login I can't do anything
Thanks for looking up the old thread.Gert wrote:same old story: http://cmsimpleforum.com/viewtopic.php? ... =60#p32287
One might regard the change in CMSimple 4 as a regression bug.roze wrote:With my "old" cmsimple_XH I had acces to the backend after login in haptonomiedommelen.nl
Christoph M. Becker – Plugins for CMSimple_XH
Re: after login I can't do anything
Thankx,
I used this workaround:
I used this workaround:
Code: Select all
Replace line 53 in cmsimple/cms.php
CODE: SELECT ALL
define('CMSIMPLE_ROOT', $cmsimpleRootVarNew);
with
CODE: SELECT ALL
define('CMSIMPLE_ROOT', '/');
Rob Zeijen,
Valkenswaard (NL)
Valkenswaard (NL)
Re: after login I can't do anything
Nocmb wrote:One might regard the change in CMSimple 4 as a regression bug.
If the site is called "www.anything.tld" - $_SERVER['SCRIPT_NAME'] has to be "/index.php", and not "/anything/index.php".
The real reason for that problem is the wrong handling of multiple domains on "not multiple domain capable" webspace. The result is a wrong $_SERVER['SCRIPT_NAME']. That may cause further problems, when ever $_SERVER['SCRIPT_NAME'] is used in a script, maybe a plugin.
That's why it is the better way to fix $_SERVER['SCRIPT_NAME'] at first in the cms.php:
Code: Select all
$_SERVER['SCRIPT_NAME'] = str_replace('/psychologiedommelen', '', $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace('/psychologiedommelen', '', $_SERVER['PHP_SELF']);
Gert
PS: Hi Rob,
please ask your Provider, why $_SERVER['SCRIPT_NAME'] is "/psychologiedommelen/index.php" on http://www.psychologiedommelen.nl - and not "/index.php", as is should.
Same problem with other server variables ...
Re: after login I can't do anything
RFC 3875, section 4.1.13:Gert wrote:If the site is called "www.anything.tld" - $_SERVER['SCRIPT_NAME'] has to be "/index.php", and not "/anything/index.php".
This is vague, and so does not disallow "/anything/index.php" here.4.1.13. SCRIPT_NAME
The SCRIPT_NAME variable MUST be set to a URI path (not URL-encoded)
which could identify the CGI script (rather than the script's
output). The syntax is the same as for PATH_INFO (section 4.1.5)
SCRIPT_NAME = "" | ( "/" path )
The leading "/" is not part of the path. It is optional if the path
is NULL; however, the variable MUST still be set in that case.
The SCRIPT_NAME string forms some leading part of the path component
of the Script-URI derived in some implementation-defined manner. No
PATH_INFO segment (see section 4.1.5) is included in the SCRIPT_NAME
value.
The PHP manual even says:
According to this "definition" SCRIPT_NAME is likely to be set correctly on Rob's domain (depending on DOCUMENT_ROOT).'SCRIPT_NAME'
Contains the current script's path. This is useful for pages which need to point to themselves. The __FILE__ constant contains the full path and filename of the current (i.e. included) file.
There are, however, solutions that don't rely on SCRIPT_NAME for these purposes (i.e. URL construction).Gert wrote:The real reason for that problem is the wrong handling of multiple domains on "not multiple domain capable" webspace. The result is a wrong $_SERVER['SCRIPT_NAME']. That may cause further problems, when ever $_SERVER['SCRIPT_NAME'] is used in a script, maybe a plugin.
ACK. At least that's better than my former suggestion to fix CMSIMPLE_ROOT.Gert wrote:That's why it is the better way to fix $_SERVER['SCRIPT_NAME'] at first in the cms.php:Code: Select all
$_SERVER['SCRIPT_NAME'] = str_replace('/psychologiedommelen', '', $_SERVER['SCRIPT_NAME']); $_SERVER['PHP_SELF'] = str_replace('/psychologiedommelen', '', $_SERVER['PHP_SELF']);
Christoph M. Becker – Plugins for CMSimple_XH
Re: after login I can't do anything
I've installed CMSimple 4.4.4 Released: 2014-07-21
for a website http://www.praktijkdommelen.com
I've changed in cms.php (because of the problems above):
later I've tried
in both situations I get a blanco page when I want to login (i've already changed the password)
Is there a solution?
for a website http://www.praktijkdommelen.com
I've changed in cms.php (because of the problems above):
Code: Select all
$_SERVER['SCRIPT_NAME'] = str_replace('/praktijkdommelen', '', $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace('/praktijkdommelen', '', $_SERVER['PHP_SELF']);
Code: Select all
Replace line 53 in cmsimple/cms.php
CODE: SELECT ALL
define('CMSIMPLE_ROOT', $cmsimpleRootVarNew);
with
CODE: SELECT ALL
define('CMSIMPLE_ROOT', '/');
Is there a solution?
Rob Zeijen,
Valkenswaard (NL)
Valkenswaard (NL)
Re: after login I can't do anything
Have you tried CMSimple_XH 1.6.2? I suppose that it'll work on your server without the need for any (repeated) customizations.roze wrote:in both situations I get a blanco page when I want to login (i've already changed the password)
Christoph M. Becker – Plugins for CMSimple_XH