Maz Posted July 3, 2009 Posted July 3, 2009 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.
Maz Posted July 3, 2009 Author Posted July 3, 2009 Rename to index.php - not that you need telling index.txt
webman Posted July 3, 2009 Posted July 3, 2009 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.
Maz Posted July 3, 2009 Author Posted July 3, 2009 (edited) Scratch that, it works. Any way around calling the header twice? Sorry for being a pain Edited July 3, 2009 by Maz
Maz Posted July 9, 2009 Author Posted July 9, 2009 Still struggling guys, hopefully want to get this finished by today if at all possible. Thanks.
Arcath Posted July 9, 2009 Posted July 9, 2009 if you sent any HTML before you set the cookies etc... it wont work. so: <?php start_session(); ?> =good <?php start_session(); ?> =BAD
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now