简体   繁体   中英

Getting 500 internal server error on Foursquare app

I am getting " 500 internal server error " on my Foursquare app. On server Side, There is timeout error on error log file:

PHP Warning: file_get_contents( https://api.foursquare.com/v2/users/self?oauth_token=XXXXXXX & amp ; v=20161129): failed to open stream: Connection timed out

Thats weird " & is converting like & amp ; " in file_get_contents

By the way , no problem on local. What is the issue? Code, my host or Block by Foursquare ? Thank you.

Mostly probably your server cannot connect to an external resource, for example, because of firewall restrictions .

try to use cURL , it gives you more options and control than file_get_contents

OR It may be execution problem. Try ini_set('max_execution_time', 300); before file get contents...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM