Re: PHP 5 file_get_contents() problems
| From: | Greg Bowser | Date: | Tue, 18 Mar 2008 14:24:40 +0000 |
| Subject: | Re: PHP 5 file_get_contents() problems | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271726@lists.php.net to get a copy of this message | ||
for security reasons, allow_url_include can only be set from the main
php.ini
On Tue, Mar 18, 2008 at 10:22 AM, Thijs Lensselink <dev@lenss.nl> wrote:
> Quoting Chris <cwilli14@rochester.rr.com>:
>
> > I've encountered a situation where under PHP 5 the file_get_contents()
> > function will not work properly (actually not at all) if the php.ini
> > Filesystem configuration parameter, allow_url_include is set to OFF.
> > According to the PHP documentation allow_url_include is intended to
> > limiting PHP from accessing scripts on other servers.
> >
> > I have read posts that suggest setting allow_url_include to ON as
> > a solution. Well that's great if you have the ability to modify your
> > php.ini. But what if you have an account on a shared hosting system
> > and the hosting company will NOT make the requested change?
> >
> > Is there a work around to this or how would one access remote web
> services
> > if allow_url_include is OFF. This looks like a huge problem since many
> > services, like PayPal's IPN and Google maps geocoding, rely on
> communication
> > with their servers.
> >
>
> Try ini_set("allow_url_include", "1"); In your script. (not tested)
>
> If that doesn't help. You can use CURL for this :
> http://php.net/manual/en/ref.curl.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>