Jump to content

Archived

This topic is now archived and is closed to further replies.

Nylex

Need help installing Apache and PHP (RH 8.0)

Recommended Posts

Hi, I\'m trying to set up a web server with PHP support on my machine. I\'ve been following a tutorial (http://sysbotz.com/articles/amp.htm), which has been fine apart from one step. It says to do the following:

 

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

 

When I do, I get \"configure: error: unrecognized option:

--activate-module=src/modules/php4/libphp4.a\"

 

Any ideas? If it makes a difference, I\'m trying to install Apache 2.0 (httpd-2.0.45) with PHP 4.3.1.

 

Thanks for any help.

Share this post


Link to post
Share on other sites

are you trying to install php as a module of apache? honestly, i have not seen the activate module line used for php. i\'ve used this on 8.0 with php 4.3.0 and apache 2.0.43 :

 

apache:

# ./configure --with-layout=Apache

 

 

php:

# ./configure --with-apxs2=/path/to/apache2/bin/apxs --with-mysql=/path/to/mysql/bin

 

however, if you do need to use that activate line, double check the path or try using a full path if need be.

Share this post


Link to post
Share on other sites

I\'m just following that tutorial, seemed like an easy way to do it. Since I\'ve already started my installation using the info in it, is it ok to use your commands without something going totally wrong? Also, do I do the Apache ./configure first and then the PHP/MySQL?

Share this post


Link to post
Share on other sites

if you have problems with anything you simply recompile again - no problem there. i don\'t think you should have a problem, you are using 8.0 as i am, and your versions are only slightly newer, this tutorial may have been written on an older version. apache and mysql ( order does not matter ) should both be configure / make / make installed before php. if want to keep following the tutorial, just leave out that enable module and see how everything else goes.

Share this post


Link to post
Share on other sites

Thanks, I\'ve tried that.

 

I\'m having more problems though. When I do configure with PHP, I\'m getting \"configure: error: Cannot find header files under /usr/local/mysql/bin\". I did do configure, make and make install with both Apache and MySQL before PHP. Help!

 

Thanks again though.

Share this post


Link to post
Share on other sites

does /usr/local/mysql exist? on the source compiles you typically end up with mysql really being something like /usr/src/mysql-really-long-dir-name-with-os-and-version, which you then create a symbolic link to by doing...

 

cd /usr/local

ln -s /usr/src/mysql-dir-name mysql

 

if that doesn\'t help you out, try using a different directory in your configure line, /usr/local for example. i had this problem roughly a year ago and it was how i found this place and my first post, however i think it has been purged... let me know what happens.

Share this post


Link to post
Share on other sites

Lol.. I\'ve just tried it with /usr/local/mysql only and it worked. Make and make install went ok. I added \'AddType application/x-httpd-php .php\' to my httpd.conf, but when I start the server, it won\'t display PHP pages.. wants me to download them. Arghhhh.

 

Thanks again.

Share this post


Link to post
Share on other sites

how about LoadModule php4_module modules/libphp4.so

Share this post


Link to post
Share on other sites

Done that and it still won\'t serve PHP pages. I copied the php.ini file to /usr/local/lib/php.ini also.

Share this post


Link to post
Share on other sites

you changed the httpd.conf and restarted apache?

show me the configure lines you used for php...

Share this post


Link to post
Share on other sites

Yep, several times. Lol.

 

My configure line: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql

Share this post


Link to post
Share on other sites

this is nuts... are you typing in the path to the php file directly? if you have an index.php and expect apache to pick it up, it won\'t until you add to the DirectoryIndex directive... make a file with <?php phpinfo(); ?> and try to access it directly... still asks to save?

Share this post


Link to post
Share on other sites

Weird thing is happening. I\'ve added index.php to the DirectoryIndex line of my httpd.conf and then made a file called index.php with <? phpinfo(); ?> and this works. If I try to type the path to another file, ie. localhost/test.php it still asks me to save. Looks like PHP is working though, so thanks a lot.

Share this post


Link to post
Share on other sites

weird... no problem... i\'ll think about the other issue :shock: off to sleep now..

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.