Jump to content

Need help installing Apache and PHP (RH 8.0)


Nylex

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.

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.