“Software is a great combination between artistry and engineering. When you finally get done and get to appreciate what you have done it is like a part of yourself that you've put together. I think a lot of the people here feel that way.” -- Bill Gates

Tuesday, January 23, 2007

Configuring Apache, PHP and MySQL

There are many articles on the web detailing the installation of Apache, PHP and MySQL, so why another post adding to already muddled space. Rightly so, However, I faced lot of issues while going through the process of the installation of the said software. I also needed to setup some PHP extensions which was not clear in any of the tutorials. This is precisely the reason why this article finds its way into the web.

Now Coming to the task at hand, first I will detail the installation of these components all by yourself on windows system. After you are done with all the steps, I will tell you about two packages which I came across while going through the installation process. These packages will simplify all the effort needed above. If you are a developer/administrator, I strongly suggest you to go through the installation process and then look into these packages.

The software used and there versions are:
i) Apache HttpServer 2.0.59
ii) PHP 5.2.0
iii) MySQL 5.0.27
iv) phpMyAdmin 2.9.2

Apache: Get the windows installer for the specified version from Apache. Then you have an excellent tutorial "How to install apache on windows" at evaria. Please follow the steps as indicated at that post.

PHP: Get the "zip package"version from PHP(under windows binaries). I was not very happy using the windows installer version as it does not do what it say it will(if you are curious you can explore it, else mail me). Now we are back to evaria, go to this tutorial "How to install php5 on windows" and follow the steps as mentioned. However, instead of php5 as the directory create "c:\php" as the directory. Once the php configuration is done, configure the Apache web server as mentioned in the same tutorial.
All the while remember that you are using the directory path "c:\php" and the tutorial mentions it as "c:\php5". If you need to install any php extensions follow the steps provided over here at PHP installation of extensions on windows. Once this is done major part of the installation for a general user is done. I will discuss the other part at a later stage in the post.

MySQL: Get MySQL Community server version as mentioned above from here. We are back to evaria, go to the tutorial "How to install MySQL 5.0.x on windows" and follow the steps given over there. When you come to the third part "Getting PHP to work with MySQL" you will see the following paragraph.
"Unfortunately PHP5 removed built-in support for mySQL. So you´ll need to copy some files by hand. open the folder you unzipped your PHP to. Copy the libmysql.dll file (should be located like c:\php5\libmysql.dll ) into your Window´s System folder (usually C:\Windows\System32\ although might be c:\WinNT\System\ or something). "
Instead of doing as above, follow this last step in the same section.
" If you don´t want to move files outside your php5(in this case "c:\php") directory, you may also add the php5 directory to the PATH on Windows. Please read the following article on how to do this."
Rest of the steps in this stage are as mentioned in the tutorial.

phpMyAdmin: phpMyAdmin is a browser based support for php and mysql. Get alllanguages.zip
for the latest version from its download page. Once you get this extract the files to phpMyAdmin to httdocs in the Apache folder (c:\Apache2\httdocs). Open the browser and goto "http://localhost/phpMyAdmin" and you are ready to configure your MySQL database server.

In most cases it ends here, pretty straight forward after a few googles. However, in my case I also needed to enable soap extensions in php and install PEAR support for php. These seemingly innocuous things proved a thorn. At last I could nail it after more than half a day of effort.

php soap extensions: Check out the following pdf. It nicely describes way to install the soap extensions (You will feel, Oh! why did I not get this earlier?).

PEAR: PEAR stands for Php Extension and Application Repository. Installing PEAR is a tricky part. Most of the google searches will ask you to run go-pear.bat file in the php directory. Do run it and check why I say it is the tricky part. It just does not help. So what do you do? Follow me.
Under Getting Manager (Windows) in PEAR installation manual you will find the correct steps to install. In summary save the following link "http://go-pear.org/" as go-pear.php, into the php5 folder ("c:\php5"). Goto the command prompt and execute the following at the prompt "php.exe go-pear.php", follow the instructions that are displayed. After a few instructions you are done with PEAR installation. If you think it is done, no it's not. We have one more thing to do. Go to the file php.ini in "c:\php", search for include_path and add "c:\php\pear" as one of the paths.

In the introduction to this post I said I will be introducing you to two packages which does the above job in a very admirable fashion. These are wamp and Xampp. Please go through the websites for both of them to learn more about them. I tried out both and should my vote goes for Xampp. The issue with wamp is though it install the individual softwares, it is to the user to configure them, also it does not install pear. I just need to download Xampp for windows and download the installer version. Follow the installation steps and voila!! it does all the above things and much more in 1/nth time of what it took you in the first case.

Ah! Finally we are done with the installation of Apache, PHP with PEAR, MySQL, phpMyAdmin. Now go ahead and play.


Read more!

Tuesday, January 9, 2007

Alternate Languages for .NET

I doubt if any software engineer will contest the title of this blog "An art called Software" , software is truly an art and we software engineers take pride in being artists. What has this got to do with .NET might be your question. I am coming to that. Just as every artist uses his medium to express his artistry, we programmers use our own medium of programming languages to bring out the creativity in us.

Just as various forms of art, music, painting, sculptures, dance, mingle among themselves to create mind blowing performances, all these programmers through their medium(programming language) communicate with other programmers to create this thing called software. This analogy should give you an insight of the complexity involved in creating a software.

However, just as schools exist for bringing together all these artists and help them not only to coexist, but also to create blends; we have something called a .NET platform. I could envision something of this nature when I first heard of Java. I believe Java succeeded to some extent but fell short on some others. .NET which derived heavily from Java has done away with some of these limitations and come up with a great platform. Come to think of it, I can code in any of the Microsoft promoted languages C#,VC++, VB, J# or the alternate languages like COBOL, Pascal, Small Talk, Ruby, PHP and host of others. And it's just not coding in these languages but also ability to use libraries coded in other languages on .NET framework stands equally tall to all those schools of learning.

An article Tony Patton in builderau mentions in detail on how some other languages support .NET. I appreciate Microsoft this initiative. Though there are many who decry it as Microsoft's ploy to maintain there supremacy, I have one question for them, did some one come up with an initiative like this. If no do they have any plans for such a thing a near future? I have only one thing to say to all of you. Please stop the critique, just get back to your systems and get to creating more master pieces. I for one am using .NET as my canvas.


Read more!

Why Another Blog

Folks, I already have too many blogs, need to sit down and clean them. In a process to revamp my strategy, I am having one more on software where I will write on programming and some software methodologies.

For now this is the introduction!!.


Read more!