Reply to Re: [PHP] HTTP Include Error

Your name:

Reply:


Posted by AdamT on 03/01/05 11:22

On Mon, 28 Feb 2005 15:35:36 -0700, Suhas <psuhas@gmail.com> wrote:
> Hi
>
> This issue has been discusses many times before, but no perticular
> solution found.
>
Things to check when 'including' with http:

i) Can the server resolve the host name? Eg - if, from the server,
you run 'ping host.example.com, will it resolve this to an IP address?
ii) Can the server connect to that IP address on port 80?
iii) Are you marking up files and directories properly? /example.php
is a file, whereas /example.php/ is a directory (note the forwardslash
on the end).
iv) Is the file-system case-sensitive? Might
example.com/thingy/index.php be different to
example.com/THINGY/Index.PHP ? This is more likely on UNIX
filesystems.
v) Are you trying to connect with HTTP/1.1 to a server which only
understands HTTP/1.0 ?
vi) Is there something in the path which might be causing the problems
with php? Eg - special characters which would need to be \'escaped\'.
This is a particular nuisance when connecting to IIS boxen which
don't have the default domain configured, so you have to give a
username in the format of DOMAIN\username.
vii) You *did* plug that network cable back in, didn't you?
viii) The file does actually exist, doesn't it? Try GETing the URL
manually with telnet:
telnet example.com 80
GET /uri/of/file.php HTTP/1.0
Host: example.com
<CR/LF><CR/LF>

And see what you get back. You'll either get the page contents sent
to you, or a 404 (This file isn't here), or maybe you'll get a 302
(Object has moved). A 302 looks like this in the headers:

HTTP/1.0 302 Found
Location: /newlocation

If you look at it in a browser, you'll be taken to the new location,
and probably won't notice that anything was ever wrong. If you try to
'include' from that path, it'll fail.


--
AdamT
"Justify my text? I'm sorry, but it has no excuse."

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация