Jump to content

Having A Difficult Time


rltamm

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/268713-having-a-difficult-time/
Share on other sites

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.

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.

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.