[BlueOnyx:02575] Re: Per-site PHP Settings

Gerald Waugh gwaugh at frontstreetnetworks.com
Mon Oct 5 12:05:06 -05 2009


>>
>> In Server Management->Security->PHP Settings I have set Allow URL fopen 
>> to
>> Off, but one of my sites needs to scrape a page for a piece of data.  I
>> have
>> enabled the fopen option in Site Management->Domain->Services->PHP but
>> running the script via the shell gives me:
>>
>> PHP Warning:  file(): URL file-access is disabled in the server
>> configuration in /path/to/script.php line 3
>> PHP Warning:  file(<url>): failed to open stream: no suitable wrapper
>> could
>> be found in /path/to/script.php on line 3
>>
>> It appears the site-specific fopen option is ignored - can any one 
>> confirm
>> and/or advise?. Obviously I don't want to allow this option (or others)
>> globally.
>
> I think you need to enable it for the whole server. Then disable it for 
> all
> the sites except that one.
>
It may be that since php is running under apache an .htaccess file may work.
Just for kicks try;
php_flag allow_url_fopen on
in your .htaccess, although I know 'off' works, not sure about 'on'

Gerald





More information about the Blueonyx mailing list