Shortcuts are not always shorter
We always have a tendency to cut corners. It so happened today that I was installing Magento on one of our servers since I wanted to work on a custom module. Installation is a trivial process with Magento. Usually before installing software I do a check on requirements and dependancies to make sure that the process will go smooth but not this time.
So off I went to Magento’s website and grabbed the download URL. Using SSH on my server I downloaded the scripts and went through the installation process. After going through the quick fire list of commands that are involved when you install Magento by shell I reached the step that lets users complete the installation via a browser. WOW, I was told that I had PHP 5.1 and needed 5.2
I knew this earlier but in my haste I did not run a check on requirements specification on this server. As I kept on finding a workaround I came across a hack that lets us run Magento even when we have less than 5.2. The reason for this was that I was in a haste and also this particular server has components that are PHP version sensitive.
I had to get a PHP5-CGI and change permissions but then I ran into further problems. Time to think! I wasn’t very happy with the hack either. So I said ‘No shortcuts now’. Then I tried another shortcut — updating PHP using yum
On a CentOS x 64 box using default repositories I was not able to find a version higher than 5.1. Google search led to the atomic repo which helped me update PHP version using yum. The results of haste again: it broke a few of PHP extensions. Digging further into yum repositories available to me, led to conclusion that I did not have the proper versions to work with 5.2 now. What a day!
Now I was in trouble as I had a broken PHP and work still to be done on the custom Magento module. Then began a process of uninstalling extensions using PECL and reinstalling them after pear channel update and in between going to http://mirror.centos.org or http://dev.centos.org to get any RPM’s that were required. At the end of the process I was able to get back the PHP version in place, sort out the extension related issues and also install Magento. By then I was tired and logged out of the shell.
Ohh and by the way, I am still to start working on the custom module that I originally intended to. What a shortcut!
