Jump to content

Header problem


briansykes

Recommended Posts

I've looked everywhere for hours on end trying to fix this annoying problem i'm getting these warnings:

 

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/session.php:26) in /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/login.php on line 16

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/session.php:26) in /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/login.php on line 17

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/session.php:26) in /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/login.php on line 18

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/session.php:26) in /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/login.php on line 19

 

I cant fix this i've tried forever everything that forums have said doesnt work the lines of code are the following.

 

setcookie("punch_id", $_SESSION[punch_id], time()+(3600*24*365));

setcookie("punch_nick", $_SESSION[punch_nick], time()+(3600*24*365));

setcookie("punch_pass", $_SESSION[punch_pass], time()+(3600*24*365));

setcookie("punch_rights", $_SESSION[punch_rights], time()+(3600*24*365));

Link to comment
https://forums.phpfreaks.com/topic/111549-header-problem/
Share on other sites

Output buffering doesnt work i tried and removing everything before it would make the script function incorrectly.  I've tried both with no success the cookies will not save.  There is no html of echo functions in this script its all php and its a login script check password versus db and such.

Link to comment
https://forums.phpfreaks.com/topic/111549-header-problem/#findComment-572554
Share on other sites

Start by reading the error messages. They tell you where the output occurred -session.php:26 (line 26) that is preventing your headers from working in login.php on line 16.

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/session.php:26) in /mnt/target02/348038/www.harveststudio.ca/web/content/punchclock/login.php on line 16
Link to comment
https://forums.phpfreaks.com/topic/111549-header-problem/#findComment-572559
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.