KurtSome / 2020-GPW-L5K2-E

GPW Group Work
0 stars 0 forks source link

Login system issue #14

Open KurtSome opened 4 years ago

KurtSome commented 4 years ago

When you turn to the login page, there is "Warning: session_start(): Cannot start session when headers already sent in /srv/users/l5k2e/apps/l5k2e/public/customer-system/login.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /srv/users/l5k2e/apps/l5k2e/public/customer-system/customer-system-header.html:1) in /srv/users/l5k2e/apps/l5k2e/public/customer-system/login.php on line 37".

I tried to change the location of session start, I don't know why. The same coding can run my other system. @jslemmer . PS: I updated the new login.php on Github. because I cannot update on issue. And there is link: http://l5k2e.instantcloud.cn/customer-system/login.php.

9sa6c commented 4 years ago

As mentioned before, no HTML is allowed before "session_start()". Make sure there are no blank spaces or any other output before your session_start function

By reading this error message

Warning: Cannot modify header information - headers already sent by (output started at /srv/users/l5k2e/apps/l5k2e/public/customer-system/customer-system-header.html:1) in /srv/users/l5k2e/apps/l5k2e/public/customer-system/login.php on line 37".

I can see that you are outputting "customer-system-header.html" before your session_start function. So re-order your code to always do the php first. Not have HTML first!

image

You are putting HTML on the screen right there, so re-arrange things so that does not happen.