Apache 2.2 and PHP 5.2.6 on Vista
Recently, I decided to learn web programming and started off with with PHP and MySQL. For reference, I bought buying the PHP and MySQL Web Development book by Luke Welling and Laura Wellington.
I have Windows Vista on a Lenovo Thinkpad SL500.
For Apache, I used apache_2.2.14-win32-x86-openssl-0.9.8k installer and it was very easy to install. Once I got the ‘It works!‘ page, that bit was complete.
Next came PHP which was the tricky bit. Considering I have no experience with PHP, I chose to use php-5.2.12-win32-installer installer. Installer asked for Apache’s conf directory at one point and rest was straightforward.
However, after doing all this, I still couldn’t get it working and after two evenings of research on the internet, I got it working by doing the following:
httpd.conf changes
1. Set the PHP5 Module
Search for LoadModule in httpd.conf and then add an entry for php5_module as follows:
2. Change the DocumentRoot.
Search for ‘DocumentRoot‘ in httpd.conf and set it as follows:
assuming D:/website is the place where you want to keep your webpages.
3. Change the Directory
Search for <Directory> in httpd.conf and set it to the same path as DocumentRoot. In my case, it looked like this:
4. Add the php5 type
Search for <IfModule mime_module> in httpd.conf . Inside this, you’ll find lot of different types of entries. Some start with AddType. Add a similar entry for PHP before the closing </IfModule>tag as follows:
5. Set the PHPIniDir
In the end of the httpd.conf file, add an entry for PHPIniDir. This should be the same as your PHP installation path. In my case, it looked as follows:
The next stage was to configure PHP.
php.ini changes
Here are the steps:
1. Set the doc_root
At the moment, I’m keeping my HTML and PHP pages in the same location. If you want the same then look for doc_root in the php.ini file and update it as follows:
2. Set the php extensions
Look for extension_dir in php.ini file. If your installation path is “C:/Program Files/php” then set extension_dir as follows:
Test configuration
After this, restart your Apache service and test your configuration by setting opening “http://localhost/phpinfo.php” . If you get a page that tells about various settings in PHP, then you are ready to go.
Goodluck !
It’s time for the trees to grow…
Dad once said,
‘For 100 years, people grow. For next 100 years, the trees grow.’
Which simply means that nature compensates for people’s action.
The climate change and natural disasters makes me wonder whether the nature is fighting back now.
Think it’s time.
Don’t give me quotes. Tell me what you know.
Ralph Waldo Emerson said that and I do get the point.
But this is sheer wisdom from Reverend Desmond Tutu and is worth sharing.
The Wise Man said,”Don’t raise your voice, Improve your argument”.
Speaks for itself .
What a wonderful world…
So, I was listening to Louis Armstrong‘s classic What a Wonderful World the other day and I just thought, “This is it. This is the song that I want to be played on my funeral . ”
May be it’s a weird thing to think but who cares 🙂
So, here’s the song one more time :
In the name of the King of Pop
Came across this great medley. As someone comments, even MJ would have been proud of this .
Here you go :
Kudos to the artists.
Hallelujah !
So, I’m sure everyone knows about this song by Leonard Cohen. Though the original is a classic, there is a cover by Jeff Buckley which I like even more.
Here it is for everyone to enjoy.
(C) 2007 SONY BMG MUSIC ENTERTAINMENT
It just makes me feel that with Jeff gone we are missing some great music like this.
Here’s a link to Grace. A good buy and that too for just 3 quids from HMV store !
That there’s good in this world..
that’s worth fighting for. – Sam, LOTR
With so much bad going on around us, it’s not easy to be positive but if we lose it, then who’s gonna hold ?
There and Back Again
So , here it starts again. I’ve been blogging on and off in past . Created, designed and deleted blogs .
I hope this blog is spared from my momentary insanity.
Comments Off on There and Back Again
leave a comment