rltamm Posted September 23, 2012 Share Posted September 23, 2012 (edited) I downloaded a PHP login & redirect from http://www.mpdolan.com/downloads.php they unfortunately do not have a HELP guide or anything to troubleshoot the errors that may occur. after install you are asked to copy and create a config.php and add a PHP code to any page you wish to have login protection. Here is my problem I am getting this error. Warning: Cannot modify header information - headers already sent by (output started at /home/content/76/8773476/html/eahtml/studentcenter.php:1) in /home/content/76/8773476/html/eahtml/studentcenter.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /home/content/76/8773476/html/eahtml/studentcenter.php:1) in /home/content/76/8773476/html/eahtml/studentcenter.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /home/content/76/8773476/html/eahtml/studentcenter.php:1) in /home/content/76/8773476/html/eahtml/studentcenter.php on line 6 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/76/8773476/html/eahtml/studentcenter.php:1) in /home/content/76/8773476/html/eahtml/studentcenter.php on line 9 I have looked and cannot find "white areas" in the following code If I remove the "header " sections from the script i am to add on each page.. the script clearly comes with no errors.. so it mush be in it... When i get the script running without header info I get a loop... goes right back to log-in not to the redirect page... [/background][/size][/font][/color] <?php //prevents caching header("Expires: Sat, 01 Jan 2000 00:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Cache-Control: post-check=0, pre-check=0",false); session_cache_limiter(); session_start(); require('config.php'); require('functions.php'); //this is group name or username of the group or person that you wish to allow access to // - please be advise that the Administrators Groups has access to all pages. if (allow_access(Administrators) != "yes") { include ('no_access.html'); exit; } ?> [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=3][background=rgb(231, 234, 239)] If more info is needed please ask i can provide anything i have or know. Edited September 23, 2012 by rltamm Quote Link to comment https://forums.phpfreaks.com/topic/268713-having-a-difficult-time/ Share on other sites More sharing options...
scootstah Posted September 24, 2012 Share Posted September 24, 2012 As the error occurs at column 1, it is most likely a Byte Order Mark issue. A Byte Order Mark is a hidden character that is inserted at the beginning of the text stream when using a Unicode encoding. Some possible solutions is to turn off BOM (Byte Order Mark) in your editor, or save the files with a different encoding such as ANSI. Quote Link to comment https://forums.phpfreaks.com/topic/268713-having-a-difficult-time/#findComment-1380472 Share on other sites More sharing options...
requinix Posted September 24, 2012 Share Posted September 24, 2012 Also make sure there is absolutely nothing before the opening <?php. No whitespace, no HTML, no BOM as scootstah pointed out, nothing. Quote Link to comment https://forums.phpfreaks.com/topic/268713-having-a-difficult-time/#findComment-1380477 Share on other sites More sharing options...
Christian F. Posted September 24, 2012 Share Posted September 24, 2012 It's all explained in the thread "HEADER ERRORS, which is pinned at the top of this forum. A thread you should have read before starting this topic, to be honest. PS: Don't play around with the fonts and/or backgrounds, it only makes your posts harder to read and thus makes people less interested in helping you out. Quote Link to comment https://forums.phpfreaks.com/topic/268713-having-a-difficult-time/#findComment-1380504 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.