Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-13-2001, 07:40 PM   #1
LQ Newbie
Registered: Aug 2001
Posts: 2

Rep: Reputation: 0
PHP4 & Apache Install Error

Hi all,

Okay here is the error message I am getting when I try to start apache server after installing php4:

Syntax error on line 236 of httpd.conf:
Cannot load /usr/local/apache/libexec/ into server: /usr/local/apache/libexec/ undefined symbol: uncompress

Here is what I did from the start:

1. untared apache_1.3.20.tar.gz
2. ./configure --enable-module=most --enable-shared=max
3. make
4. make install

That installed the server with no problems and with support for DSO

Next trying to install php4

1. again untarring php4
2. ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs
3. make
4. make install

Everything runs okay and everything installs properly.

Then :

1. copy the php.ini-dist file to the apache conf file and name it php.ini
2. checking httpd.conf for the following :

LoadModule php4_module libexec/
AddModule mod_php4.c

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

Upon restarting the server the above error appears saying undefined symbol: uncompress

Does anyone have any idea what is going on?
I have looked everywhere for an answer and came up blank. Would really appreciate any direction.

Extra info:
1. Distro Red Hat Linux 6.2
2. PHP 4.0.6
3. Apache 1.3.20

Old 08-14-2001, 12:35 AM   #2
LQ Newbie
Registered: Aug 2001
Posts: 2

Original Poster
Rep: Reputation: 0
Re: PHP4 & Apache Install Error

Okay with a little determination I found the answer to my problem and thought I would post it on here since I found plenty of lists and forums that had the question but not the answer so here it goes:

The problem with the "uncompress" symbol is related to
This is a DSO library which is required when building PHP4.

So here is the error message again:
Cannot load /usr/local/apache/libexec/ /usr/local/apache/libexec/ undefined symbol: uncompress

Now here is the solution:

1. First try to clean out whatever files and directories you have created while building php4. Usually they are all under the php#.#.# directory created when you untar the zipped package.
What I did is run the following under the php directory:
>make clean
>make clean all
>cd ..
>rm -Rf php_4.0.6 (note: version numbers may vary)

2. I manually removed from the apache/libexec directory

3. Obviously I had to re-untar the php package
>tar -zxvf php_4.0.6.tar.gz

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:

<?php phpinfo( ); ?>

Save this file in your htdocs directory as test.php and then test it on your browser using:
http://localhost/test.php as the address, you should see the PHP Page with its current configuration.

Hope this helps others out there...

Old 02-28-2002, 04:02 PM   #3
LQ Newbie
Registered: Feb 2002
Location: Indianapolis
Distribution: Slackware 8.0
Posts: 6

Rep: Reputation: 0
Just wanted to post that I had the same exact problem which I could not figure out. The previously posted steps worked perfectly.


Distro - Slackware 8
Apache 1.3.23
PHP 4.1.1
MySql 3.23.49a

Many 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
SElinux & php4 & interbase & apache maxut Linux - Security 0 03-15-2005 05:57 AM
Install error: fatal error attempting to install <pkgpath & name> gmartin Slackware - Installation 24 02-17-2005 05:26 PM
php4 & apache installed but will not run web pages with scripts oberon-ken-obi Linux - Newbie 5 07-06-2004 09:00 AM
php4 make/install error BobNz Linux - Software 0 05-03-2004 01:02 AM
apache && php4 err DaFrEQ Linux - Software 0 01-17-2003 04:39 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:33 AM.

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