Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I'm using a PHP Script called AutoIndex version 2 and having a few issues with the problems mentioned below.

 

PHP 5.1 and IIS7 by the way.

 

Getting these errors when trying to access the auto index page.

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\inetpub\wwwroot\docs.php:19) in C:\inetpub\wwwroot\autoindex\index.php on line 61

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\inetpub\wwwroot\docs.php:19) in C:\inetpub\wwwroot\autoindex\index.php on line 61

 

Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\wwwroot\docs.php:19) in C:\inetpub\wwwroot\autoindex\index.php on line 618

 

Redirection header could not be sent.

Continue here: ./autoindex/Changes%20to%20PARS.pdf

 

The errors themselves can all be removed as I can just delete the command that is calling for the actions on the mentioned lines - however it doesn't automatically redirect to the correct file and thus the end user has to make an unneccessary click to download the file.

 

Any help would be appreciated, and also if you need any more information just post back and i'll try to reply asap.

Posted
HTTP headers can only be sent once per request. The error says that headers have already been sent by docs.php on line 19 - so the functions that send headers in index.php won't work.
Posted (edited)

Scratch that, it works.

 

Any way around calling the header twice?

 

Sorry for being a pain :)

Edited by Maz
Posted

Still struggling guys, hopefully want to get this finished by today if at all possible.

 

Thanks.

Posted

if you sent any HTML before you set the cookies etc... it wont work.

 

so:

<?php start_session(); ?>

=good

 

<?php start_session(); ?>

=BAD

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...