Open Source Adventures
These past few days I have been exploring the OpenSource world and have been discovering great things from it. Most of my career so far have focused on Microsoft technologies, making me naive on the alternatives.

First experiment: install PHP, MySql and Apache Server. I've read from forums that the best way to go was to install them individually. Okay I skipped that part--since there are programs like XAMP and WAMP that does it automatically for me. Yes they are good programs and I've tried them but in the end I feel dumb and lost as to where to start. I guess the people from the forums are right. So I decided to install them piece by piece.

Particularly I was successful in setting up PHP on IIS 5. As Microsoft cheapskate as I am, I downloaded the MSI installer for PHP5. I had no problems configuring it to work on IIS since the installer automatically did it for me. (Don't blame me; I needed a jump start on the thing!)

Until I had a problem: I can't seem to employ Sajax on my PHP application. Loading images were quite a problem. (Footnote: I have been using for ASP.Net web applications.) First error I encountered was: "
Notice: Undefined index: REQUEST_URI in C:\WebSites\PHPSamples\sample_code\section_2\Sajax.php on line 30"
. Looking at the code, line 30 says:
Apparently, there seems to be a discrepancy in variables among web servers. In this case, IIS does not recognize REQUEST_URI, instead it recognizes SCRIPT_NAME. I am not quite sure yet on this part but after changing that line, it worked. But I still can't make Sajax work properly on IIS.

So I decided to run my script on Apache. First task: install and configure Apache. Hmm, again it seems easy with the MSI installer around courtesy of Apache Software Foundation. But again as I'm used with user-friendly auto-configuring installers, I missed some manual configuration required. And when I finally had Apache up and running, I realized that I needed to configure it to run PHP scripts. As I don't know how, I searched the web and stumbled upon this one. That article suggests uninstalling the MSI-installed Apache web server and manually set it up with the procedures it cited. So I followed step by step and voila! It worked! Even the REQUEST_URI variable is defined on Apache. Now I may proceed with learning PHP with Ajax.

I have two web servers installed on my machine. I am running ASP/ASP.Net scripts on IIS while PHP on Apache. I have yet to find out how I can run both server-side scripting on IIS.

Lesson learned: Nothing gives a solid foundation than learning the basics. (I had to learn it the hard way.)

Read the complete post at

Published 11-13-2006 6:20 PM by Alexis' Blog
Filed under: , ,