sagnik Posted November 10, 2014 Share Posted November 10, 2014 I've a problem with the function "session_register();". When I'm using this function. I'm getting the following message:Warning: Cannotmodify headerinformation - headersalready sent by (outputstarted at /home/sb/public_html/global/admin_header2.php:4) in/home/sb/public_html/admin/login.php on line 75Here is the url of the file "admin_header2.php": www.sbook.ga/global/admin_header2.phpand the file "login.php" is: www.sbook.ga/admin/login.phpPlease help me to resolve the problem. Quote Link to comment Share on other sites More sharing options...
yashrs Posted November 10, 2014 Share Posted November 10, 2014 This means that the output has already been started. Once the output is started you cant send headers. You need to check the 4th line of admin_header2.php. 1 Quote Link to comment Share on other sites More sharing options...
sagnik Posted November 10, 2014 Author Share Posted November 10, 2014 Sir, here is my full "admin_header2.php" file script. <!DOCTYPE html><html lang="en"><head><?phprequire "/home/sb/config/directories.php";require $cnf."refids.php";require $cnf."admins.php";?><link rel="stylesheet" type="text/css" href="/global/styles/admin/global.css"> <script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.min.js"></script><script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.js"></script> <?phprequire "/home/sb/public_html/global/styles/sbook2013.php";?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><title></title></head> <body class="nontouch"><div class="logo"><table cellspacing="0"><td><a href="index.php?refid=2<?php if(isset($sess_id) && !empty($sess_id)) { echo "&sess_id=$sess_id"; }?>"><?php require $global."logos/logo.php";?></a></td><td align="right" valign="bottom" style="width:25%;height:5%"><a class="btn btnS" align="right" href="/members/apanel/register">Sign Up</a></td></table></div>Now tell me where is the problem and how to fix this! Quote Link to comment Share on other sites More sharing options...
wolstech Posted November 10, 2014 Share Posted November 10, 2014 Those HTML tags at the very top should be after the php block. It needs to be like this: <?phprequire "/home/sb/config/directories.php";require $cnf."refids.php";require $cnf."admins.php";require "/home/sb/public_html/global/styles/sbook2013.php";?><!DOCTYPE html><html lang="en"><head><link rel="stylesheet" type="text/css" href="/global/styles/admin/global.css"> <script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.min.js"></script><script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><title></title></head> <body class="nontouch"><div class="logo"><table cellspacing="0"><td><a href="index.php?refid=2<?php if(isset($sess_id) && !empty($sess_id)) { echo "&sess_id=$sess_id"; }?>"><?php require $global."logos/logo.php";?></a></td><td align="right" valign="bottom" style="width:25%;height:5%"><a class="btn btnS" align="right" href="/members/apanel/register">Sign Up</a></td></table></div> 1 Quote Link to comment Share on other sites More sharing options...
sagnik Posted November 10, 2014 Author Share Posted November 10, 2014 Ok, I've fixed the problem. Now I am seeing that, my "login.php" file is not working. The form inside the "login.php" file is not sending any data. Can you tell me why this happens and how to redirect logged users to another page with the "sess_id=sess_id"? Please check the "login.php" file at: http://www.sbook.ga/admin/login.php Quote Link to comment 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.