WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] number_format() error when trying to add new plugins (41 posts)

  1. linkhousemedia
    Member
    Posted 8 months ago #

    Hello,

    This is seems to be similar to this issue: http://wordpress.org/support/topic/functionsphp-error-9?replies=7

    I'm running 3.7.1 and see this error when trying to add new plugins by searching in the wordpress admin:

    Warning: number_format() expects parameter 1 to be double, string given in /home/gbairway/public_html/wp-includes/functions.php on line 165
    
    Warning: number_format() expects parameter 1 to be double, string given in /home/gbairway/public_html/wp-includes/functions.php on line 165
    
    Warning: number_format() expects parameter 1 to be double, string given in /home/gbairway/public_html/wp-includes/functions.php on line 165
    
    Warning: number_format() expects parameter 1 to be double, string given in /home/gbairway/public_html/wp-includes/functions.php on line 165
    2 3 h P W w

    I have tried deactivating all plugins and switching themes to default twentythirteen. Same error.

    Anyone have any ideas? Thanks.
    Jason

  2. btlewand
    Member
    Posted 8 months ago #

    Am setting up my site and ran across same problem in the last day or so. There doesn't seem to be a clear solution or even an idea of where to troubleshoot.

  3. Frank McClung
    Member
    Posted 8 months ago #

    Same issue here with the add new plugins page after updating to wp 3.7.1. Can we get some answers here WP forum admins?

  4. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Can we get some answers here WP forum admins?

    Everyone here is a volunteer. You'd be more likely to get a reply if you post your own thread -

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

    and include more details about your site/server.

  5. linkhousemedia
    Member
    Posted 8 months ago #

    You'd be more likely to get a reply if you post your own thread

    I really don't think lots of different posts about the exact same error which seems to be un-reproducable will help.

    However, since I'm the OP, I'll add that this install is running on the same server that most of my wordpress sites are (which is many). It's a shared WHM/cPanel server running LiteSpeed Web Server, rather than Apache. I'm willing to bet that part doesn't matter since there are likely people seeing this on Apache servers.

    Here's a list of plugins I'm using:

    • Advanced Custom Fields
    • Advanced Custom Fields: Gallery Field
    • Antispam Bee
    • Facebook Widget
    • Formidable (upgraded to pro)
    • Google Analytics for WordPress
    • MailChimp for WordPress Pro
    • WooCommerce
    • WooCommerce Booking Plugin
    • WooCommerce Min/Max Quantities
    • WooCommerce Product Add-ons
    • WooCommerce Table Rate Shipping
    • WooSidebars
    • WooThemes Helper
    • WordPress SEO
    • WP User Avatar
    • YouTube SimpleGallery

    Again, the problems don't disappear when the plugins are deactivated and the theme is switched to default.

  6. esmi
    Forum Moderator
    Posted 8 months ago #

    I really don't think lots of different posts about the exact same error which seems to be un-reproducable will help.

    Sorry but that's how these forums work.

    Unless you are using the same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme & configurations as the original poster, do not post in someone else's thread. Start your own topic.

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

  7. linkhousemedia
    Member
    Posted 8 months ago #

    Sorry but that's how these forums work.

    Okay. My mistake.

    Let's talk about the actual issue now!

  8. btlewand
    Member
    Posted 8 months ago #

    These are what I have active that are on the linkhousemedia list.

    Advanced Custom Fields
    WooCommerce
    WooCommerce Product Add-ons
    WooThemes Helper

    I just added WooCommerce Product AddOns on Saturday and I believe WooCommerce and WooThemes Helper were updated in the last week. As noted deactivating and reactivating the plugins don't do anything. Wouldn't this have to be related to some entry in the database somewhere that is causing the problem when the website is trying to connect to wordpress.org.

    What is frustrating for me in trying to troubleshoot this problem is thta it has been brought up before in other posts and the posts are closed out without a solution.

    http://wordpress.org/support/topic/error-on-users-page-in-network-admin?replies=5

    http://wordpress.org/support/topic/functionsphp-error-9?replies=7

    http://wordpress.org/support/topic/functionsphp-error-10?replies=4

    http://wordpress.org/support/topic/network-dashboard-functionsphp-error?replies=27

    Thought a thread was closed out only when a definitive solution was found.

  9. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    What is frustrating for me in trying to troubleshoot this problem is thta it has been brought up before in other posts and the posts are closed out without a solution.

    None of those are about the current version of WP - and threads are automatically closed after one year - see:

    http://codex.wordpress.org/Forum_Welcome#Closing_Posts

    And (@btlewand) you're still posting in a thread that is not yours.

    That said, have you tried the standard and widely posted troubleshooting steps of:

    deactivating all plugins AND switching to the default theme to see if that fixes the problem?

    resetting the plugins folder by FTP or PhpMyAdmin.

    re-uploading all files & folders - except the wp-content folder and wp-config.php & root .htaccess files - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  10. btlewand
    Member
    Posted 8 months ago #

    @WPyogi - did the basic drill (plugins on/off, different theme, reinstall) you recommended about 9 hours ago after reading through the threads with similar issues without a posted resolution. Note that others have done the same thing and are still getting the issue as well. I can find pretty much any solution online since most people have typically had a similar WordPress problem at one time or another except for this one and I've posted on the same thread as Linkhousemedia and Frank McClung since they are experiencing the same issue within the last few days and we all likely have the same issue.
    Don't get the logic of opening up the same problem multiple times when the first instance of the posting isn't solved and the other people are having the SAME exact issue.

    I guess I I'll just sit back and wait and see what gets posted on this thread. At this point two years of posts with the same error message (regardless of the WP version) hasn't had a final resolution other than getting closed out due to any further activity.

    Lastly scanned my site with Sucuri and everything is clean. Perhaps the next version of WP will fix it.

  11. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    If you have done all that, have you asked your hosting company? Which is who?

  12. btlewand
    Member
    Posted 8 months ago #

    Hosting company is SiteGround. No I haven't since they would likely claim this type of issue is WordPress installation specific, but I will. My other sites they are hosting work fine.

    Guess for now everyone else on this thread should also check with their hosting company as well and post back. Correct?

  13. linkhousemedia
    Member
    Posted 8 months ago #

    There's no way a host is going to say this is their issue. That's a pass-the-buck answer. What do we say to them? "I've been using wordpress and all of a sudden the 'add new plugin' page is throwing a function error"? I can't see them spending their time on that. I think my next test will be a new install of wordpress in a dev environment and start adding plugins one by one to see if one of them triggers the error. I can't see that working though since I'd likely have to replicate every setting of every plugin.

    Back to square one.

  14. btlewand
    Member
    Posted 8 months ago #

    @WPyogi - I'm going to send my web host a support ticket and hopefully they won't laugh at me.

    Here's another post I commented on yesterday where people are having the same issue. Would think if all of a sudden a number of people are posting about the same problem, there might be a bigger issue to investigate. http://wordpress.org/support/topic/number_format-illegal-string-offset-count-errors-kills-add-new-plugins?replies=6#post-4949593

    Is there anyway to find out who is in charge of the connection between WordPress websites and WordPress.org? Issue doesn't seem to be specific to a plugin as the plugin is usually noted in the error message and this issue is specific to connecting from a WordPress installation to the WordPress.org site. Since this issue never seemed to get resolved and appears to be intermittent for some, it would appear to be some bug or connection issue to the WordPress site. If we can't resolve anything in this thread, can some sort of bug report be logged at WordPress to investigate?

  15. btlewand
    Member
    Posted 8 months ago #

    @WPyogi - Was curious to why the above thread I posted was closed: http://wordpress.org/support/topic/number_format-illegal-string-offset-count-errors-kills-add-new-plugins?replies=6#post-4949593? You noted that threads are closed after a year. That one was closed after four days without a resolution???? You also want everyone to open their own thread and when they do and can't be answered it gets closed. Thought the purpose of these forums was to find solutions. I understand not every issue can be solved easily but as a moderator I would think there would be a process where multiple unresolved inquiries about similar problems get sent to WordPress after some point. How is that done?

    What we're getting with this issue is "hi this is customer service, how can we help you? We don't know what the problem is, sorry for the inconvenience, how else can we help?"

    Just received info from my web host. Site is running fine with no errors other than the WordPress new plugin install process generated from the functions.php. They recommended contacting WordPress :-). BTW - PHP version running on the site is 5.5.3 which was released in August 2013 just a few months before the latest WP release. Would hope that would not be an issue. Plus all my sites are on the same server and the other sites don't have the WP error noted.

    Moderators: Please don't close this thread until everyone noting this shared common issue has a solution that works. Thanks.

  16. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    I did not close it, but in general, threads that have many people chiming in become unwieldy and confusing, so they may get closed for that reason.

    I also just posted an email to the support email list asking for help with this issue with references to this and other threads. Those generally get read by senior developers so hopefully they'll chime in here :).

  17. esmi
    Forum Moderator
    Posted 8 months ago #

    Was curious to why the above thread I posted was close

    I closed that topic because it simply became too muddled to effectively help anyone. We do keep asking people to please post their own topics and not to tag onto someone else's topic as similar symptoms may be caused by very different root problems.

    Unless you are using the same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme & configurations as the original poster, do not post in someone else's thread. Start your own topic.

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

    However, it seems our requests are being ignored, thus reducing the chances of anyone you being helped effectively. If you wish to maximise the chances of getting an effective solution, post your own topic!

  18. linkhousemedia
    Member
    Posted 8 months ago #

    ...in general, threads that have many people chiming in become unwieldy and confusing, so they may get closed for that reason.

    I agree that sometimes those threads can become confusing so the reminder to start a new topic is okay. But sometimes it's extremely helpful, especially when it starts to look like everyone is experiencing the exact same issues.

    Thanks very much for opening a support ticket. I truly think there's a larger WordPress issue happening here.

  19. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 months ago #

    Let's clarify a few things:

    The number_format() message is a symptom, not the actual error. You're getting this message here because you're trying to get data from the WordPress.org servers, and failing.

    In other words, the number_format() error on line 155 is because it's trying to print something that isn't actually a number.

    Say you're trying to get a list of popular plugins from WordPress.org. But for whatever reason, you can't get that list and it gets some kind of error instead. Now, that number would be like "page 1 of whatever" normally, but because you don't have any results, that "1" isn't a valid number. That's where the error comes from.

    What you need to figure out is why your server cannot get results from api.wordpress.org. I just checked it, and it's working fine, and I can get results from it fine, for all of popular and newest and also keyword searches.

    Note that one of the changes in WordPress 3.7 was to make all interaction with the WordPress.org API servers happen via HTTPS only. By using secure connections, this can prevent man-in-the-middle attacks on your communications. If your webserver is not configured to have a method of performing outgoing HTTPS requests, then this could be a possible result. The quick fix to this would be to figure out how to install or enable php_curl on your webserver or hosting service.

    However, that may not be the problem, and anything that interferes with communication could cause it. I'd recommend making a fresh test-install on your server, in a subdirectory, and seeing what its behavior is like. Might help to narrow down the issue.

  20. esmi
    Forum Moderator
    Posted 8 months ago #

    especially when it starts to look like everyone is experiencing the exact same issues.

    In this case, it has already been noted that people are NOT experiencing the same issues. The errors are pointing to completely different core scripts.

  21. linkhousemedia
    Member
    Posted 8 months ago #

    @Otto, thank you. That was a helpful post.

    I have CURL enabled and as previously stated, am running Litespeed Webserver. Other sites on this server are working fine so I can't see that being the issue. Regardless, here are the curl settings:

    curl
    cURL support enabled
    cURL Information 7.24.0
    Age 3
    Features
    AsynchDNS No
    Debug No
    GSS-Negotiate No
    IDN Yes
    IPv6 Yes
    Largefile Yes
    NTLM Yes
    SPNEGO No
    SSL Yes
    SSPI No
    krb4 No
    libz Yes
    CharConv No
    Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp
    Host x86_64-unknown-linux-gnu
    SSL Version OpenSSL/1.0.0
    ZLib Version 1.2.3

    Any other thoughts? I get that the number_format() message is a symptom. I'm just curious though - how do we narrow it down if disabling all plugins, resetting the plugin folder, and using a default them all produce the same result? Like I said, Other sites running the same version of WP on the same host work okay. I would have to add all plugins back one by one and configure them exactly the same to test the way you're asking. When you have plugins like WooCommerce running that is incredibly time consuming, if not impossible.

    But all of that notwithstanding... why would a plugin or theme affect your framework's ability to connect to its own server? This has to be an issue of WordPress not error checking somewhere when it's not common across all sites on the same shared hosting environment.

  22. btlewand
    Member
    Posted 8 months ago #

    @Samuel if you have a site http://www..com and another http://www..com/dev and they are on the same server with the same version of WordPress with the same active plugins and the one in the subdirectory gets the error message and the core site does not, do you know what might cause that? Plus up until a few days ago both were functioning without error messages. I wouldn't think a subdirectory would not be an issue and I think others on this thread are experiencing the problem on their core domains.

  23. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 months ago #

    @linkhousemedia, @btlewand : As you probably understand, issues that are difficult to reproduce are difficult to solve. I can't give you exact and specific solutions to problems that I cannot see myself. My sites and my test systems work fine.

    We would need more information as to how to cause the problem in order to solve the problem, basically. Obviously, disabling plugins/themes is the first step to solving issues, in that it tends to narrow down the problem to a specific piece of code and/or make it reproducible.

    I have no idea what the cause of the problems you're experiencing are. Not a clue. I can't see anything wrong on the WordPress.org side of things. And if it's intermittent, then that suggests either a load issue (you might get blank/invalid responses from the api under heavy load), or an issue with your webserver's connection (it can't make an outgoing connection, or it times out, or something like that), or something else I know not of.

    Clearly, there is an issue in the error handling there somewhere. That's a core issue, but that also doesn't really solve the problem, just make the failure case prettier and not show those error messages. If the data isn't getting there, then the popular/newest/search lists would still be empty or have bad results in them.

  24. linkhousemedia
    Member
    Posted 8 months ago #

    Thanks @otto.

    I have had a small breakthrough. Here's what I did:

    1. Cloned the site using WP Migrate DB Pro to dev zone
    2. Deleted plugin folders via FTP one by one, each time checking to see what happened on the plugin install page
    3. When I deleted the WooThemes Helper plugin I still saw the same errors on the plugin search page HOWEVER the other pages for installing plugins such as Featured, Popular, Newest, and Favorites all worked agian!
    4. Removed the rest of the plugin folders - same result
    5. Removed all themes and installed/activated twentythirteen - same result
    6. Removed all posts and pages (and removed from trash) - same result
    7. Checked with host - connections to wordpress API are not being firewalled, however there was one strange error in the php log this morning, but it occurred only once:
      [03-Dec-2013 08:34:15 UTC] WordPress database error Lock wait timeout exceeded; try restarting transaction for query UPDATEwp_optionsSEToption_value= '1386102804' WHEREoption_name= '_site_transient_timeout_frm_autoupdate' made by do_action('admin_init'), call_user_func_array, wp_plugin_update_rows, get_site_transient, apply_filters('site_transient_update_plugins'), call_user_func_array, FrmUpdatesController->queue_update, set_site_transient, update_site_option, update_option
    8. Reset all wordpress and permalink settings - same result

    My next step is to start removing database entries.

    @btlewand and @WPyogi, if you remove WooThemes Helper, what happens?

    Thanks everyone,
    Jason

  25. linkhousemedia
    Member
    Posted 8 months ago #

    I have also reached out to WooThemes to see if they can shed any light on this.

  26. linkhousemedia
    Member
    Posted 8 months ago #

    Quick update:

    My tech support at WiredTree went above and beyond trying to help me with this. They have confirmed there are no bad connection issues to report and dug as deep as they could into log files but turned up nothing other than what you see in my previous post.

    Note that uninstalling the WooThemes helper also allows me to search for new plugins. The plugin tag cloud is still missing and replaced with the errors stated previously.

  27. btlewand
    Member
    Posted 8 months ago #

    Same thing on your item #3 above. PHP warning and broken plugin tag cloud but you're right the links for Featured, Popular, Newest, and Favorites all worked again when I deactivated WooThemes Helper 1.2.1.

    The site I copied from to create my Dev site still has WooThemes Updater 1.1.3 and the Plugins>New functionality still works fine.

    Deleted 1.2.1. from my test site and rolled back to 1.1.3 and that didn't fix the problem. So whatever version 1.2.1 does when you install it jacks up WordPress somewhere (I guess the database) which results in the PHP warning. @LinkhouseMedia good luck on the database scrub. Hopefully there is a variable somewhere that creates a conflict. My guess is that the WooThemes updater is checking their database remotely for licenses which must be conflicting when you try to access WordPress.org remotely from the Add New Plugin.

    @Frank McClung - If you're still checking in can you let us know if you are using a WooTheme theme or plugin as well. If you do this definitely is the common thread in the mystery.

  28. btlewand
    Member
    Posted 8 months ago #

    fyi - I have opened up a support ticket at WooThemes as well.

  29. btlewand
    Member
    Posted 8 months ago #

    Partial Breakthrough also on my end. When into PHPMyAdmin in cPanel and looked at the databases WooCommerce would add. Went into:

    wp_woocommerce_downloadable_product_permissions

    Field #10 is download count. Number in field is 0. Edited and changed to 1.

    Refreshed the PlugIns AddNew screen and the tag cloud was back and php error is gone.

    Only issue is the links for Popular, New, Favorites and Featured still don't work but at least the error message is gone. Will need to see what WooThemes comes back with to fix the remainder.

  30. btlewand
    Member
    Posted 8 months ago #

    fyi - if you're able to roll back to the previous version of WooUpdater 1.1.3 for me. Everything in the New Plugin page works once you change the item above from 0 to 1 in the database.

Reply »

You must log in to post.

About this Topic