Domanda

I have Wordpress 3.8 running on google-app-engine. Everything works fine except the paypal return page with the s2Member® plugin. I think its related to an fopen() or URL fetch error.

The Server Scan By: s2Member® (http://www.s2member.com/kb/server-scanner) in my application reports following issue:

[ERROR] cURL Extension / Or fopen() URL One or more HTTP connection tests failed against localhost. Cannot connect to self over HTTP — possible DNS resolution issue. Can't connect to: http://foto-box.appspot.com

In order to run s2Member®, your installation of PHP needs one of the following...

  • Either the cURL extension for remote communication via PHP (plus the OpenSSL extension for PHP).
  • Or, set: allow_url_fopen = on in your php.ini file (and enable the OpenSSL extension for PHP).

The app-engine Log report is:

PHP Warning: file_get_contents(http://foto-box.appspot.com): failed to open stream: Request deadline exceeded in /base/data/home/apps/s~foto-box/3.372404596384852247/wordpress/s2-server-scanner.php on line 1002

I know there is no cURL on app-engine, but fopen should work by default. How do I exactly modify the deadline time to figure out if that is the problem?

Where do i have to include

deadline=60 

or

$options = ["http" => ["timeout" => 60]];
$context = stream_context_create($options);
$data = file_get_contents("http://foo.bar", false, $context);

in my wordpress or app-engine files exactly to increase the timeout? php.ini, index.php,... or wp-config.php?

È stato utile?

Soluzione

I had a look at the script - you can change the timeout on line 1000. It is currently 5 seconds, change it to something like 30 seconds.

if(is_resource($_fopen_test_resource = stream_context_create(array('http' => array('timeout' => 5.0, 'ignore_errors' => FALSE)))))

P.S. It might be a good idea not to run arbitrary scripts that you download from the internet - just sayin.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top