View Full Version : session_start() error
Lee Firth
06-08-2009, 03:04 PM
I am having a problem with a page when it loads I get the following warning message:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/firthweb/public_html/add_inv_create_items.php:1) in /home/firthweb/public_html/WA_SecurityAssist/Helper_PHP.php on line 5
Line 5 of Helper_PHP.php is:
session_start();
Ray Borduin
06-08-2009, 04:03 PM
You probably have to move the include file: add_inv_create_items.php
below the Helper_PHP include file for it to work properly.
Lee Firth
06-08-2009, 04:29 PM
add_inv_create_items.php is the name of the file, not an include. Here is a list of the includes in the order they appear at the top of add_inv_create_items.php.
<?php require_once('Connections/firthweb_data.php'); ?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('function_numbers.php'); ?>
Ray Borduin
06-09-2009, 07:28 AM
What is on the first line of add_inv_create_items.php?
Is there a blank line or empty space between the includes?
The error implies there is a blank line or space on line 1 of that file.
Lee Firth
06-09-2009, 03:33 PM
What is on the first line of add_inv_create_items.php?
The first four lines are as follows:
<?php require_once('Connections/firthweb_data.php'); ?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('function_numbers.php'); ?>
Is there a blank line or empty space between the includes?
No spaces.
The error implies there is a blank line or space on line 1 of that file.
It's funny that I don't get this error message on my testing server, only on the production server.
Ray Borduin
06-09-2009, 03:53 PM
output started at /home/firthweb/public_html/add_inv_create_items.php:1
This means that there is a blank line somewhere or something else being written to the page. A character, even a blank space is usually the "output" it is referring to.
Are there any blank lines in the connection include? If you move that include below, does it still throw an error? You may be able to simply rearrange them? ! I'm really not sure since it doesn't appear you have the common problem that causes this particular issue.
Lee Firth
06-09-2009, 05:53 PM
I have tried rearranging the includes, but it still throws the same error.
If I remove the Security Assist SB, then it doesn't throw an error.
The strange thing is that the same Security Assist SB is on the two preceeding pages and no error is encouintered with those. I copied and pasted the code from one of these pages directly into this page in the same order and it threw the error again. There must be a conflict with some other code somehow, but it doesn't work.
Ray Borduin
06-10-2009, 06:07 AM
Please post a support incident. Somebody will need to look into this with you. This is not a common problem, so I don't really know the cause.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.