Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-30-2002, 02:30 PM   #1
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,550

Rep: Reputation: 136Reputation: 136
new apache-php install

Hi mates,
i tried to get myself a new apache+php but unfortunately nothing works as it should. i tried several opportunities but if i use
"--enable-module=most" i get an error while configuring tha apache(sth like can't find mod_rewrite) . this means that there will be no in the apache/libexec directory and i can't load php4_mod in the httpd.conf. i guess that might be a suse specific problem cause i read a couple howto's all of which didn't work on my box. would be great if anybody had an easy solution to save my easter holiday. thanks!
Old 04-01-2002, 07:33 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,550

Original Poster
Rep: Reputation: 136Reputation: 136

at least it didn't take til xmas -
the answer was already on this forum, yasan wrote:

4. I ran the configure command
>./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --without-zlib

(Here is what "solves" the problem)
5. Now *BEFORE* running "make" find the top level "Makefile" in the php directory. Using your favourite editor look for the following line:

LTLIBRARY_LDFLAGS = [ other options already there ]

add to it the three characters -lz which are not included by default.

so now it looks like :

LTLIBRARY_LDFLAGS = -lz [ other options already there ]

6. Save and exit.

7. You can now run "make" and then "make install"

To make sure that has been properly linked to run the following command from the apache directory:

>ldd libexec/ => /usr/lib/ (0x40129000) => /lib/ (0x40138000) => /lib/ (0x40140000) => /usr/lib/ (0x40143000) => /lib/ (0x40179000) => /lib/ (0x40188000) => /lib/ (0x401a5000) => /lib/ (0x401d2000) => /lib/ (0x401e8000)
/lib/ => /lib/ (0x80000000)

(notice the first line in the result!)

Once everything has finished compiling and installing don't forget to edit the httpd.conf file to reflect the php extension by adding the following lines:

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

and making sure that the following lines are there and pointing to the correct files and directories:

LoadModule php4_module libexec/
AddModule mod_php4.c

finally copy php.ini-dist to the apache/conf folder and rename it to php.ini

8. Start the apache server and everything should be fine:
>apache/bin/apachectl start
bin/apachectl start: httpd started

That means that the apache server started with the php module with no problems.
To test that PHP really works I created the following page:

Great! Thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache, PHP, MySQL Install SpiderIRE Linux - Software 3 10-03-2005 04:50 AM
install php --with-apache tunedLow Linux - Software 1 07-13-2004 08:30 AM
how do i install apache php and mysql ashokn Linux - Software 2 04-30-2004 06:20 AM
PHP 4.3.4 + Apache 2.0.48 won't install linux-addict Linux - Software 1 01-17-2004 08:47 PM
Apache 2.0 + PHP 4.3.0 install recommendations tarballed Linux - General 8 02-13-2003 11:54 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration