Tuesday, December 30, 2008

Apache and PHP on OS X Leopard


As you may know, one method of controlling a Media Station (computer plugged into TV/Stereo, in this case my G4 Mac Mini) would be through a web interface. VLC offers a basic web-based interface but I am feeling froggy and want to try and build my own. In order to do so a web server will be needed as a method to control what is going on. Apache2 is built into OS X. Turning it on is a piece of cake. Under System Preferences - Sharing - you'll find the screen in which you turn on Apache:

Click this box and Apache is up and running on your machine. You can test this out by looking at http://localhost/ and you will see the stock Apache page. If you want to do this from the Terminal window, you can enter sudo apachectl start and enter the administrator password when prompted and the Apache server will start.

The files you want to serve up via Apache go here: //Library/WebServer/Documents

For my experiment I am going to be using PHP and mySQL. For details on installing and enabling PHP and mySQL on OS X, stay tuned...

3 comments:

Canucklehead said...

What you say is true
Haiku and FARK bring people
To Canucklehead

Brian Jester said...

Chris,

I'm using TitanTV for the Cable listings, what's nice about it is integrated with my WinTV card so that I can click on a program on the TitanTV web site and an info page shows up with a record button and it will schedule the recording for me, when clicked.

A couple nice features of WinTV cards is that they integrate with the TitanTV site and also that the WinTV scheduler can wake the PC up it it's in Standby (powersave sleep) mode.

I've removed the VGA monitor and have run an S-Video cable from my nVidea card to the TV.

The three drawbacks so far have been the noise from the power supply fan, the remote provided with the WinTV card doesn't work at all, and the resolution is not as high as native screen resolution.

Brian

Chris said...

Brian:

Was the card a recent purchase? Also: If your TV has an HDMI input the picture will be really clear and in HD. For us, its s-video for the CRT-based TV because it's not HD. Anyhow... it's cheaper than cable if you D/L your favorite shows or watch them on hulu.com