RIPr

Apache 2.2 and PHP 5.2.6 on Vista

Posted in Tech by ripr on February 11, 2010

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:

LoadModule php5_module “C:/Program Files/php/php5apache2_2.dll”

2. Change the DocumentRoot.

Search for ‘DocumentRoot‘ in httpd.conf and set it as follows:

DocumentRoot “D:/website

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:

<Directory “D:/website”>

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:

AddType application/x-httpd-php .php

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:

PHPIniDir “C:/Program Files/php”

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:

doc_root = “D:\website”

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:

extension_dir=”C:/Program Files/php/ext”

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 !

Tagged with: , ,

It’s time for the trees to grow…

Posted in Life by ripr on January 24, 2010

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.

Posted in Life, Quotes by ripr on October 25, 2009

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…

Posted in Life, Music by ripr on September 27, 2009

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

Posted in Music by ripr on September 27, 2009

Came across this great medley. As someone comments, even MJ would have been proud of this .

Here you go :

Kudos to the artists.

Hallelujah !

Posted in Music by ripr on September 27, 2009

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..

Posted in Life by ripr on September 26, 2009

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

Posted in I by ripr on September 20, 2009

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