Warning: session_start()
Posted: Mon Aug 14, 2006 4:21 pm
Hello,
Trying to setup the script to suit my webpage.
Works well std, but once i start adding html i get probems not the best with php.
error is:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at
-
if ($settings['autosubmit']) {
session_start();
if (empty($_SESSION['checked'])) {
$_SESSION['checked']='N';
$_SESSION['secnum']=rand(10000,99999);
$_SESSION['checksum']=$_SESSION['secnum'].$settings['filter_sum'].date('dmy');
}
if ($_SESSION['checked'] == 'N')
{
print_secimg();
}
elseif ($_SESSION['checked'] == $settings['filter_sum'])
{
$_SESSION['checked'] = 'N';
$secnumber=pj_isNumber($_POST['secnumber']);
if(empty($secnumber))
{
print_secimg(1);
}
if (!check_secnum($secnumber,$_SESSION['checksum']))
{
print_secimg(2);
}
}
else
{
problem('Internal script error. Wrong session parameters!');
}
}
if i turn off in settings.php
/* Prevent automated submissions (recommended YES)? 1 = YES, 0 = NO */
$settings['autosubmit']=0;
it will work fine.
it works fine with teh error. but can it be fixed.
i am pasting the php into a table.
would like to have what is on the demo inthscript downlaod page
thanks
Trying to setup the script to suit my webpage.
Works well std, but once i start adding html i get probems not the best with php.
error is:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at
-
if ($settings['autosubmit']) {
session_start();
if (empty($_SESSION['checked'])) {
$_SESSION['checked']='N';
$_SESSION['secnum']=rand(10000,99999);
$_SESSION['checksum']=$_SESSION['secnum'].$settings['filter_sum'].date('dmy');
}
if ($_SESSION['checked'] == 'N')
{
print_secimg();
}
elseif ($_SESSION['checked'] == $settings['filter_sum'])
{
$_SESSION['checked'] = 'N';
$secnumber=pj_isNumber($_POST['secnumber']);
if(empty($secnumber))
{
print_secimg(1);
}
if (!check_secnum($secnumber,$_SESSION['checksum']))
{
print_secimg(2);
}
}
else
{
problem('Internal script error. Wrong session parameters!');
}
}
if i turn off in settings.php
/* Prevent automated submissions (recommended YES)? 1 = YES, 0 = NO */
$settings['autosubmit']=0;
it will work fine.
it works fine with teh error. but can it be fixed.
i am pasting the php into a table.
would like to have what is on the demo inthscript downlaod page
thanks