PDA

View Full Version : why need php path


DawG
4-1-02, 04:50 PM
Why is it that we need a path at the beggining of php when on other webservers its just fine and dandy to leave it off? Is this a security issue that benefits us?

Atomic-Design
4-1-02, 05:17 PM
You need it so that the file knows where the PHP processor. Sorry if this isn't 100% correct terminology.

DawG
4-1-02, 05:25 PM
I realize that, but in the book I have and my friends web server, that line is not included on php pages and everything works fine.

sophiespo
4-1-02, 07:48 PM
PowWeb uses the cgi version of PHP. This is so that if someones script starts running off and using loads of resources on the server (resulting in everyone elses pages coming up slow) the admins can track it down and find the offending script.

You know how you have to have the path to perl on the top of CGI scripts? Its the same deal with PHP - you have to have the path to php on the top.

sophie

studentjobs
4-3-02, 09:09 AM
Exactly how big does the php have to be that its taken up a lot of resources? I plan on using many different PHP files for my website, but each one should definelty be under 1/2 mb.

wsuchewie
4-4-02, 08:08 PM
You would have to have a pretty large script to take up enough resources to have it disabled. I believe it's 10% for more than 60sec. Most php scripts won't take up that much processor capability. I wouldn't worry about it, unless you are making a multiplayer online game. If you are, buy your own server:)

MannInc
4-4-02, 08:22 PM
Personally if I had php scripts that were around 1/2 MB, I'd not only be worried about the load on the server, but also the bandwidth.

aza
4-5-02, 04:22 PM
I think simple infinite looped script with some basic procedures will bring server to knees ... :P

What you think?