Jump to content


Photo

Need help installing Apache and PHP (RH 8.0)


  • Please log in to reply
14 replies to this topic

#1 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 14 April 2003 - 02:29 PM

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.

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 14 April 2003 - 04:41 PM

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.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 14 April 2003 - 04:47 PM

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?

#4 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 14 April 2003 - 05:44 PM

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.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#5 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 14 April 2003 - 06:19 PM

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.

#6 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 06:11 AM

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.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#7 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 06:39 AM

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.

#8 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 06:57 AM

how about LoadModule php4_module modules/libphp4.so
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#9 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 07:06 AM

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

#10 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 07:10 AM

you changed the httpd.conf and restarted apache?
show me the configure lines you used for php...
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#11 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 07:15 AM

Yep, several times. Lol.

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

#12 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 07:17 AM

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?
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#13 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 07:25 AM

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.

#14 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 07:28 AM

weird... no problem... i\'ll think about the other issue :shock: off to sleep now..
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#15 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 07:29 AM

Cool. Goodnight :).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users