Hi All,
Seems like you've made some necessary changes in the V.2.06 lib/init.php file to accommodate error checking in newer PHP versions.
Up to now, to suppress errors in an implementation of a CAPTCHA program I’ve been using, I had to change the opening lines of the init.php file, from this:
<?php
// error reporting
error_reporting(E_ALL | 2048); // display all errors (2048 = E_STRICT which isn't defined in PHP 4)
To this:
<?php
// error reporting
// error_reporting(E_ALL | 2048); // display all errors (2048 = E_STRICT which isn't defined in PHP 4)
error_reporting('E_ALL & ~E_WARNING');
I know I’ll have to change something in 2.06, but rather than guessing, breaking something, and finding out the hard way, I thought that I’d ask for some guidance.
VIEWER CODE
This is the code that I’ve been using in my viewer:
<?php
session_start();
require_once "cmsAdmin/lib/viewer_functions.php";
list($common_informationRecords, $common_informationMetaData) = getRecords(array(
'tableName' => 'common_information',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$common_informationRecord = @$common_informationRecords[0]; // get first record
?>
<?php include_once "/hsphere/local/home/c307025/cogancameras.com/spambot-email-protector.php" ?>
<?php
include_once('captcha/captchac_lib.php');
if(!isset($_SESSION))
{
session_start();
}
?>
And this is the error I’m now getting (again):
Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /hsphere/local/home/c307025/cmsAdmin/lib/init.php on line 326 Notice: A session had already been started - ignoring session_start() in /hsphere/local/home/c307025//cmsAdmin/lib/init.php on line 327
(Of course, I’d really rather solve the problem at the viewer level but a mod to the init.php file would work just fine)
Thanks.
Best,
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php