abhishekdeveloper Posted February 19, 2012 Share Posted February 19, 2012 Hi Guys, I am building this website for experimental data collection. I am getting the below error at the bottom of the website but don't know how it has creep-ed in. Kindly help me out in this issue. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/computat/public_html/b2.php:199) in /home/computat/public_html/_config-rating.php on line 21. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id='b2'' at line 1 My _config-rating.php file is: <html> <head> <title> Do you Like/Dislike this image? </title> </head> <body> <h1> Do you Like/Dislike this image? </h1> <form name="form1" method ="post"> <input type="submit" name="Like" value="Like"> <input type="submit" name="Dislike" value="dislike"> </form> </body> </html> <?php session_start(); ob_start(); $host="localhost"; $username="computat_abhi"; $password="1123581321"; $databasename="computat_button"; $tbl_name="record"; $db=mysql_connect ("localhost", "computat_abhi", "1123581321")or die(mysql_error()); mysql_select_db($databasename, $db) or die(mysql_error()); if( isset($_POST['Like']) ) { $sql = 'INSERT INTO record(ImageNumber,LikeCounter) VALUES (\'b1\', 1)'; mysql_query($sql, $db) or die(mysql_error()); echo 'Like vote was registered'; } elseif(isset($_POST['Dislike'])){ $sql = 'INSERT INTO record(ImageNumber,DislikeCounter) VALUES (\'b1\', 1)'; mysql_query($sql, $db) or die(mysql_error()); echo 'Dislike vote was registered'; } Please help me out as soon as possible. Thanks ob_end_flush(); ?> Please help me out Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/ Share on other sites More sharing options...
livethedead Posted February 19, 2012 Share Posted February 19, 2012 Headers have to be sent before any output. Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/#findComment-1318984 Share on other sites More sharing options...
Pikachu2000 Posted February 19, 2012 Share Posted February 19, 2012 http://www.phpfreaks.com/forums/index.php?topic=37442.0 Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/#findComment-1318993 Share on other sites More sharing options...
abhishekdeveloper Posted February 19, 2012 Author Share Posted February 19, 2012 Thanks Pikachu, solves my warning problem. However, the following error still remains: (You can go to http://www.computationalphotography.in/b2.php and check it out[\url] Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id='b2'' at line My modified code is: <?php ob_start(); $host="localhost"; $username="computat_abhi"; $password="1123581321"; $databasename="computat_button"; $tbl_name="record"; $db=mysql_connect ("localhost", "computat_abhi", "1123581321")or die(mysql_error()); mysql_select_db($databasename, $db) or die(mysql_error()); if( isset($_POST['Like']) ) { $sql = 'INSERT INTO record(ImageNumber,LikeCounter) VALUES (\'b1\', 1)'; mysql_query($sql, $db) or die(mysql_error()); echo 'Like vote is registered'; } elseif(isset($_POST['Dislike'])) { $sql = 'INSERT INTO record(ImageNumber,DislikeCounter) VALUES (\'b1\', 1)'; echo 'Dislike vote is registered'; mysql_query($sql, $db) or die(mysql_error()); } ob_end_flush(); ?> <html> <head> <title> Do you Like/Dislike this image? </title> </head> <body> <h1> Do you Like/Dislike this image? </h1> <form name="form1" method ="post"> <input type="submit" name="Like" value="Like"> <input type="submit" name="Dislike" value="dislike"> </form> </body> </html> http://www.phpfreaks.com/forums/index.php?topic=37442.0 Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/#findComment-1319018 Share on other sites More sharing options...
Pikachu2000 Posted February 19, 2012 Share Posted February 19, 2012 There is nothing in that code that would generate that error. Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/#findComment-1319019 Share on other sites More sharing options...
abhishekdeveloper Posted February 19, 2012 Author Share Posted February 19, 2012 Is there something in this code which is calling _config-rating.php to generate the voting system. Note the webpage address is http://www.computationalphotography.in/b2.php[\url] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="tehtml; charset=ISO-8859-1"> <META NAME="Generator" CONTENT="NetObjects Fusion Essentials (http://www.netobjects.com)"> <TITLE>Photos</TITLE> <SCRIPT> <script type="text/javascript" language="javascript" src="js/behavior.js"></script> <script type="text/javascript" language="javascript" src="js/rating.js"></script> <link rel="stylesheet" type="text/css" href="css/rating.css" /> <!-- function F_loadRollover(){} function F_roll(){} //--> </SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2" SRC="../assets/rollover.js"></SCRIPT> <LINK REL=STYLESHEET TYPE="text/css" HREF="html/style.css"> <LINK REL=STYLESHEET TYPE="text/css" HREF="html/site.css"> <STYLE> </STYLE> </HEAD> <BODY NOF="(MB=(DefaultMasterBorder, 70, 72, 160, 10), L=(PhotosLayout, 896, 686))" STYLE="background-color: rgb(128,128,128); background-image: none;" TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><p align=right><a href="logout.php" align="right">Log Out</a></p> <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=768 NOF=LY> <TR VALIGN=TOP ALIGN=LEFT> <TD> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=160 NOF=LY> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=6 HEIGHT=99><IMG SRC="../assets/images/autogen/clearpixel.gif" WIDTH=6 HEIGHT=1 BORDER=0 ALT=""></TD> <TD></TD> <TD WIDTH=24><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=24 HEIGHT=1 BORDER=0 ALT=""></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD HEIGHT=96></TD> <TD WIDTH=130> <TABLE ID="NavigationBar4" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=NB_FYVPNY120 WIDTH=130> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=130 HEIGHT=24><A HREF="html/experiments.html" onMouseOver="F_roll('NavigationButton2',1)" onMouseOut="F_roll('NavigationButton2',0)"><IMG ID="NavigationButton2" NAME="NavigationButton2" HEIGHT=24 WIDTH=130 SRC="assets/images/autogen/Experiments_Hp3.gif" onLoad="F_loadRollover(this,'Experiments_HRp4.gif',0)" BORDER=0 ALT="Experiments" TITLE="Experiments"></A></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=130 HEIGHT=24><A HREF="html/contact_us.html" onMouseOver="F_roll('NavigationButton4',1)" onMouseOut="F_roll('NavigationButton4',0)"><IMG ID="NavigationButton4" NAME="NavigationButton4" HEIGHT=24 WIDTH=130 SRC="assets/images/autogen/Contact_Us_Np1.gif" onLoad="F_loadRollover(this,'Contact_Us_NRp2.gif',0)" BORDER=0 ALT="Contact Us" TITLE="Contact Us"></A></TD> </TR> <tr height="20"></tr> <tr><td>Scroll down to rate!</td></tr> </TABLE> </TD> <TD></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD COLSPAN=3 HEIGHT=587></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD HEIGHT=64 COLSPAN=3 ALIGN=CENTER VALIGN=MIDDLE WIDTH=160><IMG ID="Picture1401" HEIGHT=64 WIDTH=160 SRC="assets/images/ntulogo.gif" BORDER=0 ALT=""></TD> </TR> </TABLE> </TD> <TD> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=607 NOF=LY> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=47 HEIGHT=6><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=47 HEIGHT=1 BORDER=0 ALT=""></TD> <TD></TD> </TR> </TABLE> <table align="right"> <tr height="40"></tr> <tr height="40"></tr> <tr height="20"> <TD><A NOF="LS_PD" HREF="b1.php"><IMG ID="Picture6" HEIGHT=24 WIDTH=24 SRC="assets/images/NavLeft.gif" BORDER=0 ALT=""></A></TD> </tr> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <tr height="20"> <TD ROWSPAN=2 ALIGN=CENTER VALIGN=MIDDLE WIDTH=24><A NOF="LS_U" HREF="html/index.html"><IMG ID="Picture7" HEIGHT=24 WIDTH=24 SRC="assets/images/NavUp.gif" BORDER=0 ALT=""></A></TD><tr height="20"> <tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"><tr height="20"> <TD><A NOF="LS_ND" HREF="b3.php"><IMG ID="Picture8" HEIGHT=24 WIDTH=24 SRC="assets/images/NavRight.gif" BORDER=0 ALT=""></A></TD><tr> </table> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=551 NOF=LY> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=53 HEIGHT=21><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=53 HEIGHT=1 BORDER=0 ALT=""></TD> <TD WIDTH=76><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=76 HEIGHT=1 BORDER=0 ALT=""></TD> <TD></TD> <TD WIDTH=121><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=121 HEIGHT=1 BORDER=0 ALT=""></TD> <TD></TD> <TD WIDTH=121><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=121 HEIGHT=1 BORDER=0 ALT=""></TD> <TD></TD> <TD WIDTH=108><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=108 HEIGHT=1 BORDER=0 ALT=""></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD HEIGHT=648></TD> <TD COLSPAN=7 WIDTH=498> <TABLE ID="Table2" BORDER=0 CELLSPACING=3 CELLPADDING=1> <TR> <TD WIDTH="100%"> <TABLE WIDTH=490 BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=LEFT NOF=TE> <TR> <TD> <TABLE ID="Table3" BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD WIDTH="4%"> <P><IMG ID="Picture4" HEIGHT=20 WIDTH=20 SRC="assets/images/top_left_corner.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> <TD WIDTH="91%" STYLE="background-image: url('assets/images/top_background.gif');"> <P><IMG ID="Picture9" HEIGHT=1 WIDTH=1 SRC="assets/images/clearpixel11.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> <TD WIDTH="4%"> <P><IMG ID="Picture10" HEIGHT=20 WIDTH=20 SRC="assets/images/top_right_corner.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> </TR> <TR> <TD VALIGN=TOP WIDTH="4%" STYLE="background-image: url('assets/images/left_background.gif');"> <P><IMG ID="Picture10" HEIGHT=8 WIDTH=8 SRC="assets/images/clearpixel1.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> <TD WIDTH="91%"> <P><IMG ID="DataField1410" HEIGHT=600 WIDTH=450 SRC="b2.JPG" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT="002" TITLE="002"></P> </TD> <TD VALIGN=TOP WIDTH="4%" STYLE="background-image: url('assets/images/right_background.gif');"> <P><IMG ID="Picture13" HEIGHT=20 WIDTH=20 SRC="assets/images/right_top_rightside.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> </TR> <TR> <TD WIDTH="4%"> <P><IMG ID="Picture20" HEIGHT=20 WIDTH=20 SRC="assets/images/bottom_left_corner.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> <TD ALIGN=RIGHT WIDTH="91%" STYLE="background-image: url('assets/images/bottom_background.gif');"> <P STYLE="text-align: right;"><IMG ID="Picture23" HEIGHT=20 WIDTH=20 SRC="assets/images/left_bottom_bottomleft.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> <TD WIDTH="4%"> <P><IMG ID="Picture26" HEIGHT=20 WIDTH=20 SRC="assets/images/bottom_left_corner-09.gif" VSPACE=0 HSPACE=0 ALIGN="BOTTOM" BORDER=0 ALT=""></P> </TD> </TR> </TABLE> </TD> </TR> </TABLE> <P> </P> </TD> </TR> </TABLE> </TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD COLSPAN=8 HEIGHT=6></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD COLSPAN=4 HEIGHT=1></TD> <TD COLSPAN=3></TD> </TR> </TABLE> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=LY> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=48 HEIGHT=18><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=48 HEIGHT=1 BORDER=0 ALT=""></TD> <TD></TD> </TR> <tr> <td width=60></td> <td> <?php require('_drawrating.php'); ?><table><tr align=right><td><a href="db2.php">click here to rate again</a> </td></tr> </table> <?php echo rating_bar('b2',''); ?></td> </tr> <TR VALIGN=TOP ALIGN=LEFT> <TD></TD> <TD WIDTH=560 NOF="NB_FYHTNN120" CLASS="TextNavBar" STYLE="text-align: center;">[<A HREF="html/experiments.html">Experiments</A>] [<A HREF="html/contact_us.html">Contact Us</A>]</TD> </TR> </TABLE> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=608 NOF=LY> <TR VALIGN=TOP ALIGN=LEFT> <TD WIDTH=48 HEIGHT=7><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=48 HEIGHT=1 BORDER=0 ALT=""></TD> <TD WIDTH=560><IMG SRC="assets/images/autogen/clearpixel.gif" WIDTH=560 HEIGHT=1 BORDER=0 ALT=""></TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD></TD> <TD WIDTH=560 CLASS="TextObject" STYLE="background-color: rgb(128,128,128);"> <P STYLE="text-align: center;"><SPAN STYLE="font-size: xx-small;">Designed by Rajesh Somavarapu & Abhishek Agrawal @2011 All rights reserved.</SPAN></P> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </BODY> </HTML> Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/#findComment-1319023 Share on other sites More sharing options...
abhishekdeveloper Posted February 19, 2012 Author Share Posted February 19, 2012 The above code is b2.php. Quote Link to comment https://forums.phpfreaks.com/topic/257321-how-do-i-remove-cache-limiter-error-urgent/#findComment-1319024 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.