Hello Everyone.
I have a very strange situation at one of my application login page. I received the following errors
These are the errors I am receiving in regards to PHP
folderpath [Date] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/positix6/public_html/pform/index.php:2) in /home/positix6/public_html/pform/incCommon.php on line 35
folderpath [Date]PHP Warning: Cannot modify header information - headers already sent by (output started at /home/positix6/public_html/pform/index.php:2) in /home/positix6/public_html/pform/incCommon.php on line 36 folderpath [Date] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/positix6/public_html/pform/index.php:2) in /home/positix6/public_html/pform/incCommon.php on line 37
I was suggested to check for spaces before your opening <?php tag at might be the most likely cause.
I did all that but still I can't see that login options (Username and Password) boxes. I didn't change anything in the code and everything was working fine few days back but suddenly the portion mentioned above just disappeared. 🙁
I would really appreciate anyone's help since this is quite frustrating and frankly strange.
Here are the first 40 lines of my inCommon.php
<?php
ob_start();
// check if setup was performed or not yet
$setupStyle="border: solid 1px red; background-color: #FFFFE0; color: red; font-size: 16px; font-family: arial; font-weight: bold; padding: 10px; width:400px; text-align: left;";
if(!is_file(dirname(__FILE__)."/config.php")){
?>
<center>
<div style="<?php echo $setupStyle ?>">
Program setup was not performed yet. Please log in to the
<a href="setup.php">setup page</a>
first.
</div>
</center>
<?php
exit;
}
if(!is_file(dirname(__FILE__)."/admin/incConfig.php")){
?>
<center>
<div style="<?php echo $setupStyle ?>">
Admin setup was not performed. Please log in to the
<a href="admin/">admin control panel</a>
to perform the setup.
</div>
</center>
<?php
exit;
}
// -----------------------------------------
include(dirname(__FILE__)."/admin/incFunctions.php");
include(dirname(__FILE__)."/admin/incConfig.php");
session_start();
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// check if membership system exists
setupMembership();
// do we have a login request?
if($_POST['signIn']!=''){
if(logInMember()){
redirect("index.php");
}
}
Here are the first 15 lines of my index.php
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<?php
include(dirname(__FILE__)."/incCommon.php");
include(dirname(__FILE__)."/header.php");
?><link rel="stylesheet" type="text/css" href="style.css"><?php
if($_GET['signOut']==1){
logOutMember();
}
$arrTables=getTableList();
?><div class="TableFooter" align="right">
</div>
</div>
<div align="center"><img src="/pform/images/logo2.jpg" width="186" height="77" /> <br>
</div>
Thanks
Bin.