[pmwiki-users] ScriptURL local

Petko Yotov 5ko at 5ko.fr
Mon Nov 11 06:37:03 PST 2024


1. Double-check the spelling, there may be a typo somewhere.

2. Do you have index.html or index.php that include pmwiki.php or 
redirect to it? If not, just calling /LGC/ may not automatically load 
pmwiki.php.

3. In Chrome, possibly in Edge, right-click in the URL bar and select 
"Always show full URLs".

4. I'm not sure why you seem to report having
    localhost/pmwiki.php

instead of:
    localhost/LGC/pmwiki.php

and only on Chrome but not on Firefox? This is unexpected.

You can set the $ScriptUrl variable to the correct value in config.php:

Set $EnableDiag = 1; then open pmwiki.php?action=diag

Check what you have as $_SERVER variables on this UwAmp server, there 
should be something like:

   SERVER_NAME or SERVER_ADDR or SERVER_SOFTWARE

that has a different value from the same key on the online website. Then 
you set:

if($_SERVER['SERVER_NAME'] == 'localhost') {
   $ScriptUrl = "http://localhost/LGC/pmwiki.php";
}
else { // online site
// either set the correct one, or leave it as detected
}

Petko


On 11/11/2024 12:51, Martin Cuno wrote:
> Hello everyone,
> 
> a browser question (?): I have mirrors of my sites operated with
> PmWiki on a local server (with UwAmp, similar to XAMPP). The
> config.php is differentiated: if the server address is local, the path
> for $ScriptUrl etc. is something like:
> 'http://localhost/LGC/pmwiki.php'.
> 
> Everything works in Firefox. But Chrome and Edge swallow the directory
> "/LGC/", and so the whole page doesn't work (unless I always manually
> enter "/LGC/" in the address bar). How can that be? There are no such
> problems online.
> 
> Greetings!
> 
> Martin, Siegen, Germany



More information about the pmwiki-users mailing list