PHP instllation on Apache and configure it to run MysQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mefdo
Forum Newbie
Posts: 10
Joined: Mon Jul 29, 2002 10:06 am

PHP instllation on Apache and configure it to run MysQL

Post by mefdo »

Hello
I am a newbee. I was asked to do above installation on a Server.

Can some one send me the link or send me the necessary steps to do after I download the PHP server stable version ?

I need to pass it over to operational area so that they can do all by them selves without any PHP knowledge.

Thanks
Mei
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Well, if you are running the server in linux, then do this in this order:

install mysql via source or rpm, then

cd apache-x.x.x/
./configure --prefix=/usr/local/apache --enable-module=so
make
su
make install

cd ../php-x.x.x/
./configure --with-mysql --with-xml --with-apxs=/usr/local/apache/bin/apxs
make
su
make install

This will install MySQL, Apache, and PHP. The PHP will be run as a DSO module. Next you edit /usr/local/apache/conf/httpd.conf and set the required server parameters, etc. Also, put these lines in httpd.conf:

AddType application/x-httpd-php .php
LoadModule php4_module libexec/libphp4.so

Now do /usr/local/apache/bin/apachectl start

This will start up your HTTPD server and now you can do http://localhost and VOILA!
mefdo
Forum Newbie
Posts: 10
Joined: Mon Jul 29, 2002 10:06 am

Install PHP on Apache and then Connect to mySQL

Post by mefdo »

I am sorry I was not too clear. I am running Windows NT4.0

Could you please tell me what are the differences for Win NT ?
Thanks a bunch

Placida

-----------------------------------------------------------------------
protokol wrote:Well, if you are running the server in linux, then do this in this order:

install mysql via source or rpm, then

cd apache-x.x.x/
./configure --prefix=/usr/local/apache --enable-module=so
make
su
make install

cd ../php-x.x.x/
./configure --with-mysql --with-xml --with-apxs=/usr/local/apache/bin/apxs
make
su
make install

This will install MySQL, Apache, and PHP. The PHP will be run as a DSO module. Next you edit /usr/local/apache/conf/httpd.conf and set the required server parameters, etc. Also, put these lines in httpd.conf:

AddType application/x-httpd-php .php
LoadModule php4_module libexec/libphp4.so

Now do /usr/local/apache/bin/apachectl start

This will start up your HTTPD server and now you can do http://localhost and VOILA!
Post Reply