ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Some Control Panel Items not Saving

August 05, 2011 12:06pm

Subscribe [3]
  • #1 / Aug 05, 2011 12:06pm

    lealea

    202 posts

    Hi guys!

    My client is on EE 1.7.1 and their web host moved their site to their new service/server (I had no control, they did this automatically and without warning). When that happened, it borked the site and I was unable to log in to EE nor was the site loading.

    Then, magically, they “fixed it” and so the site went back up, and I was able to log in to EE again. Unfortunately, it seems as if some items are not being saved in the database. As if the system pics and chooses what works and what doesn’t.

    For example:

    If you go to Admin > System Preferences > General Configuration

    Some radio buttons are NOT selected at all, and if you try to change some elements, it would not change—for example, try to change Default Language from English to something else, then press Update. It is NOT saved.

    This particular piece of data is meant to be saved in ‘exp_sites’ table in the view ‘site_system_preferences’ column within that table.

    However, it only seems “Name of Site” is the only changeable/saveable thing in that page, and if you confirm in the ‘site_system_preferences’ column, the values that is meant to be saved are not.

    But, when I go to config.php and forcibly add values there, these get saved.

    Anything under Admin > System Preferences > Security & Session Preferences or Output and Debugging Preferences ... neither have things selected when they should.

    Also, they have forums added on here and the /forums/ page is not loading, only the homepage. All other pages/entries work. I can update templates.

    I have disabled extensions and tried to uninstall some modules. What was strange was I was able to uninstall the Member Utilities module, but I had the SL Developer Module and extension and tried to uninstall that, but it still shows up (as I created a custom tab for it). So… somehow it’s not completely connecting to the modules as well.

    What do you think has happened? What may be the issue here where the database is connected but not everything seems to be synced properly?

    The host is being clueless and is trying to say to upgrade EE to the latest version (it is at 1.7.1 and I’m not convinced upgrading to EE2 will fix the connection issue).

    HELP!

  • #2 / Aug 05, 2011 12:25pm

    lealea

    202 posts

    I also want to add that I’m able to update and edit entries as well as publish new entries.

  • #3 / Aug 05, 2011 1:03pm

    lealea

    202 posts

    Sorry, it seems like I keep spamming. So, I’ve been fiddling with things in Admin > System Preferences > General Configuration and then watching the actual database to see what happens. The changes DO get saved in exp_sites! For example, switching default language from English to French. French shows up in the database, but the control panel does not see these changes. So it looks like when I make a changes, it does talk to the database. EE’s control panel just doesn’t seem to want to connect…

  • #4 / Aug 05, 2011 1:33pm

    lealea

    202 posts

    And more information/digging: been trying to re-upload backup database from the other day but that doesn’t seem to fix anything. I also noticed that how they “fixed” the site loading issue ist hey went to core.prefs.php and then they UNCOMMENTED line 129!!!!

    $this->core_ini = array_merge($REGX->array_stripslashes(unserialize($data)), $this->core_ini);

    This somehow loads the site, but everything is still borked.

    EDIT: I also OCCASIONALLY get this on the front end:

    Notice: Undefined index: force_query_string in /..blah blah/ee/core/core.functions.php on line 175
  • #5 / Aug 05, 2011 2:45pm

    Lisa Wess

    20502 posts

    Hey Lea -

    What’s in your config.php?  If that’s over-riding the CP and not the right permissions, you might see this.  Make sure it’s set to 666 at the least.

    Also, do kick your system/cache folder - empty it out, reset permissions to 777, sometimes that works magic as it can get “stuck” in server moves.

  • #6 / Aug 05, 2011 2:50pm

    lealea

    202 posts

    Hi Lisa,

    I’ve done that dance already, unfortunately. Made sure permissions were set and manually deleted cache files via FTP.

    Actually, the most concerning part is that the site will ONLY load if Line 129 is commented out.

    I had to edit the config.php file to add more values so I could override the CP. So it’s all the right permissions, I just can’t seem to change anything in the control panel preferences like:  Admin > System Preferences > Security & Session Preferences

    Just an FYI, here’s the config.php contents (replaced all client info with “blah”):

    <?php
    
    if ( ! defined('EXT')){
    exit('Invalid file request');
    }
    
    $conf['send_headers'] = "n";
    $conf['app_version'] = "171";
    $conf['license_number'] = "blah";
    $conf['debug'] = "1";
    $conf['install_lock'] = "1";
    $conf['db_hostname'] = "blah blah";
    $conf['db_username'] = "blah";
    $conf['db_password'] = "blahdeblah";
    $conf['db_name'] = "blah";
    $conf['db_type'] = "mysql";
    $conf['db_prefix'] = "exp";
    $conf['db_conntype'] = "0";
    $conf['system_folder'] = "ee";
    $conf['cp_url'] = "http://www.blah.ca/ee/index.php";
    $conf['doc_url'] = "http://expressionengine.com/docs/";
    $conf['cookie_prefix'] = "";
    $conf['is_system_on'] = "y";
    $conf['allow_extensions'] = "n";
    $conf['multiple_sites_enabled'] = "n";
    $conf['forum_is_installed'] = "y";
    $conf['enable_online_user_tracking'] = "y";
    $conf['enable_hit_tracking'] = "n";
    $conf['enable_entry_view_tracking'] = "n";
    $conf['dynamic_tracking_disabling'] = "";
    $conf['htaccess_path'] = "/public_html/blah/.htaccess";
    $conf['theme_folder_url'] = "http://www.blah.ca/themes/";
    $conf['theme_folder_path'] = "/public_html/blah/themes/";
    $conf['deft_lang'] = "english";
    $conf['charset'] = "utf-8";
    $conf['xml_lang'] = "en";
    ?>
  • #7 / Aug 05, 2011 2:54pm

    lealea

    202 posts

    If I remove any of the last 4 custom config items, and try to make changes it won’t save it in the control panel.

  • #8 / Aug 05, 2011 3:08pm

    lealea

    202 posts

    Additionally, when I add Line 129 back on, it immediately takes the site down and the errors that show in the login page are as follows:

    Notice: unserialize() [function.unserialize]: Error at offset 693 of 2038 bytes in /public_html/blah/ee/core/core.prefs.php on line 129
    
    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /public_html/blah/ee/core/core.prefs.php on line 129
    
    Notice: unserialize() [function.unserialize]: Error at offset 256 of 278 bytes in /public_html/blah/ee/core/core.prefs.php on line 129
    
    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /public_html/blah/ee/core/core.prefs.php on line 129
    
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /public_html/blah/ee/core/core.prefs.php on line 129
    
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /public_html/blah/ee/core/core.prefs.php on line 129
  • #9 / Aug 05, 2011 3:10pm

    Lisa Wess

    20502 posts

    Do you know if they did a find and replace directly on the DB, Lea?

    Also, I’m thinking that maybe a full file replacement is in order in case there is some file corruption from the move.

  • #10 / Aug 05, 2011 3:13pm

    lealea

    202 posts

    Hi Lisa,

    I am unsure what they did with the database. What kind of “find and replace” are you thinking of? I can speculate they did do a find and replace because before all this madness, it seemed as if server paths were pointed to the new/correct places?

    In terms of file replacement, what do you mean? This client was previously on EE 1.6.8 or so, and so I thought maybe a full upgrade to 1.7.1 would alleviate issues. It did not, sadly. I also tried to replace the files again this morning to see if that may be it. No such luck. :(

    Best,

    Lea

  • #11 / Aug 05, 2011 5:11pm

    narration

    773 posts

    Lea, since you are in a crush here, the following might help.

    Reference: http://forums.oscommerce.com/topic/266601-warning-array-merge-functionarray-merge-argument-1-is-not-an-array-in-homebabzonbopublic-htmladmincustomersphp-on-line-733/

    What they seem to have found here is that a certain version of PHP5 doesn’t react well to previous assumptions on the way array_merge and perhaps other things behave. Not necessary to understand it; the PHP bunch regularly does things like this.

    Translating the fix into your line 129 looks easy: just add casts to array to force PHP to do the right thing. These should be harmless. Here should be the result you can substitute in (comment out original 129):

    $this->core_ini = array_merge((array)$REGX->array_stripslashes((array)unserialize($data)), (array)$this->core_ini);

    It’s a guess, but you could try it.  Underlying seems to be that this hoster has an odd version of PHP5, and that they know it. I can’t believe they went in and just removed a line of source code from your installation. It’s rather likely that EE needs that line to work correctly.

    Regards,
    Clive

  • #12 / Aug 05, 2011 6:00pm

    lealea

    202 posts

    For posterity’s sake:

    PHP version 5.2.12
    MySQL 5.0.91

    Clive: thanks for that. That line works to render the site but it doesn’t fix , but it seems to create new errors when logging in the CP:

    Notice: unserialize() [function.unserialize]: Error at offset 693 of 2038 bytes in /public_html/blah/ee/core/core.prefs.php on line 130

    Yeah I couldn’t BELIEVE they actually altered EE code and called that “fixed.”

    Also, with the line change you’ve given me above, it looks like I’m able to save things in the control panel again, even though when I initially look at it, things are deselected. But once I select, make options, it saves.

    Forums still don’t render, unfortunately. :(

  • #13 / Aug 05, 2011 6:04pm

    lealea

    202 posts

    Ugh, spoke too soon, that new line allows me to edit/go into EE control panel, but renders the front-end site borked! :(

    Edit: Specifically, Error 330

    EDIT: It was turning on Gzip when I was fiddling with settings. Site is back to working again, just not the forums and the error above still relevant in CP.

  • #14 / Aug 05, 2011 6:17pm

    narration

    773 posts

    Good stuff. And it should be the clue that lets Ellis developers help you with some advice as to what to do to really solve the problem with this version of PHP.

    For the moment, seems quite likely there are other places arrays are expected as arguments which need similar casts to work again. Fixing this line is also likely letting you see more of them as errors.

    Well, ‘fix’. None of this should be necessary, of course.

    Also, I felt to have figured out what kind of client/host would do such things as happened here. Ah, well 😉.

    Hope this and that the front end works will at least take the pressure of not-knowing off, so you can enjoy a weekend, Lea.

    Best,
    Clive

  • #15 / Aug 08, 2011 11:54am

    lealea

    202 posts

    Just wanted to say that this looks like it’s been resolved. I finally got a copy of the database PRIOR to them mucking around with it and I dropped their borked database, imported this old one, and manually assigned the new paths, restored the old core.prefs.php file to its original glory, and voila. It works.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases