Failed opening required
am 12.01.2008 06:41:43 von big.sexy.jcw
Okay, I just set up my first dedicated server and everything is
running fine, except one script that calls a file on another server.
Failed opening required 'http://www.example.com/
somefile.txt' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /
home/example/public_html/includes/common.inc(1201) : eval()'d code on
line 43
The code that's throwing the error is:
$fp = @fsockopen("www.example.com", "80",$errno, $errstr,
$timeout="5"); if($fp) { require ''http://www.example.com/act/partner/
inclusion.php"; }
And for what it's worth I changed require with include and it then
threw:
URL file-access is disabled in the server configuration
Now, I've checked and made sure that allow_url_fopen is on and
safe_mode is off. But I still get an error so I'm missing something
somewhere. What other settings should I be looking at?
Thanks,
Jeremy
Re: Failed opening required
am 12.01.2008 07:01:51 von luiheidsgoeroe
On Sat, 12 Jan 2008 06:41:43 +0100, wrote:
> Okay, I just set up my first dedicated server and everything is
> running fine, except one script that calls a file on another server.
>
> Failed opening required 'http://www.example.com/
> somefile.txt' (include_path=3D'.:/usr/lib/php:/usr/local/lib/php') in =
/
> home/example/public_html/includes/common.inc(1201) : eval()'d code on
> line 43
>
> The code that's throwing the error is:
>
> $fp =3D @fsockopen("www.example.com", "80",$errno, $errstr,
> $timeout=3D"5"); if($fp) { require ''http://www.example.com/act/partne=
r/
> inclusion.php"; }
>
> And for what it's worth I changed require with include and it then
> threw:
>
> URL file-access is disabled in the server configuration
>
> Now, I've checked and made sure that allow_url_fopen is on and
> safe_mode is off. But I still get an error so I'm missing something
> somewhere. What other settings should I be looking at?
allow_url_include
(which is something you don't want, way to risky normally to include =
'foreign' code, if your just looking for it's output, use =
file_get_contents() or the like)
-- =
Rik Wasmus
Re: Failed opening required
am 12.01.2008 07:35:54 von big.sexy.jcw
On Jan 12, 12:01 am, "Rik Wasmus" wrote:
>
> allow_url_include
>
> (which is something you don't want, way to risky normally to include
> 'foreign' code, if your just looking for it's output, use
> file_get_contents() or the like)
> --
> Rik Wasmus
Thanks Rik, worked like a charm. And I agree with you that it's rare
to want to just include a file like this, but it's one of those times
where it's needed.
-jeremy
Re: Failed opening required
am 12.01.2008 11:27:08 von Paul Lautman
Rik Wasmus wrote:>
> (which is something you don't want, way to risky normally to include
> 'foreign' code, if your just looking for it's output,
http://groups.google.co.uk/group/alt.possessive.its.has.no.a postrophe/topics?lnk=sg