Enabling PHP on Apache Server?

Superwormy

Golden Member
Feb 7, 2001
1,637
0
0
What EXACTLY do you have to do to enable / install PHP on an Apache web server? I've read all the help, it hasn't helped, can someone else help?

Thanks in advance?
 
D

Deleted member 4644

I have EXACTLY the same question. Actually, I am trying to get Ikonboard working on my school website. Currently we use IIS with ASP. Is there a way to run Ikonboard on IIS?
 

777php

Diamond Member
Jul 17, 2001
3,498
0
0
you have to configure apache with php first


This is in Linux so YMMV for you OS

Preconfigure Apache for PHP

./configure --prefix=/usr/local/apache

Install PHP


(I did it with mysql/gd/freetype/zlib/and jpeg support, you don't have to)
./configure
--prefix=/usr/local/lib/php
--with-mysql=/usr/local/mysql
--with-apache=../apache_1.3.22/
--with-gd
--with-freetype-dir=/usr/local/include/freetype2
--with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
--enable-track-vars
--with-zlib-dir=/usr/include

make
makeinstall

Install Apache

./configure
--activate-module=src/modules/php4/libphp4.a
--enable-module=php4
--prefix=/usr/local/apache

make
make install

Add lines to /usr/local/apache/conf/httpd.conf

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

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Or if you prefer not to waste a ton of time compiling things from scratch find the appropriate binary package and install it.

In Debian just 'apt-get intall php4' will do.
 

dude8604

Platinum Member
Oct 3, 2001
2,680
0
0
I just did it earlier today in Windows XP.

First, download the zipped version of PHP, and extract it to c:\PHP (or anywhere else, but then you'll need to change some of the paths below.
Then, stop your Apache server, and add these lines to the bottom of your httpd.conf file:

LoadModule php4_module c:\php\sapi\php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

Then copy php4ts.dll to the windows\system32 folder (or if that doesn't work then also copy it to the windows\system folder).

Start Apache, and it should work. If you need any more help with this, let me know.

By the way, all this is in the install.txt file in the zipped version of php. For some reason, php4apache.dll isn't included in the auto installer.
 

purpledemon

Senior member
Jun 21, 2001
291
0
0
dude8604 instructions are correct for apache 1.3 versions

for apache2 on windows ....

follow the same instructions but with these differences

1. use php4apache2.dll instead of php4apache.dll
2. you can skip the AddModule directive
3. Copy the file c:\php\php.ini-recommended to your windows folder: c:\winnt or c:\windows (or whatever you have)
Rename the file to php.ini

that should do it
 

UnseenRocker

Member
May 14, 2002
33
0
0
I can install apache, php, and mysql in less than 5 minutes using PhpTriad. It's a great program that installs everything for you in Windows. I use it for having a server on my dialup connection. The link for it is: PhpTriad.