WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] session_start() error in php (9 posts)

  1. mm
    Member
    Posted 6 months ago #

    Hello,

    I got this error suddenly despite not having touched to the php...

    Could anyone tell me what the problem is?

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/i/f/e/ifelse/html/wp-content/plugins/wp-mediatagger/mediatagger.php:1) in /home/content/i/f/e/ifelse/html/wp-content/plugins/eshop/eshop.php on line 47

    There is my php:

    <?php
    if(!defined('ESHOP_VERSION'))
    	define('ESHOP_VERSION', '6.3.11');
    if(!defined('ESHOP_PATH'))
    	define( 'ESHOP_PATH', plugin_dir_path(__FILE__) );
    /*
    Plugin Name: eShop for WordPress
    Plugin URI: http://wordpress.org/extend/plugins/eshop/
    Description: The accessible shopping cart for WordPress 3.4 and above.
    Version: 6.3.11
    Author: Rich Pedley
    Author URI: http://quirm.net/
    Copyright 2007-2011  R PEDLEY  (email : rich@quirm.net)
    This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
    This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    //grab all options here in one go
    $eshopoptions = get_option('eshop_plugin_settings');
    add_action('init','eshop_load_lang',1);
    if (!function_exists('eshop_load_lang')) {
    	function eshop_load_lang(){
    		$eshoplanguage=apply_filters( 'eshop_language_dir', dirname( plugin_basename( __FILE__ ) ) );
    		load_plugin_textdomain('eshop', false, $eshoplanguage );
    		//grab all options here in one go
    		$eshopoptions = get_option('eshop_plugin_settings');
    	}
    }
    /* eShop general (or not sure where they are utilised! */
    add_action('init','eshopsession',1);
    if (!function_exists('eshopsession')) {
    	function eshopsession(){
    	 	if(!session_id()){
    	    	session_start();
        	}
        }
    }
    /* cron */
    add_action('eshop_event', 'eshop_cron');
    if (!function_exists('eshop_cron')) {
    	function eshop_cron(){
    		global $wpdb,$eshopoptions,$blog_id;
    		if($eshopoptions['cron_email']!=''){
    			$dtable=$wpdb->prefix.'eshop_orders';
    			$max = $wpdb->get_var("SELECT COUNT(id) FROM $dtable WHERE status='Completed' OR status='Waiting'");
    			if($max>0){
    				$to = $eshopoptions['cron_email'];    //  your email
    				$body =  __("You may have some outstanding orders to process\n\nregards\n\nYour eShop plugin",'eshop');
    				$body .="\n\n".get_admin_url($blog_id).'/admin.php?page=eshop-orders.php&action=Completed'."\n";
    				$headers=eshop_from_address();
    				$subject=get_bloginfo('name').__(": outstanding orders");
    				wp_mail($to, $subject, $body, $headers);
    			}
    		}
    	}
    }
    add_action('init','eshop_update_routine',1);
    if (!function_exists('eshop_update_routine')) {
    	function eshop_update_routine(){
    		$eshopoptions = get_option('eshop_plugin_settings');
    		if(get_option('eshop_version')!='')
    			$eshopoptions['version']=get_option('eshop_version');
    
    		if ( $eshopoptions['version']=='' || $eshopoptions['version'] >= ESHOP_VERSION )
    			return false;
    
    		include_once('eshop-upgrade.php');
    	}
    }
    include_once 'cart-functions.php';
    //process order - not working on init
    add_action ('wp','eshop_orderhandle_process');
    /* the widget */
    include_once 'eshop-widget.php';
    //make sure theme thumbnail support is on, even for those themes that don't use it.
    add_theme_support('post-thumbnails');
    
    if(is_admin()){
    	/* eShop ADMIN SPECIFIC HERE */
    	include_once 'eshop-admin-functions.php';
    	include_once 'eshop-settings.php';
    	include_once 'eshop-product-entry.php';
    	include_once 'eshop-dashboard.php';
    	/* activations */
    	register_activation_hook(__FILE__,'eshop_install');
    	/*deactivation*/
    	register_deactivation_hook( __FILE__, 'eshop_deactivate' );
    	add_action('admin_init','eshopdata');
    	add_action('admin_init', 'eshop_admin_init');
    	add_action('admin_menu', 'eshop_admin');
    	add_filter( 'admin_footer_text', 'eshop_admin_footer_text' );
    	add_action( 'in_plugin_update_message-eshop/eshop.php', 'eShopPluginUpdateMessage' );
    	add_action('wp_dashboard_setup', 'eshop_add_dashboard_widgets' );
    
    }else{
    	/* eShop Public facing only */
    	include_once 'public-functions.php';
    	include_once( 'eshop-shortcodes.php' );
    	include_once( 'eshop-add-cart.php' );
    	include_once 'eshop-mgs-redirect.php';
    	/*
    	add_filter('eshop_orderhandle_process', 'eshop_paypal_redirect');
    	add_filter('eshop_orderhandle_process', 'eshop_cash_redirect');
    	*/
    	//add credits
    	add_action('wp_footer', 'eshop_visible_credits');
    	//process cart
    	add_action ('init','eshop_cart_process');
    	add_filter('the_content', 'eshop_boing');
    	//this automatically hides the relevant pages
    	add_filter('wp_list_pages_excludes', 'eshop_add_excludes');
    	//fold the page menu as it is likely to get long...
    	add_filter('style_loader_src','eshop_unversion');
    	//removes version number from css, needed for multisite
    	add_action ('init','eshop_bits_and_bobs');
    	add_filter('query_vars', 'add_eshop_query_vars');
    	add_action('wp', 'eshop_pre_wp_head');
    	add_action('wp_print_scripts', 'eshop_wp_head_add');
    	add_action('wp_print_styles', 'eshop_stylesheet');
    	add_action('wp_head','eshop_ie_fix');
    	new eshop_search();
    	add_action('template_redirect','eshopgbase');
    }
    /* ajax the cart - won't allow me to put this in the above*/
    if(isset($eshopoptions['ajax_cart']) && 'yes' == $eshopoptions['ajax_cart']){
    	include_once 'public-functions.php';
    	add_action('wp_enqueue_scripts', 'eshop_ajax_inc'); //CHANGED HERE
    	add_action('wp_enqueue_scripts', 'eshop_action_javascript'); // CHANGED HERE
    	add_action('wp_ajax_eshop_special_action', 'eshop_special_action_callback');
    	add_action('wp_ajax_nopriv_eshop_special_action', 'eshop_special_action_callback');
    	add_action('wp_ajax_eshop_cart', 'eshop_cart_callback');
    	add_action('wp_ajax_nopriv_eshop_cart', 'eshop_cart_callback');
    	if ( isset( $_GET['eshoprandom'] ) )
     		add_action( 'template_redirect', 'eshop_random' );
    
    }
    //test/live mode
    add_action ('init','eshop_test_or_live');
    ?>

    Could anyone please help me with this?

    Thanks!

  2. keesiemeijer
    moderator
    Posted 6 months ago #

    The error starts in the plugin mediatagger.php file line 1.
    wp-content/plugins/wp-mediatagger/mediatagger.php

    See: http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    See if the error goes away when de-activating the mediatagger plugin.

  3. Amol Sawant
    Member
    Posted 6 months ago #

    Hello mm,

    Firstly disable that plugin... if you can't then access your files throw FTP manager.. and then rename the plugin folder that causes you this error..

  4. mm
    Member
    Posted 6 months ago #

    Hello,

    Thank you for your reply..but I can't see the error or space on line 1.

    If I were to rename the folder containing the plugin error like you're suggesting, what should I rename it to?

    Wouldn't disabling the plugin cause me to lose all my data?

    Thanks for the additive info.

  5. Amol Sawant
    Member
    Posted 6 months ago #

    hello mm,

    DON'T worry you will not loose your any data till you don't delete them...
    here you are just rename it to folder just like when start any windows operating system in safe mode if we stuck due to some software is working madly..

    in your case just rename the folder wp-content/plugins/wp-mediatagger to wp-content/plugins/ xxxxxxxxxxxxxxxxxxxxwp-mediatagger

    and reopen your admin panel or website ... after login in admin panel just disable the plugin because may plugin having some issue with wordpress compatibility or inter error in pluginn..

  6. mm
    Member
    Posted 6 months ago #

    Hello,

    You're correct. I have disabled the Media Tagger plugin and the error went away.
    But now I renamed the Media Tagger folder to xwp-mediatagger and then I get the same error again.

    I don't really see why renaming a folder would change anything to this error.

    Apparently this error is due to a space problem but I can't find the space on line 1 or 49..

    Anymore ideas?

    Cheers!

  7. Amol Sawant
    Member
    Posted 6 months ago #

    Hello,

    the problem is in your plugin not in wordpress that why whenever you rename it, it's not showing error because it's disabled ...

    sometimes the problem is different and it show the error different ... there may be internal logic or syntax error in that plugin files ...

    for plugin error you have contact the plugin developer or company .. from here we can't give you support for plugin errors... we can only provide support for errors occurred in wordpress...

    Thank You.
    amol sawant.

  8. mm
    Member
    Posted 6 months ago #

    Ok.
    I have solved the problem. Apparently editing in note isn't a good idea.

    Greetings.

  9. the problem is in your plugin not in wordpress that why whenever you rename it, it's not showing error because it's disabled ...

    Uh no, that probably wasn't it. That FAQ that keesiemeijer posted a link to really had the best advice.

    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    How do I know?

    Apparently editing in note isn't a good idea.

    If it's not wp-config.php it's something else that was edited and caused the problem. That plugin was fine unless it was edited. No reason to bug the developer. ;)

Reply

You must log in to post.

About this Topic