Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

It needs connectivity to wordpress.org and is timing out. I am behind a corporate firewall. I have never had this issue come up before in previous versions. Why does themes.php need access to wordpress.org and what can I do so it doesn't (or maybe something that will allow me to use my proxy settings).

Adding in error message:

PHP Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in C:\inetpub\wwwroot\ticket\wp-admin\includes\theme.php on line 298

This is definitely new to 3.7. We have 3.6.1 installed 4-5 times and no issues. I would have people chopping off my head if they couldn't change their theme.

Update: 3.8 fixed a lot of the major issues. However we still cannot find plugins, find themes or get and of the dashboard feeds. If anyone has a solution to these - even if it a suggestion for the proxy server, that would be helpful.

share|improve this question

3 Answers 3

Navigating WP admin in general tends to trigger multiple external requests, such as fetching news feeds and theme/plugin updates (not counting whatever plugin/themes might be doing on their own).

You can put configuration constants into wp-config.php to block external requests completely/partially:

define( 'WP_HTTP_BLOCK_EXTERNAL', true );
define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,*.github.com' );

Or configure external requests to use your proxy settings:

define('WP_PROXY_HOST', '192.168.84.101');
define('WP_PROXY_PORT', '8080');
define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org');

Plus WP_PROXY_USERNAME and WP_PROXY_PASSWORD for authentication.

share|improve this answer
    
First great feedback. I will try a few things out and report. Any idea on the change in 3.7 that triggered the issue? Also is there a plugin to manage these settings. I roll out WP sites left and right and would hate to have to change things every time there is a new install or someone upgrades. –  STing Nov 5 '13 at 19:30
    
@STing I think it's likely due to API requests getting forced to use SSL in 3.7 –  Rarst Nov 5 '13 at 19:40
    
My server does support SSL. What do I need to do to make the site call back to https? This to me seems like a bug. –  STing Nov 5 '13 at 19:58
    
@STing since WP chooses between multiple back-ends for HTTP requests this is hard to advise on without hands on debug and better understanding what is going on. I would start with installing Core Control and taking a look. –  Rarst Nov 5 '13 at 20:05
    
Ugggg. So is this an issue with anyone that has SSL installed or just SSL plus firewall? –  STing Nov 5 '13 at 20:10

This is a problem with changes in WordPress’ HTTP API. It isn’t fully compatible with cURL anymore.
I am not sure, why exactly it happens (there is no context information given, when this error occurs), but you can add a temporary fix.

In a plugin, or at the very end of your wp-config.php, add the following lines:

add_filter( 'http_api_transports', function()
{
    return array( 'streams' );
});

This will disable cURL and make the error message go away without affecting other components on the server.


For completeness, here my current cURL details:

$ curl --version
curl 7.26.0 (i686-pc-mingw32) libcurl/7.26.0 OpenSSL/0.9.8x zlib/1.2.7
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp smtp smtps telnet tf
tp
Features: GSS-Negotiate Largefile NTLM SSL SSPI libz
share|improve this answer

I did not have timeouts but the https://api.wordpress.org requests were getting 500 handshakefailed errors from the corporate firewall. I discovered that on my Ubuntu 12.04 system, I had failed to install php5-curl. Once I installed it and restarted apache2, the problem went away.

share|improve this answer
    
I will double check but pretty sure curl is running. It is good to know curl is required though. Also will test out 3.8 and update the question if it is still a problem or not. –  STing Jan 6 at 20:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.