Forum Moderators: coopster

Message Too Old, No Replies

PHP5 file variables problem (include)

         

Asia_Expat

10:57 am on Aug 7, 2007 (gmt 0)

10+ Year Member



I'm trying to migrate my site to PHP5 but I have an issue with an include.

<?php include("http://www.example.com/forum/ssi.php?a=active");?>

It stopped functioning and give me the following error...

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /homepages/24/d123456789/htdocs/mydomain/index.php

I tried to fix it with this but no joy...

<?php include($_SERVER['DOCUMENT_ROOT'] . "/forum/ssi.php?a=active");?>

[edited by: Asia_Expat at 10:57 am (utc) on Aug. 7, 2007]

Habtom

11:54 am on Aug 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<?php include("http://www.example.com/forum/ssi.php?a=active");?>

I didn't know you can include a file with all its parameters.

Something like this looks more natural :)
<?php include("../forum/ssi.php);?>

Check the relative path and adjust it. ;)

Asia_Expat

12:26 pm on Aug 7, 2007 (gmt 0)

10+ Year Member



The relative path is correct but still no joy.

dreamcatcher

12:54 pm on Aug 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It might be the following directive in the PHP.ini file:

allow_url_include Off

Can you turn that on?

dc

Asia_Expat

1:13 pm on Aug 7, 2007 (gmt 0)

10+ Year Member



I'll check that shortly but is it true that using the full http path sucks resources?