Apache and PHP

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Yes, a post from me in this section... If I were you I would take a moment to think over this unique moment Laughing out loud

Anyway: I decided to learn php. So I installed Apache on my W98 machine and I installed php 4.2.3.
I did a little test and it seems that Apache sees the php code, but does not do anything with it except not displaying it. I'm a complete n00b at this, but could someone plz tell me what I forgot to do? Also I must say that I'm feeling a little sick so my brains only worked for about 60% the last few days Wink

Shakespeare: onclick || !(onclick)

He has: 1,016 posts

Joined: May 2002

You need these lines in your httpd.conf file...

LoadModule php4_module "c:/program files/php/sapi/php4apache.dll"
(this is if you load it dynamic (as a module))

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

(These tell Apache to parse PHP files)

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Thanx, I'll try that 2nite (I'm @ work now) Smiling

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

hmmm...

I don't have a sapi dir in my php dir. I de-installed and re-installed php but still don't have it.
Also the dll is called 'php4ts.dll' in stead of 'php4apache.dll'

What to do next?

Shakespeare: onclick || !(onclick)

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

I could tell you how to do it Linux. In Windows, it is different. Here is something to try.

They have: 15 posts

Joined: Dec 2002

Go to sourceforge.net and get the latest software *free* I know how everyone likes free..lol...Get PHPHome edition,it has the latest Apache,PHP and MySql all rolled into 1 and everything is configured to work,easy install..works great because I use it for testing.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.