By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

Server Includes

P: n/a
Server Includes were shut off on my site at:
http://web.ics.purdue.edu/~cthilges/

Warning: include() [function.include]: URL file-access is disabled in
the server configuration in /home/lookout/h2/cthilges/www/index.php on
line 2

Warning: include(http://web.ics.purdue.edu/~cthilges/header.php)
[function.include]: failed to open stream: no suitable wrapper could be
found in /home/lookout/h2/cthilges/www/index.php on line 2

Warning: include() [function.include]: Failed opening
'http://web.ics.purdue.edu/~cthilges/header.php' for inclusion
(include_path='.:') in /home/lookout/h2/cthilges/www/index.php on line 2
I use this feature so that i can have a basic template file for my site
with only two includes:

<?header=http://web.ics.purdue.edu/~cthilges/header.php>
the content
<?footer=http://web.ics.purdue.edu/~cthilges/footer.php>

With an absolute url as well i never have to count ../../../

What security reason is this disabled?
It seems to be a very convenient and irreplaceable feature.
I add pages of flashy site code this way.

Thank you,
Christopher Thilges, ct******@purdue.edu
May 17 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Christopher Thilges wrote:
Server Includes were shut off on my site at:
http://web.ics.purdue.edu/~cthilges/

Warning: include() [function.include]: URL file-access is disabled in
the server configuration in /home/lookout/h2/cthilges/www/index.php on
line 2

Warning: include(http://web.ics.purdue.edu/~cthilges/header.php)
[function.include]: failed to open stream: no suitable wrapper could be
found in /home/lookout/h2/cthilges/www/index.php on line 2

Warning: include() [function.include]: Failed opening
'http://web.ics.purdue.edu/~cthilges/header.php' for inclusion
(include_path='.:') in /home/lookout/h2/cthilges/www/index.php on line 2
I use this feature so that i can have a basic template file for my site
with only two includes:

<?header=http://web.ics.purdue.edu/~cthilges/header.php>
the content
<?footer=http://web.ics.purdue.edu/~cthilges/footer.php>

With an absolute url as well i never have to count ../../../

What security reason is this disabled?
It seems to be a very convenient and irreplaceable feature.
I add pages of flashy site code this way.

Thank you,
Christopher Thilges, ct******@purdue.edu
Christopher,

Why are you including using http protocol? Each one creates an
unnecessary call to the server to handle the include.

Rather, use:

<?php header=$_SERVER['DOCUMENT_ROOT'] . "/~cthilges/header.php"; ?>

You don't have to count ../../../ this way, either.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 17 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.