• Resolved meckanix

    (@meckanix)


    I’ve seen several posts regarding similar issues and all have pretty much pointed towards an issue with SSL on the local server (the server that WP is installed on), but even though I have manually updated my servers installation of OpenSSL, I still get the following error messages and it’s stopping me from being able to migrate my WP site from a soon to be previous hosting provider. Any help will be greatly welcomed:

    hound:~# openssl version
    OpenSSL 1.0.2f  28 Jan 2016
    hound:~#

    Trying to run the update script Dashboard > Update:

    Error occurred. Something may be wrong with www.ads-software.com or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to www.ads-software.com. Please contact your server administrator.) in /srv/DOMAIN/public/htdocs/wp-includes/update.php on line 303
    Warning: An unexpected error occurred. Something may be wrong with www.ads-software.com or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to www.ads-software.com. Please contact your server administrator.) in /srv/DOMAIN/public/htdocs/wp-includes/update.php on line 467
    Warning: An unexpected error occurred. Something may be wrong with www.ads-software.com or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to www.ads-software.com. Please contact your server administrator.) in /srv/DOMAIN/public/htdocs/wp-includes/update.php on line 123

    Trying to upload my WP export from my previous install from a previous hosting provider:

    Warning: An unexpected error occurred. Something may be wrong with www.ads-software.com or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to www.ads-software.com. Please contact your server administrator.) in /srv/DOMAIN/public/htdocs/wp-admin/includes/plugin-install.php on line 158

