Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Deprecated and header issues Rate Topic   - - - - -

 
  • Martin
  • Senior Member
  • Members
  • Join Date: 26-Mar 08
  • 151 posts

Posted 10 July 2012 - 02:10 PM #1

Hello all,

All of a sudden I get these warnings at the top of my homepage:

Deprecated: Assigning the return value of new by reference is deprecated in /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php on line 181

Warning: Cannot modify header information - headers already sent by (output started at /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php:181) in /www/k/i/n/website.com/public_html/core/sessions.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php:181) in /www/k/i/n/website.com/public_html/core/sessions.php on line 41

Warning: Cannot modify header information - headers already sent by (output started at /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php:181) in /www/k/i/n/website.com/public_html/core/sessions.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php:181) in /www/k/i/n/website.com/public_html/core/sessions.php on line 47

Warning: Cannot modify header information - headers already sent by (output started at /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php:181) in /www/k/i/n/website.com/public_html/core/sessions.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at /www/k/i/n/website.com/public_html/core/fn_classes_initializers.php:181) in /www/k/i/n/website.com/public_html/core/fn_common.php on line 2060

I have no idea what they mean or how to get rid of them.

Is there anyone who can shed some light on this?
CS cart 2.1.2 professional

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11791 posts

Posted 10 July 2012 - 06:34 PM #2

You should have a line in your config.local.php file that looks similar to:
error_reporting(E_ALL ^ (E_NOTICE | E_DEPRICATED) );

If not, add it or change it to read as above.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Martin
  • Senior Member
  • Members
  • Join Date: 26-Mar 08
  • 151 posts

Posted 18 July 2012 - 03:15 PM #3

Sorry for the late response to your quick response but I have been ill for a while.

I don't seem to have a config.local.php. Might this be because I am running an old version of CS cart?

I just had a look at my old backups of this site and there never seem have been a config.local.php file. I do have a config.php file but that's all.
CS cart 2.1.2 professional

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3942 posts

Posted 18 July 2012 - 06:03 PM #4

You should have one. If you don't have one, you would be experiencing more issues than what you posted. The following is the /config.local.php from 2.1.2:

<?php
/***************************************************************************
*																		  *
*	Copyright (c) 2004 Simbirsk Technologies Ltd. All rights reserved.	*
*																		  *
* This  is  commercial  software,  only  users  who have purchased a valid *
* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.													*
*																		  *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.			*
****************************************************************************/


//
// $Id: config.local.php 11039 2010-10-27 12:43:28Z 2tl $
//

if ( !defined('AREA') ) { die('Access denied'); }

/*
* PHP options
*/

// Disable notices displaying
error_reporting(E_ALL ^ E_NOTICE);
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
	error_reporting(error_reporting() & ~E_DEPRECATED);
}

// Set maximum memory limit
@ini_set('memory_limit', '48M');

// Set maximum time limit for script execution
@set_time_limit(3600);

/*
* Database connection options
*/
$config['db_host'] = '%DB_HOST%';
$config['db_name'] = '%DB_NAME%';
$config['db_user'] = '%DB_USER%';
$config['db_password'] = '%DB_PASSWORD%';
$config['db_type'] = 'mysql';

/*
* Script location options
*
*	Example:
*	Your url is http://www.yourcompany.com/store/cart
*	$config['http_host'] = 'www.yourcompany.com';
*	$config['http_path'] = '/store/cart';
*
*	Your secure url is https://secure.yourcompany.com/secure_dir/cart
*	$config['https_host'] = 'secure.yourcompany.com';
*	$config['https_path'] = '/secure_dir/cart';
*
*/

// Host and directory where software is installed on no-secure server
$config['http_host'] = '%HTTP_HOST%';
$config['http_path'] = '%HOST_DIR%';

// Host and directory where software is installed on secure server
$config['https_host'] = '%HTTPS_HOST%';
$config['https_path'] = '%HOST_DIR%';

/*
* Misc options
*/
// Names of index files for administrative and customer areas
$config['admin_index'] = 'admin.php';
$config['customer_index'] = 'index.php';

// DEMO mode
$config['demo_mode'] = false;

// Tweaks
$config['tweaks'] = array (
	'js_compression' => false, // enables compession to reduce size of javascript files
	'check_templates' => true, // disables templates checking to improve template engine speed
	'inline_compilation' => true, // compiles nested templates in one file
	'anti_csfr' => false, // protect forms from CSFR attacks (experimental)
	'disable_ajax_preload' => false, // used to disable ajax preload for speed-up admin area
	'disable_block_cache' => false, // used to disable block cache
);

// Cache backend
// Available backends: file, sqlite, mysql, shmem
// To use sqlite cache the "sqlite3" PHP module should be installed
// To use shmem cache the "shmop" PHP module should be installed
$config['cache_backend'] = 'file';

// Key for sensitive data encryption
$config['crypt_key'] = 'YOURVERYSECRETKEY';

// Database tables prefix
define('TABLE_PREFIX', 'cscart_');

// Default permissions for newly created files and directories
define('DEFAULT_FILE_PERMISSIONS', 0666);
define('DEFAULT_DIR_PERMISSIONS', 0777);

// Developer configuration file
if (file_exists(DIR_ROOT . '/local_conf.php')) {
	include(DIR_ROOT . '/local_conf.php');
}

define('AUTH_CODE', '');

?>


 
  • Martin
  • Senior Member
  • Members
  • Join Date: 26-Mar 08
  • 151 posts

Posted 18 July 2012 - 10:18 PM #5

But where should it reside this file? Might it be that I am mistaken and have even an older version of cscart than 2.1.2. Is there any way I can check. I can't login due to this issue so there I can't look.

I now have created this file and added it to the root but that didn't change anything.
CS cart 2.1.2 professional

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3942 posts

Posted 18 July 2012 - 11:43 PM #6

You must have an older version. Use "www.your_domain.com?version" to find out your version.

 
  • Martin
  • Senior Member
  • Members
  • Join Date: 26-Mar 08
  • 151 posts

Posted 19 July 2012 - 12:30 PM #7

Yeah I do have an older version :-(. It's CS-CART: version 1.3.5-SP3. I am going to upgrade it (it's due isn't it lol) but in the mean time I need to be able to get back into it so I can export products and take a look at some of the iDeal settings I have for future reference.
Now I can't get in. In FF I get the warning above and in Chrome it states "This webpage has a redirect loop".
CS cart 2.1.2 professional

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3942 posts

Posted 19 July 2012 - 05:09 PM #8

It sounds like your host has updated the server.

Add this:
// Disable notices displaying
error_reporting(E_ALL ^ E_NOTICE);
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
        error_reporting(error_reporting() & ~E_DEPRECATED);
}



Below this line:
if ( !defined('IN_CSCART') ) { die('Access denied'); }
In /config.php

Edit: Remove the /config.local.php. It doesn't exist in that version.

 
  • Martin
  • Senior Member
  • Members
  • Join Date: 26-Mar 08
  • 151 posts

Posted 19 July 2012 - 08:08 PM #9

The host has indeed updated their server. Your code helped in removing the errors but I still can't login in the admin section when I surf to admin.php. Would you happen to know why this is?
CS cart 2.1.2 professional

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3942 posts

Posted 20 July 2012 - 02:42 AM #10

Hard to say. It could be a number of things since the server was updated and not knowing what the specs are.