[pmwiki-users] Beta38: error messages on top of main page

Jonathan Scott Duff duff at pobox.com
Wed Jun 15 09:13:49 CDT 2005


On Wed, Jun 15, 2005 at 09:51:18AM +0200, Daniel Friedmann wrote:
> ===
> Warning: OpenDir: No such file or directory (errno 2) in
> /var/www/spampal.de/htdocs/pmwiki/pmwiki.php on line 613
> 
> Warning: Cannot add header information - headers already sent by
> (output started at /var/www/spampal.de/htdocs/pmwiki/pmwiki.php:613)
> in /var/www/spampal.de/htdocs/pmwiki/pmwiki.php on line 705
> ===
> 
> phwiki.php:
> line 613: $dfp = opendir($dir); if (!$dfp) continue;
> line 705: foreach($HTTPHeaders as $h) (@$sent++) ? @header($h) :
> header($h);
> 
> I remember having seen such errors in some earlier betas but they
> were fixed using one of the last betas. Where and what do I have
> to look for to get these errors fixed or is this a bug of the update?

The second warning is caused by the first if I'm not mistaken. Without
looking at the code, I think you need to make line 613 read as:

	$dfp = @opendir($dir); if (!$dfp) continue;

The @ in front of the opendir will cause php not to carp about the
nonexistent $dir and thus no premature header output.

-Scott
-- 
Jonathan Scott Duff
duff at pobox.com



More information about the pmwiki-users mailing list