file_get_contents returns empty string

Asked by:
HubFans / n/a Points
2016-08-09 10:04 am EST
General Server Setup

I'm using paypal API on my site for payments. It's been working for years and it stopped working I think it an issue with my server's configuration.
php file_get_contents returns string(0)"". I tried different servers it worked fine but when I try on my current server it doesn't. Did something change in the configuration?

To ask this user for more information, please first login.

To submit an answer, please login.



1,348 Points
2016-08-09 3:45 pm EST

Thank you for contacting us with your PHP issue. I suggest you monitor your PHP error log for more information regarding the error you are seeing. This may help determine what server configuration you are referring to. Ideally, we would avoid making any changes to a server that could have the potential of causing PHP code to stop running properly in anyone's account. However, if you know which server configuration might have been affected, you can contact support.

Christopher M.

To submit a comment on this answer, please first login.

I looked at my error logs and there's nothing.
I tried to use cURL method and i get these error logs:
[Tue Aug 09 12:06:36.680397 2016] [:error] [pid 660772:tid 140533851895552] [client] CAfile: /home/useduc5/public_html/thelaexp/application/libraries/cert/cacert.pem, referer:
[Tue Aug 09 12:05:55.213539 2016] [:error] [pid 661088:tid 140533793146624] [client] CAfile: /home/useduc5/public_html/thelaexp/application/libraries/cert/cacert.pem, referer:
14 Points

2016-08-09 7:07 pm EST
As a test, try disabling mod_sec security or changing your PHP version.
1,348 Points
2016-08-09 7:40 pm EST
WOW!! thanks so much I would have never figured it out. Disabling mod_sec did it! Spent nearly 6 hours debugging everything on my site for that. I'm just wondering why all the sudden this stopped working.
14 Points

2016-08-10 6:59 am EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.