SmItH197 / SteamAuthentication

A simple PHP Authentication that enables steam users to log into their steam account to access content!
MIT License
445 stars 145 forks source link

session_start(); Cannot send session cookie #188

Open gobboo opened 7 years ago

gobboo commented 7 years ago

Got these two errors, but I don't know if it's caused by SteamAuthentication Itself:

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/corrupts/public_html/index.php:35) in /home/corrupts/public_html/steamauth/steamauth.php on line 3

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/corrupts/public_html/index.php:35) in /home/corrupts/public_html/steamauth/steamauth.php on line 3

When I try to click login.

Warning: Cannot modify header information - headers already sent by (output started at /home/corrupts/public_html/index.php:35) in /home/corrupts/public_html/steamauth/steamauth.php on line 25

bnicot commented 6 years ago

could you provide some information about your setup ?

got the same error and I think it might comes from the hoster because with the same files I've got no any problems on my personal server.

BlackCetha commented 6 years ago

The error messages are quite clear about what's going wrong: You're already outputting text before the library is included. This happens in your personal index.php that has nothing to do with this library.

You can probably fix that by moving the library import to the top of the file.

bnicot commented 6 years ago

so why is it working with the sames files on my personal host ? and the require is already at the top of the file :/

edit : said shit, i'll test with the require at the top

BlackCetha commented 6 years ago

There are different reporting levels in PHP. You can set them using error_reporting() (http://php.net/manual/en/function.error-reporting.php).

Your local development server might have warnings disabled while your host hopefully has them enabled.

bnicot commented 6 years ago

yup, my bad, I modified some code while viewing it... it was that 👍

since it should be the same thing for @Mobles i think u can mark this as solved

gobboo commented 6 years ago

I solved it ages ago :) Using it for this: corruptservers.co.uk

BlackCetha commented 6 years ago

Please close this issue report then. @Mobles