Page 1 of 1

[solved]Upgrade to 1.9.1: "Modification of config variables is deprecated" error

Posted: Sun Nov 28, 2010 7:03 pm
by CMSmonkey
Hi Everyone,
I just upgraded a client's site of mine from 1.6 to 1.9.1.  I had the site in maintenance mode and everything seemed fine.  While updating the modules, I noticed that I now receive the following message on the homepage instead of the "maintenance" note:

Fatal error: Modification of config variables is deprecated in filepath/lib/classes/class.cms_config.php on line 50


Any suggestions how to fix this?

Re: Upgrade to 1.9.1: "Modification of config variables is deprecated..." error

Posted: Sun Nov 28, 2010 7:23 pm
by CMSmonkey
FYI, here is what line 48-52 of the above mentioned file state:

Code: Select all

  public function offsetSet($key,$value)
  {
    trigger_error('Modification of config variables is deprecated',E_USER_ERROR);
    $this->_data[$key] = $value;
  }
System Info:
----------------------------------------------

Cms Version: 1.9.1

Installed Modules:

    * CMSMailer: 2.0
    * FileManager: 1.0.3
    * MenuManager: 1.7.2
    * ModuleManager: 1.4
    * News: 2.11
    * nuSOAP: 1.0.2
    * Printing: 1.1.1
    * Search: 1.6.7
    * ThemeManager: 1.1.3
    * TinyMCE: 2.8.1
    * Album: 0.9.3
    * FormBuilder: 0.6.4
    * CGExtensions: 1.21.5
    * CustomContent: 1.7.3
    * Calendar: 0.8.2
    * FormBrowser: 0.3.2
    * ShopMadeSimple: 0.2.1
    * FrontEndUsers: 1.12.6
    * NMS: 2.2.2
    * CartMadeSimple: 0.2.0
    * PaymentMadeSimple: 1.0.2
    * RSS2HTML: 1.2.4
    * CTLModuleMaker: 1.8.2.2
    * Backup: 0.5
    * Statistics: 0.9.3
    * CGSimpleSmarty: 1.4.4
    * Products: 2.7
    * CGCalendar: 1.5.6


Config Information:

    * php_memory_limit:
    * process_whole_template: true
    * output_compression: false
    * max_upload_size: 30000000
    * default_upload_permission: 664
    * url_rewriting: none
    * page_extension:
    * query_var: page
    * image_manipulation_prog: GD
    * auto_alias_content: true
    * locale:
    * default_encoding:
    * admin_encoding: utf-8
    * set_names: false


Php Information:

    * phpversion: 5.2.12
    * md5_function: On (True)
    * gd_version: 2
    * tempnam_function: On (True)
    * magic_quotes_runtime: Off (False)
    * E_STRICT: 0
    * memory_limit: 32M
    * max_execution_time: 300
    * output_buffering: On
    * safe_mode: Off (False)
    * file_uploads: On (True)
    * post_max_size: 10M
    * upload_max_filesize: 10M
    * session_save_path: /tmp (1777)
    * session_use_cookies: On (True)
    * xml_function: On (True)


Server Information:

    * Server Api: cgi
    * Server Db Type: MySQL (mysql)
    * Server Db Version: 5.0.83


----------------------------------------------

Re: Upgrade to 1.9.1: "Modification of config variables is deprecated..." error

Posted: Wed Dec 01, 2010 7:09 pm
by CMSmonkey
Could not resolve issue with upgrade, so I wiped the server clean, installed a fresh copy of 1.9.1 and connected back to the database.  So far, so good.

Re: [solved]Upgrade to 1.9.1:

Posted: Mon Feb 07, 2011 2:03 am
by thevillageinn
Has anyone resolved this issue with out a complete re-installation?

Re: [solved]Upgrade to 1.9.1:

Posted: Mon Feb 07, 2011 2:43 am
by thevillageinn
hmm - looks like the issue is related to the browser cache...As clearing it seems to have resolved the issue on my end.

Re: [solved]Upgrade to 1.9.1:

Posted: Fri Nov 25, 2011 8:44 am
by eden
I got it from abusing config:
$gCms->config["myownuserid"] = $mysqldata['session_user_id'];

Which is rather expected if setting config variables is deprecated, but what is then the correct way to make a variable widely available in cmsms?