Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.