Page 1 of 1

Apache & PHP: how does it work?

Posted: Tue Nov 26, 2002 9:57 am
by moozzuzz
[font=courier new]
hi, i'm interested in how PHP communicates with the (APACHE)server. I'm thinking of develloping a proggie which manages an 1-wire-network (4 some homeautomatisationgoals), and i would be like to be able to control it via the net.

so i would be able to surf to my website, and see the online status of my network, or change it.

Any thougts on how/where to find more technical info on thiz subject?

grtzz,
/me

Posted: Tue Dec 10, 2002 11:28 am
by BDKR
Strictly speaking (or if I'm understanding you correctly) Apache, or any other web server isn't needed for this. PHP can be run as a daemon and listen for a connection from you. I do this with a load balancer for a group of replicated db's and as a way of communicating commands to machines in the network.

I based what i did off a hunk of code called phpserv by Daniel Lorch.

Now to the security issues involved, make sure you put all of this stuff behind a firewall. Addittionally, if you have a set remote ip wherever you are, make sure that only it can connect.
Leaving a port open to something that can control your home network is dangerous.

Now for on the cheap stuff, get an old P5 133 or something wth at least 16 megs, yank out the hard drive, and use floppyfw for your firewall. For home use it should be great. It's free, runs on old as dirt machines, and is ultimately configurable. I run four of them here at work on old boxes ranging from 133 Mhz to 266Mhz.

Cheers,
BDKR