Styles2304 Posted August 17, 2007 Share Posted August 17, 2007 so here it is: <?php include "auth.inc.php"; include "conn.inc.php"; if ($_SESSION['logging_out'] == 1) { session_start(); session_unset(); session_destroy(); header("Refresh: 1; URL=../index.html"); } else { ?> <html> <head> <title>Control Panel</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <LINK REL=StyleSheet HREF="style.css" TYPE="text/css"> </head> <frameset cols="25%,75%"> <frame src="links.php" name="left" noresize> <frame src="main.php" name="right" noresize> </frameset> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> </body> </html> <?php } ?> The unexpected end is at the </html> . . . I'm a little confuseled. Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/ Share on other sites More sharing options...
wildteen88 Posted August 17, 2007 Share Posted August 17, 2007 That code seems to be fine. I get no errors. Prehaps the error is coming from another file, prehaps one of the includes Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327061 Share on other sites More sharing options...
Hyssar Posted August 17, 2007 Share Posted August 17, 2007 just to find where is the error, try echoing the HTML part with an here_doc Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327062 Share on other sites More sharing options...
NArc0t1c Posted August 17, 2007 Share Posted August 17, 2007 Or an easy way to find out as well, my technique, <?php echo '1'; include "auth.inc.php"; echo '2'; include "conn.inc.php"; echo '3'; obviously it won't get to 3. : ) Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327080 Share on other sites More sharing options...
Styles2304 Posted August 17, 2007 Author Share Posted August 17, 2007 Ok, I tried what NArc0t1c said . . . and this is the result: 1 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/styles/public_html/wcontrol/index.php:2) in /home/styles/public_html/wcontrol/auth.inc.php on line 2 23 Here's the code code for auth.inc.php: <?php session_start(); if ((isset($_SESSION['user_logged']) && $SESSION['user_logged'] != "") || (isset($_SESSION['user_password']) && $_SESSION['user_password'] != "")) { //Do Nothing } else { $redirect = $_SERVER['PHP_SELF']; header ("Refresh: 3; URL=../login.php?redirect=$redirect"); echo "You are not currently logged in, you are being redirected to the login page. <br>"; echo "(If your browser doesn't support this, <a href=\"../login.php?redirect=$redirect\">click here</a>)"; die (); } ?> Oy, this is where stuff starts getting over my head. Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327104 Share on other sites More sharing options...
AndyB Posted August 17, 2007 Share Posted August 17, 2007 FYI - the error message you reported is symptomatic of an unclosed loop somewhere is the code. Look for a missing curly brace closer } Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327105 Share on other sites More sharing options...
Styles2304 Posted August 17, 2007 Author Share Posted August 17, 2007 There really isn't much need in this case for that . . . I mean I didn't put in any "advanced" code, I was just trying to make it so if you hit logout, it sets a session variable, reloads the page without frames, then redirects you back to the initial home/login page. Everything works 100% correctly without the code to make it do that . . . so does anyone have any ideas why the code that I entered and the code in auth.inn.con conflict? Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327122 Share on other sites More sharing options...
Styles2304 Posted August 18, 2007 Author Share Posted August 18, 2007 as quick fix to this . . . does anyone know how to make a link that is contained in a frame open in the entire window? Quote Link to comment https://forums.phpfreaks.com/topic/65502-yet-another-syntax-error-unexpected-end/#findComment-327251 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.