The Little Guy Posted March 3, 2009 Share Posted March 3, 2009 I am making a web server, and when I make a request, I get this in the cmd output window: www.007guard.com - - [02/Mar/2009 23:47:26] "GET /index.html HTTP/1.1" 200 - Is that bad? I read that it's "Adware"... Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/ Share on other sites More sharing options...
Daniel0 Posted March 3, 2009 Share Posted March 3, 2009 ... It's just requesting your index page. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-775307 Share on other sites More sharing options...
The Little Guy Posted March 3, 2009 Author Share Posted March 3, 2009 I just wanted to know why "www.007guard.com" was there. That was using localhost if I use an IP address, that doesn't happen... I don't know why.. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-775310 Share on other sites More sharing options...
The Little Guy Posted March 4, 2009 Author Share Posted March 4, 2009 Another question. When Apache requests a PHP page, how does it say "Run the PHP parser on this file"? The way I assumed that it does it, is it runs the PHP command, in a shell or command line environment, such as an execute function or something of that nature. Would this be a fair assumption or not? To me, I feel that it may be extra work for it, but maybe I am wrong. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776602 Share on other sites More sharing options...
Daniel0 Posted March 4, 2009 Share Posted March 4, 2009 You could say that it forwards PHP pages to the PHP interpreter and that it then outputs whatever PHP tells it to, yes. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776608 Share on other sites More sharing options...
corbin Posted March 4, 2009 Share Posted March 4, 2009 TLG, the way you just described it is essentially running PHP in CGI mode. When it's loaded as an extension, it has a certain API that Apache uses to tell it "hey, do something with this file." Modules are usually always loaded, so they are usually a bit faster than initiating an executable. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776717 Share on other sites More sharing options...
The Little Guy Posted March 4, 2009 Author Share Posted March 4, 2009 So.. If Apache is forwarding the PHP to the parser/interpreter, how would it do that, and how would It get the information back? Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776773 Share on other sites More sharing options...
corbin Posted March 4, 2009 Share Posted March 4, 2009 You want to make your web server compatible with the PHP module for Apache? That's quite a large task. http://modules.apache.org/reference.php You of course wouldn't have to implement all of the Apache API handling in your server, but I would imagine PHP uses quite a large chunk of it. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776794 Share on other sites More sharing options...
The Little Guy Posted March 4, 2009 Author Share Posted March 4, 2009 You want to make your web server compatible with the PHP module for Apache? No, I would like to make my server compatible with PHP, so I can run php with my web server. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776842 Share on other sites More sharing options...
trq Posted March 4, 2009 Share Posted March 4, 2009 You want to make your web server compatible with the PHP module for Apache? No, I would like to make my server compatible with PHP, so I can run php with my web server. Its the same thing. Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776849 Share on other sites More sharing options...
corbin Posted March 4, 2009 Share Posted March 4, 2009 You want to make your web server compatible with the PHP module for Apache? No, I would like to make my server compatible with PHP, so I can run php with my web server. So.. If Apache is forwarding the PHP to the parser/interpreter, how would it do that, and how would It get the information back? In CGI mode, mod_cgi handles it. In extension mode, the PHP Apache extension is coded around the Apache module API. I'm not quite sure how PHP in CGI mode works. I know that CGI applications take in POST data on stdin and other stuff is in environmental variables, but I don't know if PHP follows the CGI specs. Quote Link to comment https://forums.phpfreaks.com/topic/147699-web-server/#findComment-776851 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.