Re: Webpath vs Absolute Path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tony,

What you call a webpath is in fact an advanced PHP functionnality that allow (as you know) opening resources
anywhere on the web using http protocol.


But in fact they are too pitfall:
- Doesn't your test.com host interpret the PHP code before sending it to the script ?
In this case your test class for exemple will reduce to an empty file - that may cause the problem.
- Does your script host allow_url_fopen in php.ini ?
In this case 'webpath' just don't work


Without any error message it's difficult to dignanostic any problem thought.

But using 'webpath' for script inclusion is a bad idea to my view since, in addition to the problem described below, it is 10 times (at least) slower than 'absolute path'
(opening web connection - reading data from one side and from the other side ...) and can lead to double (or more) the load of your web server
(since any http opened connection open an other connection for each included file) and this can cause problems too.



Regards, Eric


At 20:57 01/12/2003, Tony Devlin wrote:
Hello List,

  I'm running an IIS 5.0 server on Windows 2000 box and have PHP Version
4.3.2 with 512 Megs Ram. I am using the CGI mode.

It's a webserver running about 26 Virtual Domains.  All Domains are running
PHP and have php scripts.

Something recently has happened and I'm not sure why.  I am hoping someone
on this list can help me.  All of these sites have been running for over 6
months or longer.  Just today a new problem pop'd up, I noticed some of my
sites were timing out and php failing to execute; I could not think of
anything similiar about the sites that were timing out.  Out of the 26
virtual domains, about 7 were timing out.  After much much much debugging I
could only find one thing similiar;

Instead of using an absolute o/s path:
IE: <?INCLUDE("d:\dir1\dir2\test.php");?>

These were using a webpath:
IE: <?INCLUDE("http://www.test.com/test.php";);?>

I changed his webpath calls to use an absolute path and boom, the sites are
working again Perfectly.

Now I prefer and usually always us an absolute o/s path, but we have another
php developer who doesn't.  Again these sites had been running correctly for
over 6 months and now all of a sudden stopped.

What could have caused these websites to stop allowing a webpath?  Why would
it all of a sudden stop working?





Tony Devlin
V. President / CTO      Airewaves Broadband
69 Robert Smalls Prkwy.
Suite 4B
Beaufort, SC 29902
tdevlin@airewaves.com
http://www.airewaves.com <http://www.airewaves.com/>
tel:
fax:
mobile:         (843) 379-2473
(800) 861-6301
(678) 480-4959







-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux