• Hi!

    On my Dashboard and on the plugins page this error is displayed twice

    “Invalid argument supplied for foreach()” (thorw by “wp-includes/update.php:333”)

    After some search I installed the “Query Monitor” to have more detail about what WP do, and in “HTTP API calls” tab I have this cURL error on https://api.ww.wp.xz.cn/plugins/update-check/1.1/

    cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received

    Again after some search it seems that update.php throw these errors because the cURL request timeout, so the PHP variable is empty…
    So I installed “Health Check & Troubleshooting” and in the debug tab it say me that ww.wp.xz.cn is reachable.

    Can anyone help me to fix it ?

    WP installation :
    Version: 4.8.8 (I tried to update to version 5.0.3 but it’s the same)
    PHP : 7.0.12 (this environment is installed with docker and I can’t find where php in installed to update it…)

    This WP is accessible only from the local network so I can not give you the URL to have a look..

    • This topic was modified 7 years, 4 months ago by mchalavon.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I think the problem is in the php.ini file. There is a max execution time try bumping it up and see if it helps.

    Thread Starter mchalavon

    (@mchalavon)

    Hello, thank you for your answer
    I just checked the php.ini file. It is on the Docker machine and the my WP container has it as a volume :

    /www/config/(…)/php.ini:/usr/(…)/php.ini

    With the “Health Check & Troubleshooting” plugin I can see that php use this file which contains only one line :

    upload_max_filesize=16M

    =================================

    I launch Query Monitor directly when I arrived on the “update” page below “Dashboard”. I had the errors below, I pressed the “check again” button and then I have the errors in my first post.

    Calls :

    1. POST on http://api.ww.wp.xz.cn/plugins/update-check/1.1/
      redirect to https://{MyKerio}…
      STATUS = OK
    2. POST on https://api.ww.wp.xz.cn/plugins/update-check/1.1/
      STATUS = cURL error 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104

    The first one use http and he second https, could that be the problem?

    In wp-config.php file I have :

    // If we're behind a proxy server and using HTTPS, we need to alert WordPress of that fact
    // see also http://codex.ww.wp.xz.cn/Administration_Over_SSL#Using_a_Reverse_Proxy
    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
      $_SERVER['HTTPS'] = 'on';
    }

    And the .htacces contains

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    P.S : Is there a way to join some screens in my answer ?

    • This reply was modified 7 years, 3 months ago by mchalavon. Reason: Add information before answer
    Thread Starter mchalavon

    (@mchalavon)

    The request below works without “redirect” on my Kerio so I don’t think Kerio is a problem

    https://api.ww.wp.xz.cn/core/version-check/1.7/
    ?version=4.8.8
    &php=7.0.12
    &locale=fr_FR
    &mysql=5.6.34
    &local_package=
    &blogs=1
    &users=3
    &multisite_enabled=0
    &initial_db_version=37965

    Where to say to WP to redirect request on a machine ? I search in all file with NetBeans (wp-content, wp-includes, wp-admin, and the WP root) and the IDE can not find “kerio”

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘can’t update plugin, how to update PHP from WordPress’ is closed to new replies.