Gert, Christoph,
I put the original CMS.php back.
I replaced all 9 occurences of "CMSIMPLE_ROOT" with "/" in cmsimple/login.php.
www.haptonomiedommelen.nl : the page is blanc
after installation cmsimple 4.0.3
Re: after installation cmsimple 4.0.3
Rob Zeijen,
Valkenswaard (NL)
Valkenswaard (NL)
Re: after installation cmsimple 4.0.3
Hi Rob,
now the only way is to give me ftp access (PM or mail), so I could make some tests tomorrow,
Gert
now the only way is to give me ftp access (PM or mail), so I could make some tests tomorrow,
Gert
Re: after installation cmsimple 4.0.3
PM sendGert wrote:Hi Rob,
now the only way is to give me ftp access (PM or mail), so I could make some tests tomorrow,
Gert
Rob Zeijen,
Valkenswaard (NL)
Valkenswaard (NL)
Re: after installation cmsimple 4.0.3
Hi Rob, hi Gert,
should be replaced with
But even if this allows the login, I'm quite sure that at least some things will not work (perhaps none of the features or plugins you need, though).
@Gert: IMO the problem is, that in Rob's environment CMSIMPLE_ROOT should sometimes be '/haptonomiedommelen/' and sometimes '/'. For absolute file paths probably the former, for construction of absolute URLs in combination with SERVER_NAME the latter, but for construction of absolute URLs in combination with HTTP_HOST the former.
Perhaps a solution is to change SERVER_NAME and SCRIPT_NAME early in cms.php to what they're supposed to be (I'm not sure, if that has to be considered a dirty hack or a viable solution), and leaving the rest as it is in the original distribution. A simple attempt: (perhaps also using the same preg_replace() for REQUEST_URI and PHP_SELF, in case these are used by plugins)
Christoph
Sorry! My explanation was more than ambigious as I see now. What I meant was, that you should replace "CMSIMPLE_ROOT" with "'/'". For example:roze wrote:the page is blanc
Code: Select all
setcookie('status', 'adm', 0, CMSIMPLE_ROOT);
Code: Select all
setcookie('status', 'adm', 0, '/');
@Gert: IMO the problem is, that in Rob's environment CMSIMPLE_ROOT should sometimes be '/haptonomiedommelen/' and sometimes '/'. For absolute file paths probably the former, for construction of absolute URLs in combination with SERVER_NAME the latter, but for construction of absolute URLs in combination with HTTP_HOST the former.
Perhaps a solution is to change SERVER_NAME and SCRIPT_NAME early in cms.php to what they're supposed to be (I'm not sure, if that has to be considered a dirty hack or a viable solution), and leaving the rest as it is in the original distribution. A simple attempt:
Code: Select all
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
$_SERVER['SCRIPT_NAME'] = preg_replace('~^/[^/]*~', '', $_SERVER['SCRIPT_NAME']);
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: after installation cmsimple 4.0.3
Doesn't work in subsites and second languages, or if you call the site with "domain.tld/subfolder/".cmb wrote: Perhaps a solution is to change SERVER_NAME and SCRIPT_NAME early in cms.php to what they're supposed to be (I'm not sure, if that has to be considered a dirty hack or a viable solution), and leaving the rest as it is in the original distribution. A simple attempt:
Code: Select all
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST']; $_SERVER['SCRIPT_NAME'] = preg_replace('~^/[^/]*~', '', $_SERVER['SCRIPT_NAME']);
For such servers only an individually solution is possible:
Code: Select all
$_SERVER['SCRIPT_NAME'] = str_replace('/haptonomiedommelen', '', $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace('/haptonomiedommelen', '', $_SERVER['PHP_SELF']);
Gert
Re: after installation cmsimple 4.0.3
Thank you Gert.Gert wrote:cmb wrote:
For such servers only an individually solution is possible:
... at first in cms.php,Code: Select all
$_SERVER['SCRIPT_NAME'] = str_replace('/haptonomiedommelen', '', $_SERVER['SCRIPT_NAME']); $_SERVER['PHP_SELF'] = str_replace('/haptonomiedommelen', '', $_SERVER['PHP_SELF']);
Gert
This works for my situation.
Grtz. Rob
Rob Zeijen,
Valkenswaard (NL)
Valkenswaard (NL)