[Pmwiki-users] "Undefined index: host" error when creating new pages.

Patrick R. Michaud pmichaud
Tue Sep 9 19:02:36 CDT 2003


Ah, this is a problem that only shows up when PHP is configured to report
all errors (including warnings, via the E_NOTIFY value) -- most PHP
installations aren't configured this way by default.  I generally test
things with E_NOTIFY turned on so that I can catch this error, but
every so often one slips by.

The problem is that new pages don't have a value set for 'host', which
is the address of the host that last edited the page.

I'll fix the warning in 0.5.25--in the meantime, you can eliminate the 
warning by adding the following line to local.php:

   error_reporting(E_ALL ^ E_NOTICE);

This simply turns off E_NOTICE warnings and doesn't affect PmWiki's 
operation.

Pm


On Wed, Sep 10, 2003 at 08:12:03AM +1000, Elindal wrote:
> 
>    To:
>    Ever  since upgrading from 0.5.17 to 0.5.23 and not 0.5.24 I have been
>    having a problem when anyone goes to a page that is not yet defined.
> 
>    At the top of the page the following error is printed
>    "Warning: Undefined index: host in
>    /home/elindal/HTML/pmwiki/pmwiki.php on line 860"
> 
>    This  seems  to be in relation to something failing to be set with the
>    line
> 
>    $page['host'] = $HTTP_SERVER_VARS['REMOTE_ADDR'];
> 
>    but I have checked using phpinfo(); and the
>    $HTTP_SERVER_VARS['REMOTE_ADDR']  is  being  given correctly, the page
>    just errors.
> 
>    This is only happening on this one box, as I can see other people have
>    upgraded without the problem.
> 
>    I  would  think  it  was server related, but it did not happen until a
>    version upgrade was done.
> 
>    I  have  tried removing the local.php file to make sure it was nothing
>    that  I  had  added  with  other  scripts  from  the  CookBook  or any
>    customisations, but it still happened.
> 
>     Has anyone else seen this?
> 
>    Any ideas on what is causing it and how to fix?
> 
> 
> 
>    Richard Canning

> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com




More information about the pmwiki-users mailing list