[pmwiki-users] ScriptURL local

Martin Cuno martin.cuno at posteo.de
Mon Nov 11 10:59:47 PST 2024


Yes, thank you very much, that solved the problem.

My query in config.php was:

if($_SERVER['SERVER_ADDR'] == '127.0.0.1') { ...

and this worked in Firefox, but not in Chrome and Edge. In these two browsers, the server address for local operation according to "diag" is:

[SERVER_ADDR] => ::1

(in Firefox actually: [SERVER_ADDR] => 127.0.0.1)

The query

if($_SERVER['SERVER_ADDR'] == 'localhost') { ...

works in Firefox, Chrome and Edge.

Thank you very much and best regards!

Martin


===== Ursprüngliche Nachricht =====
Von: Petko Yotov <5ko at 5ko.fr>
Am: 11.11.2024, 15:37:03 Uhr
Betreff: Re: [pmwiki-users] ScriptURL local

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


-- 
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com



More information about the pmwiki-users mailing list