Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Seeking help with Fatal Errors in Event Calendar Pro WordPress


Can you help?

We have a plugin (Event Calendar Pro v2) that is throwing Fatal Errors when WP Cron job runs, which stops other plugin (notably CiviCRM) from completing their own Cron tasks.

PHP Warning: file_get_contents( [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: no suitable wrapper could be found in /home/USER/public_html/sharecount.php on line 3

Need help debugging the fatal errors from Events Calendar Plugin so that other cron tasks can complete successfully.


Answers (7)


Arnav Joy answers:

what this file is doing "sharecount.php" , and why it is placed on home folder?

can you share its code please.


Agus Setiawan answers:

let me help you.


Hariprasad Vijayan answers:


Can you show your sharecount.php?

Check this thread
might help you


S├ębastien | French WordpressDesigner answers:

paste here your sharecount.php?

If you have access to your php.ini file, you can add this line inside :
allow_url_fopen = On
The problem will be resolved.

You can create a file php.ini wit php.ini with this line inside
allow_url_fopen = On
and add this file in /home/USER/public_html/


Ryan S answers:

This sounds like a server issue to me.

If allow_url_fopen is Off, you won't be able to use the http(s):// wrappers. If it's your server, you can turn it On using WHM, check phpinfo() or php.ini.

Hope that helps.


Francisco Javier Carazo Gil answers:

On sharecount.php on line 3, try to see if you are managing an URL or a local path.

The first one is like this: http://xxxx and the second, the good one is like this: /home/USER/public_html/...


Bob answers:

I think there is trouble with the url given in file_get_contents function.

somehow it is setting DOMAIN word as url.

The code on file might be something like this.

$url = ((!empty($_SERVER['HTTPS'])) ? "https://": "http://" ) . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$json = file_get_contents("" . rawurlencode($url) . "&apikey=XXXXXXX");
$counts = json_decode($json, true);
echo "This page has " . $counts["Twitter"] ." tweets, " . $counts["Facebook"]["like_count"] . " likes, and ". $counts["GooglePlusOne"] . "+1's";

Here you can see there should be <strong>url</strong> and <strong>api key</strong> as parameter.
It is setting $url variable value by itself so you might not need to write url there directly.

Now the other thing is that you require apikey to make this call working. You can get api key by signing up at below url.
[[LINK href=""]][[/LINK]]

Bob comments:

we can solve your problem if you provide is content of sharecount.php file.