[pmwiki-users] Redundant logins

Petko Yotov 5ko at 5ko.fr
Sun Feb 6 14:12:00 CST 2011


On Sunday 06 February 2011 19:16:51, Kenneth Forsbäck wrote :
> "Warning: Cannot modify header information - headers already sent by
> (output started at /usr/local/apache2/htdocs/nevereasy/index.php:1) in
> /usr/local/apache2/htdocs/nevereasy/pmwiki.php on line 1126"

The usual cause for this warning is that some of your PHP files have a space 
or a new line either before the first "<?php" marker, or after the closing 
"?>". 

The "<?php" marker should be the very first thing in your *.php files. Make 
sure your text editor saves the php file in the encoding "UTF-8 without Byte 
order mask (BOM)".

The "?>" is not required when the file contains only PHP code not mixed with 
HTML and in this case it is recommended to remove it (this way are all pmwiki 
scripts).

This warning may mean that PmWiki is unable to send a cookie, in which case 
you will be unable to stay logged in.

> Next I made a fresh install on the remote server, with no other
> modification than the config.php:
> 
> <?php
> if(!defined("PmWiki")) {
>      exit();
> }
> $DefaultPasswords["edit"] = crypt("secret");
> include_once("scripts/xlpage-utf-8.php");
>
> The same problem persists. Seems like the problem lies with the
> provider, I just don't know what it could be.

Is this version 2.2.23 or 2.2.19?? If 2.2.19 still works, we should search the 
error in PmWiki, otherwise it is probably a server problem.

If the Warning problem above is fixed but it still doesn't work, and if you 
haven't tested the code that I suggested for a custom session directory, you 
can test it now.

Petko

> >>> Last problem that I think of is something could have caused the
> >>> "session.save_path" directory to become write-protected. This is rare -
> >>> could be a disk-full problem or a server/PHP misconfiguration. It
> >>> should be possible to select your own directory for the session data
> >>> near the beginning of config.php:
> >>>     $SessionDir = "$WorkDir/.sessions";
> >>>     mkdirp($SessionDir);
> >>>     fixperms($SessionDir);
> >>>     session_save_path($SessionDir);
> >>>     unset($SessionDir);



More information about the pmwiki-users mailing list