starlion — 2012-10-26T16:20:57-04:00 — #1
Warning: file_get_contents(<a valid URL>): failed to open stream: Permission denied in /var/www/html/index.php on line 13
What have i forgotten to do in my configuration of this new server to cause such an error?
allow_url_fopen is set to On.
Firewall has been disabled.
cpradio — 2012-10-26T16:42:07-04:00 — #2
I would assume file_get_contents may require the temp folder, does PHP have adequate permissions to the defined temp folder?
cpradio — 2012-10-26T16:59:00-04:00 — #3
Also found this on php.net
On Centos 5, and maybe other Red Hat based systems, any attempt to use file_get_contents to access a URL on an http port other than 80 (e.g. "http://www.example.com:8040/page") may fail with a permissions violation (error 13) unless the box you are running php on has its seLinux set to 'permissive' not 'enforcing' . Otherwise the request doesn't even get out of the box, i.e. the permissions violation is generated locally by seLinux
starlion — 2012-10-29T08:29:28-04:00 — #4
the SELinux setting was the one i missed. ^_^ thanks cp