Page 1 of 1

errors on start page for Serendipity

Posted: Mon Nov 13, 2006 3:28 pm
by nappy_d
Hi,

I get the follow error at the top of the Serendipity start page:

Notice: Undefined variable: serendipity in c:\inetpub\wwwroot\serendipity\index.php on line 20

and at the bottom I get:

Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\serendipity\index.php:20) in c:\inetpub\wwwroot\serendipity\index.php on line 27

Yes, I am using IIS :'( on a w2k3 server, with MySQL5 and PHP 4.1

Can anyone help me with this? I have many other open source apps that run just fine.

Thanks!!

Re: errors on start page for Serendipity

Posted: Mon Nov 13, 2006 3:39 pm
by garvinhicking
Hi!

Which serendipity version are you trying?

You should upgrade your PHP. 4.1 is both old and very insecure.

Best regards,
Garvin

Posted: Mon Nov 13, 2006 3:55 pm
by nappy_d
Correction, I am actually running php4.4.2 :oops:

The version of Serendipity is 1.0.3a

When I also click on open login screen I get this:


Notice: Undefined variable: serendipity in c:\inetpub\wwwroot\serendipity\index.php on line 20

Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\serendipity\index.php:20) in c:\inetpub\wwwroot\serendipity\index.php on line 27

Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\serendipity\index.php:20) in c:\inetpub\wwwroot\serendipity\index.php on line 320

Posted: Tue Nov 14, 2006 10:24 am
by garvinhicking
Hi!

Ah! Dang! Now I see it. Your PHP has the verbose error controlling set to on, and is emitting a "Notice" where no real error is happening, and thus preventing some output.

There are two ways to fix this.

1. The proper way, which I have also just committed to serendipity. Open your index.php and just remove those lines:

Code: Select all

if ($serendipity['expose_s9y']) {
    header('X-Blog: Serendipity'); // Used for installer detection
}
2. Another way would be to edit your php.ini file, set the "error_reporting = E_ALL & ~E_NOTICE" flag and restart your webserver.

HTH,
Garvin

Posted: Tue Nov 14, 2006 2:57 pm
by nappy_d
Thanks, I have done that but now these errors appear:
Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\serendipity\index.php:1) in c:\inetpub\wwwroot\serendipity\index.php on line 19

Is there something that I am not doing?

So far all my other opensource apps seem to work fine with php and IIS.

Thanks again for you support!!

Posted: Tue Nov 14, 2006 3:10 pm
by garvinhicking
Hi!

Did you check if you maybe accidentally introduced an empty line at the top of your file in index.php? Before the "<?php" you are not allowed to have any characters! Especially no UTf-8 BOM sequences...so make sure your editor does not insert anything before <?php in index.php.

Best regards,
Garvin

Posted: Tue Nov 28, 2006 6:17 pm
by nappy_d
It is now working. Not sure what happened but I blew away my install about 4 or 5 times before it started working.

Thanks for your tips tho. :)