Viewing 10 replies - 1 through 10 (of 10 total)
  • Dion

    (@diondesigns)

    If this is not a localhost install, contact your new hosting provider.

    If it’s a localhost install, go to your WAMP/MAM?XAMPP dashboard and run phpinfo(). Scroll down the the extensions section and look for the curl extension.

    If it is not there, make sure you have added curl as an extension in your Apache configuration. If curl is in your Apache configuration and is not available in PHP, then you are missing one or more required library files, and you will need to fix your localhost installation.

    If there is a curl section in phpinfo(), check to insure the version is at least 7.34, “https” is listed in the available protocols, and versions are listed for both SSL and libSSH. If any of these are missing, then curl support was built incorrectly.

    Thread Starter meckanix

    (@meckanix)

    Hi DionDesgins,
    Apologies when I say a local install I mean on the dedicate server that I have control of.

    If it’s a localhost install, go to your WAMP/MAM?XAMPP dashboard and run phpinfo(). Scroll down the the extensions section and look for the curl extension.

    Apologies, but I don’t know how to check that or see the dashboard, but I did find that curl wasn’t installed at all as part of the default OS installation I had picked, so I have installed curl via the package manager.

    If it is not there, make sure you have added curl as an extension in your Apache configuration. If curl is in your Apache configuration and is not available in PHP, then you are missing one or more required library files, and you will need to fix your localhost installation.

    I can’t find a line mentioning curl in my apache config:

    hound:/# cat /etc/apache2/apache2.conf | grep -i curl
    hound:/#

    So it looks like I’m a little suck until I can access the WAMP/MAM?XAMPP dashboard and get curl referenced in the Apache and PHP configurations ??

    Dion

    (@diondesigns)

    If you’re on a dedicated server using Ubuntu as the operating system, then pretty much nothing I wrote applies to your situation.

    Since you just installed libcurl on your server, you’ll need to restart Apache in order for PHP to pick up the new library. After you do this, type the following at your command prompt:

    php -m

    If “curl” is not listed, then the curl PHP extension is either not part of your configuration, or an error occurred when trying to load the module. (I’m assuming PHP extensions were built as shared modules.)

    Thread Starter meckanix

    (@meckanix)

    It looks like curl is definitely installed in the PHP library:

    hound# php -m | grep -i curl
    curl
    hound#

    But even after restarting apache on my server the error messages still prevail :’-(

    hound# ps aux | grep -i apache
    root     25826  0.4  3.2 372984 33160 ?        Ss   20:27   0:00 /usr/sbin/apache2 -k start
    root     25835  1.6  1.6  64836 17240 ?        Sl   20:27   0:00 /usr/bin/ruby -w
    www-data 25860  0.0  0.9 373016  9984 ?        S    20:27   0:00 /usr/sbin/apache2 -k start
    www-data 25861  0.0  0.9 373016  9984 ?        S    20:27   0:00 /usr/sbin/apache2 -k start
    www-data 25862  0.0  0.9 373016  9984 ?        S    20:27   0:00 /usr/sbin/apache2 -k start
    www-data 25863  0.0  0.9 373016  9984 ?        S    20:27   0:00 /usr/sbin/apache2 -k start
    www-data 25864  0.0  0.9 373016  9984 ?        S    20:27   0:00 /usr/sbin/apache2 -k start
    root     25886  0.0  0.2  12732  2080 pts/0    S+   20:27   0:00 grep -i apache
    
    hound# /etc/init.d/apache2 restart
    [ ok ] Restarting apache2 (via systemctl): apache2.service.
    
    hound# ps aux | grep -i apache
    root     25980  0.7  3.2 372984 33280 ?        Ss   20:28   0:00 /usr/sbin/apache2 -k start
    www-data 26014  0.0  0.9 373016  9980 ?        S    20:28   0:00 /usr/sbin/apache2 -k start
    www-data 26015  0.0  0.9 373016  9980 ?        S    20:28   0:00 /usr/sbin/apache2 -k start
    www-data 26016  0.0  0.9 373016  9980 ?        S    20:28   0:00 /usr/sbin/apache2 -k start
    www-data 26017  0.0  0.9 373016  9980 ?        S    20:28   0:00 /usr/sbin/apache2 -k start
    www-data 26018  0.0  0.9 373016  9980 ?        S    20:28   0:00 /usr/sbin/apache2 -k start
    root     26040  0.0  0.1  12732  2048 pts/0    S+   20:28   0:00 grep -i apache

    Is there a certain permission level; i.e. 755, 775? that’s needed on these files?

    hound# ls -la /srv/DOMAIN/public/htdocs/wp-includes/update.php
    -rw-r--r-- 1 www-data www-data 23049 Feb 20 23:12 /srv/DOMAIN/public/htdocs/wp-includes/update.php
    Dion

    (@diondesigns)

    If you’re running PHP as the Apache (www-data) user, then you will have problems with uploading files if the WordPress files/directories are owned by any other user. You can of course solve the problem by making all directories world-writable, but that is dangerous. A much better solution is to reconfigure Apache to run PHP as the same user who owns the WordPress files, and then use PHP-FPM.

    Thread Starter meckanix

    (@meckanix)

    If you’re running PHP as the Apache (www-data) user, then you will have problems with uploading files if the WordPress files/directories are owned by any other user.

    I’m definiately running Apache as www-data:

    hound:/srv# cat /etc/apache2/envvars
    <SNIP>
    export APACHE_RUN_USER=www-data
    export APACHE_RUN_GROUP=www-data

    A much better solution is to reconfigure Apache to run PHP as the same user who owns the WordPress files, and then use PHP-FPM.

    Yep the files/directory are owned by www-data:

    hound:/srv# ls -la /srv/DOMAIN/public/htdocs/
    total 188
    drwxr-sr-x  7 www-data www-data  4096 Feb 27 08:52 .
    drwxr-sr-x  4 www-data www-data  4096 Feb 20 19:31 ..
    -rw-r--r--  1 www-data www-data   418 Feb 20 23:10 index.php
    -rw-r--r--  1 www-data www-data 19930 Feb 20 23:10 license.txt
    -rw-r--r--  1 www-data www-data  7360 Feb 20 23:10 readme.html
    drwxr-sr-x  2 www-data www-data  4096 Feb 21 05:44 stats
    drwxr-sr-x  3 www-data www-data  4096 Feb 21 00:00 .well-known
    -rw-r--r--  1 www-data www-data  5035 Feb 20 23:10 wp-activate.php
    drwxr-sr-x  9 www-data www-data  4096 Feb 20 23:11 wp-admin
    -rw-r--r--  1 www-data www-data   271 Feb 20 23:11 wp-blog-header.php
    -rw-r--r--  1 www-data www-data  1369 Feb 20 23:11 wp-comments-post.php
    -rw-r--r--  1 www-data www-data  3114 Feb 20 23:11 wp-config.php
    drwxr-sr-x  5 www-data www-data  4096 Feb 20 23:11 wp-content
    -rw-r--r--  1 www-data www-data  3286 Feb 20 23:11 wp-cron.php
    drwxr-sr-x 16 www-data www-data  4096 Feb 20 23:12 wp-includes
    -rw-r--r--  1 www-data www-data  2380 Feb 20 23:12 wp-links-opml.php
    -rw-r--r--  1 www-data www-data  3316 Feb 20 23:12 wp-load.php
    -rw-r--r--  1 www-data www-data 33770 Feb 20 23:12 wp-login.php
    -rw-r--r--  1 www-data www-data  7887 Feb 20 23:12 wp-mail.php
    -rw-r--r--  1 www-data www-data 13021 Feb 20 23:12 wp-settings.php
    -rw-r--r--  1 www-data www-data 28594 Feb 20 23:12 wp-signup.php
    -rw-r--r--  1 www-data www-data  4035 Feb 20 23:12 wp-trackback.php
    -rw-r--r--  1 www-data www-data  3061 Feb 20 23:12 xmlrpc.php

    I followed https://www.linode.com/docs/websites/apache/running-fastcgi-php-fpm-on-debian-7-with-apache , execpt for the section ‘Configuring PHP Pools (Optional)’ and I’m still getting the errors :-/

    Thread Starter meckanix

    (@meckanix)

    Also here’s the current unchanged permissions on the affected files:

    -rw-r--r-- 1 www-data www-data 23049 Feb 20 23:12 /srv/DOMAIN/public/htdocs/wp-includes/update.php
    
    -rw-r--r-- 1 www-data www-data 29381 Feb 20 23:11 /srv/DOMAIN/public/htdocs/wp-admin/includes/plugin-install.php

    I’m not sure if execute is needed on these files?

    Thread Starter meckanix

    (@meckanix)

    hi, i found the solution, you just have to put this line in your wp-config.php
    define(‘FS_METHOD’, ‘direct’)
    Good Luck!

    Regards to all,

    Thanks for the fix but could you explain what this fix does? It fixed it for me but I would like to know what it does and why does this problem happens in the first place.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Problems in 4.4.2 update.php on line 123, 303 and 467 as well as plugin-install’ is closed to new replies.