Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

emileej

Apache server "plugins"

This topic is 5358 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In the apache sttings file you associate the file extension ".php" with the php excecutable, but how does the apache server call that program when it encounters a .php file? Does it send the filename or the code as parameters to the program? Is it possible to send code to the php excecutable as arguments? "Stop trying to hit me and hit me!"

Share this post


Link to post
Share on other sites
Advertisement
yes

you can send files using pipes, "|".


What you should be doing though is basically the php program reads form the normal input. the calling program just sends out the input.

I think they travel over stdin and stdout. I forgot now. Also forgot if you had to redirect them, but I think redirecting them was only to chuck them into a file.

Look in your help files. its in the MS SDK (atleast the ones that are packaged with borland)

Share this post


Link to post
Share on other sites
apache has an extensions API that php may use to register itself as a handler for .php files.

Alternately, php is compiled as an executable, and one of two things happen:
1) You have a nix box, and merely mark your .php files executable and use /usr/bin/php to parse them (#!/usr/bin/php). this works very well.
2) You''re stuck on windows, and you put php in cgi-bin and call link to them like ''/cgi-bin/php.exe?/path/to/file.php'' DON''T DO THIS. You''ll get hacked. Actually, its kinda an invitation to use your computer for anything anybody wants.

As I recall, a few months ago I got in an arguement on #gamedev once with this guy who insisted that the ''php-as-an-executable'' method was insecure by definition. When I corrected him, he threatened me, and eventually banned me. How idiots like that get ops, I don''t know. Somebody made a bad decision.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!