CURL and similar functions failing on local server names
-
Whenever a local server file is referenced via URL, the load function times out. Examples of functions: file_get_contents(), any of the CURL stuff, getimageresize().
I’ve checked and allow_url_fopen is enabled. Also CURL is installed.
The problem surfaced in two scenarios:
1. I installed the paid version of WP to iPad. It attempts to load a file via URL when using the getimageresize() function, and times out. The timeout is what shows up in the php_errors.log.
2. I installed the FeedWordPress plugin, and when attempting to load an RSS feed from a Drupal site on a different sub-domain server, it fails.
TESTING AND DETAILS
A. 1 web server – mydomain.org
B. 1 Drupal site – https://www.mydomain.org
C. 1 WP multi-site install – community.mydomain.org/<instance>Both of the problems are surfacing in C. The WP to iPad plugin cannot load an image via URL/HTTP request that is on the same server C. The FeedWordPress plugin cannot load an RSS feed via URL/HTTP request that is on B.
I am positive this is due to the .htaccess rewrite rules. I need to figure out how to write some exception rules so that when a WP instance on C requests a URL, it resolves correctly. FYI I even tried via IP address, that didn’t work.
BUT, I can write a simple <?php echo file_get_contents(“https://www.google.com”); ?> script and this works fine on B and C. So again the only issue is a URL/HTTP request from B or C that attempts to load a resource on B or C.
Any help appreciated!
- The topic ‘CURL and similar functions failing on local server names’ is closed to new replies.