WordPress.org

Ready to get started?Download WordPress

Forums

new install invalid argument...settings.php on line 113 (37 posts)

  1. xyz
    Member
    Posted 9 years ago #

    " Invalid argument supplied for foreach() in /my/code/name/www/blg/wp-settings.php on line 113 "

    It showed up on the install log-in page with several other refering to this 113
    and it shows at the very top of the finished blog page.

    Now what?
    delete and reinstall, upload in ASCII, chemod? or what?
    start from sratch?

    Thank you!

  2. NuclearMoose
    Member
    Posted 9 years ago #

    Do you have any activated plugins? If not, go in to your Admin Panel under PLUGINS and activate one.

  3. xyz
    Member
    Posted 9 years ago #

    I took my page to this validator page Valid XHTML
    and they came up with eleven points;
    I don't know much about it, but I will re-install the works from scratch...

  4. NuclearMoose
    Member
    Posted 9 years ago #

    Well, the error you posted has nothing to do with in/valid XHTML.

  5. xyz
    Member
    Posted 9 years ago #

    NuclearMoose:
    After log-in I get 8 items from 113 (above) to:

    Warning: Cannot modify header information - headers already sent by (output started
    re wp-login.php line 7,8,9,10, 185
    and re wp-includes/functions.php on line 1767 and on line 1767

    I'll start fresh!

  6. xyz
    Member
    Posted 9 years ago #

    I only had to enter my msql data in the wp-config.php; that's all

    but yes, I had to changeDB NAME from 'wordpress' to 'myname'-
    that probably went wrong somehow;

    ok I start fresh!

  7. xyz
    Member
    Posted 9 years ago #

    deleted everything; Same negative result,

    Warning: Invalid argument supplied for foreach() in
    /.../www/blg/wp-settings.php on line 113

    Warning: Cannot modify header information - headers already sent by (output started at /www/blg/wp-settings.php:113)
    in /.../www/blg/wp-login.php on line 7

    Warning: Cannot modify header information - headers already sent by (output started at .../www/blg/wp-settings.php:113)
    in /.../www/blg/wp-login.php on line 8

    Warning: Cannot modify header information - headers already sent by (output started at /.../www/blg/wp-settings.php:113)
    in /.../www/blg/wp-login.php on line 9

    Warning: Cannot modify header information - headers already sent by (output started at /.../www/blg/wp-settings.php:113)
    in /.../www/blg/wp-login.php on line 10

  8. xyz
    Member
    Posted 9 years ago #

    Downloaded fresh version, same result as above

    WordPress doesn't work for me

  9. xyz
    Member
    Posted 9 years ago #

    Warning: Invalid argument supplied for foreach() in
    /.../www/blg/wp-settings.php on line 113

    why is this wp-setting.php creating this?

    I downloaded two versions with the same result?

    does everybody download this with this trouble attached?

    My 5 minute install time is up!
    Good Night!

  10. I think you're the first who has had this problem repeatedly. Either you aren't deleting the files before you upload (overwriting files can lead to incomplete transfers), or your server is just plain messed up.

  11. xyz
    Member
    Posted 9 years ago #

    MacManx,
    no, I always clean-out, delete every WP file, nothing gets overwritten;
    all mysql files are emtied, otherwise, during re-install, WP tells me
    "WP is already installed"

    I only enter my mysql data into the wp-config.php file ,
    i touch nothing else;

    on the last fresh download, however,
    I noticed my virus-scan got active scanning it;
    i'll shut it off while i'll download another fresh copy.

    What about these PHP settings? any should be 'off' ?

    magic_quotes_runtime: on
    magic_quotes_gpc: on
    register_globals: on

    Thanks

  12. xyz
    Member
    Posted 9 years ago #

    Is anyone here to answer my last question above?

    I already downloaded two new version, cleaned out old stuff,
    but can't get it going beyond as indicated above original problem.

    Thanks!

  13. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Those PHP settings don't matter. They can be off or on.

    A fresh install shouldn't even reach line 113 since the active_plugins setting is empty by default. If you have phpMyAdmin available, browse the wp_options table and look at the field with an option_name of 'active_plugins '. What is the corresponding option value?

  14. xyz
    Member
    Posted 9 years ago #

    ryan,
    I got to option_name but saw no 'active_plugins' and I don't know much about how to look at this

    I deleted everything now;
    I got two MT blogs going which are really the result of not being able to install WP previously; now the same happens with the new 1.5WP

    If there is a specific WP problem re my host, look at it this way:

    Back in Nov/December their mysql "crashed" with all content gone;
    they installed a new mysql system etc

    I had a functioning WP for two years or so;
    then in Jan or february I deleted everything,
    cleaned out my website files and gifs and stuff
    then thinking, I downloaded a NEW advertised version of WP,
    not realizing it was the same old that I just deleted;
    but I could not install it
    (I posted some questions here at that time)

    That's when I also deleted my old version MT
    and got the latest MT instead and made two blogs of it

    Now last week or so I saw all those NEW 1.5 versions WP
    and downloaded it ; again, I can't install it (see above)

    ...and different problems I never encountered before.

    So what question should be addressed to the server?
    before I download again and start over?
    and arrive for a third or forth time at the same results as above?

    Thanks!

  15. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Here is a patch to wp-settings.php that will workaround the immediate problem. However, this may just be patching a symptom. You may run into another problem once we get you past this one.

    Anyway, take a look at the patch file. Find lines proceeded with a minus sign. Delete these from your copy of wp-settings.php. Replace them with the lines proceeded by plus signs. If you have trouble applying the patch, I can provide a full copy of an altered wp-settings.php.

  16. xyz
    Member
    Posted 9 years ago #

    Ryan,
    better let me have a full copy; I've downloaded a fresh1.5WP and I will install it when I get your altered full version; and we go from there.
    Thanks!

  17. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

  18. xyz
    Member
    Posted 9 years ago #

    Ryan, Thank You!

    This worked instantly upon log-in; the site is up!

    CHEERS!

  19. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    I''ll go ahead and commit that for 1.5.1. Hopefully you won't have any troubles installing and activating plugins. If you do, let us know.

  20. xyz
    Member
    Posted 9 years ago #

    Yes, Ryan, now I went into plugins, the only place I've seen WARNING
    and won't go any further awaiting further instructions from you:

    Warning: Invalid argument supplied for foreach() in
    /all/my/name/site/www/blg/wp-admin/plugins.php on line 32

    and inside the Plugin Management box
    three rows repeating this same text:

    Warning: in_array(): Wrong datatype for second argument in
    /all/my/name/site/www/blg/wp-admin/plugins.php on line 77

    THANKS!

  21. Fidel
    Member
    Posted 9 years ago #

    I'm getting the same thing. Exactly the same thing. I'm still trying to peice together the solution.

  22. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Let's try this. In wp-admin/plugins.php, find the following line:

    $check_plugins = get_settings('active_plugins');

    After that line, insert these lines:

    if ( !is_array($check_plugins) ) {
    $check_plugins = array();
    update_option('active_plugins', $check_plugins);
    }

  23. Fidel
    Member
    Posted 9 years ago #

    That worked perfect.

    Error disappeared and I'm now able to activate plugins.

    Thanks sooo much! That was quick!

  24. Fidel
    Member
    Posted 9 years ago #

    Actually spoke too soon. Errors disappear but when you click activate it shows the "activated" message but then it nothing happens. This is what shows up in the active_plugins table.

    a:0:{}

    so somethings happening but not quite fixed. I hope that helps track down whatevers going on.

  25. Fidel
    Member
    Posted 9 years ago #

    Is there any chance I could see what is supposed to be in that array? What should I be looking at? it would be nice to at least manually add the correct settings to the db so I could start using the plugins.

  26. xyz
    Member
    Posted 9 years ago #

    I inserted above like this: is this the place?

    $check_plugin) {
    if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {
    $current = get_settings('active_plugins');
    if ( !is_array($check_plugins) ) {
    $check_plugins = array();
    update_option('active_plugins', $check_plugins);
    }
    unset($current[$_GET['plugin']]);

    and I get the same result as in my post (Mar31) above...on line 32

    and instead three entries ...on line 77
    I get three entries with...on line 81
    /www/blg/wp-admin/plugins.php on line 81

  27. bhandtc
    Member
    Posted 9 years ago #

    I just installed it and am getting the same errors as xyz.

    I followed the fixes above and the result is this error on the plugins page:

    Warning: in_array(): Wrong datatype for second argument in ..../wp/wp-admin/plugins.php on line 81

    I did install the plugin manager and activated some plugins - I don't know if they work or not. And the site comes up and lets me post and everything but it would be nice not have these errors on the page

  28. bhandtc
    Member
    Posted 9 years ago #

    Well, what can I say? I went back to the plugin page and the error is not there this time. I can't duplicate the problem.

    Never mind!

  29. Fidel
    Member
    Posted 9 years ago #

    As near as I can tell this is due to using an old version of php. I don't think any of us are getting anywhere because everybody else is using a recent version and we apperently are SOL. Ah'well I already told my host.. Not gonna update php? Well then I'm leaving.

    Anybody got any advice for php5, 1 gig space, 1 gig bandwidth a month, unlimited mysql db's, and unlimited mail accts?

    Well actually I could do without that many mail accts.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.