Hi folks, I use the cURL extension in PHP to fetch remote web pages on Tool Labs. It works perfectly on Tool Labs when the script is run manually with the php command (on tools-login). However, when the PHP script is accessed from a browser (the script runs on an exec node), cURL mysteriously fails for some pages, returning an empty string for the curl_exec() call. Anyone can figure out what's wrong? An example of such pages is http://www.geoffreylandis.com/vacuum.html
I've built a simple test script on https://github.com/zhaofengli/stuff/blob/master/labs-connrst.php , and you can test it by: 1. running the script on your own box or on Tool Labs, with the php command (It should work with 200 in http_code and a non-zero size_download value) 2. copying the script to your public_html and accessing it from your browser (It should fail with 0 in http_code and a zero size_download value) Background: https://github.com/zhaofengli/refill/issues/11 Zhaofeng Li
_______________________________________________ Labs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/labs-l
