LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-30-2002, 03:30 PM   #1
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
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 libphp4.so 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, 08:33 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Original Poster
Rep: Reputation: 132Reputation: 132
Cool

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 libz.so.# has been properly linked to libphp4.so run the following command from the apache directory:

>ldd libexec/libphp4.so
libz.so.1 => /usr/lib/libz.so.1 (0x40129000) libpam.so.0 => /lib/libpam.so.0 (0x40138000)
libdl.so.2 => /lib/libdl.so.2 (0x40140000)
libgd.so.1 => /usr/lib/libgd.so.1 (0x40143000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40179000)
libm.so.6 => /lib/libm.so.6 (0x40188000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x401a5000)
libnsl.so.1 => /lib/libnsl.so.1 (0x401d2000)
libc.so.6 => /lib/libc.so.6 (0x401e8000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (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/libphp4.so
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
 
  


Reply


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 05:50 AM
install php --with-apache tunedLow Linux - Software 1 07-13-2004 09:30 AM
how do i install apache php and mysql ashokn Linux - Software 2 04-30-2004 07:20 AM
PHP 4.3.4 + Apache 2.0.48 won't install linux-addict Linux - Software 1 01-17-2004 09:47 PM
Apache 2.0 + PHP 4.3.0 install recommendations tarballed Linux - General 8 02-13-2003 12:54 PM


All times are GMT -5. The time now is 06:41 PM.

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