problem with allow_url_fopen

I have created a virtual server and upload php files. I noticed the php scripts which use to scrape data from other websites with allow_url_fopenare not working at all. Checked php.ini and allow_url_fopen=On . Do I need to change any other settings it to work?


Just to verify, is the php.ini file you edited the one in $HOME/etc/php.ini? If the domain is using FCGID or CGI (which is the default), that’s the location of the file you would need to tweak.


Hi Eric
Thanks for the reply. Actually for the reason not known to me, it started working now. Earlier also it behave similarly. I will check this again tomorrow and see if the problem recur again.

I have tried to change from FCGID to CGI but browser was displaying php script content without parsing it. So I changed back to FCGID. which one is better if i have many scripts which fetch data from database?

Thanks and Regards


FCGID is a bit faster, so if that’s working for you, that’s great.

What distro/version are you using though?


Hi Andreychek

Thanks for the reply. I will keep FCGID but can you figure out why CGI is not parsing ?