Can we set "allow_url_fopen" "ON" by using ini_set() function in php
Asked
Active
Viewed 2.4k times
7
-
1Have you checked with that settings documentation that it is possible at all to use `ini_set()` function to set it? http://php.net/filesystem.configuration#ini.allow-url-fopen – hakre Jul 10 '13 at 14:37
-
This is usually disabled by hosts as a security precaution. It wouldn't be a very useful precaution if you could override it yourself. – ceejayoz Jul 10 '13 at 14:39
4 Answers
15
you can't, "allow_url_fopen" has the changable mode PHP_INI_SYSTEM
Entry can be set in php.ini or httpd.conf
and not by ini_set()
http://www.php.net/manual/en/configuration.changes.modes.php

Alex Stallen
- 2,223
- 15
- 17
3
The allow_url_fopen
directive belongs to PHP_INI_SYSTEM
and cannot be set via ini_set()

Salketer
- 14,263
- 2
- 30
- 58