Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache and php and mysql compilation problems.

Status
Not open for further replies.

rahm0277

Programmer
Apr 4, 2001
4
US
I have a problem trying to get apache to work with php on red hat linux 6.2.... i have compiled apache 1.3.19 and php 4.... and i have also compiled mysql 3.23.26....this is exactly what i did to compile everything....

MYSQL --->

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> chown -R root /usr/local/mysql/bin/
shell> bin/safe_mysqld --user=mysql &

=mysql worked and compiled correctly....

APACHE--->

$ ./configure --prefix=/usr/local/apache --enable-module=rewrite --enable-module=so
$ make
$ make install
$ /usr/local/apache/bin/apachectl start

= apache worked fine.... i could see test page and everything...

PHP 4 --->

$ ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs
$ make
$ make install

after this, i stopped apache and tried to restart it...and i get this error...

Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: undefined symbol: uncom
press
./bin/apachectl start: httpd could not be started

SOMEBODY HELP !!! this is the fifth time i'm trying to get mysql, apache and php4 to work ...any help would be geratly appreciated..Thank you.
 
I think most likely your problem stems from not having the zlib sompressions library installed (or having an older version installed).

Do you have the &quot;gd&quot; image library installed on your system? PHP automatically detects whether you have gd installed and automatically adds support for it in while compiling. The gd library, however, requires the zlib compression library. I posted some comments about this in the PHP documentation at (see the user comment by rick@e-possibility.com at the bottom)

The easiest thing to do is install zlib:
1. Download zlib from 2. ./configure --shared
3. make, make install

Then add &quot;with-zlib-dir=shared&quot; in your configuration directives for PHP.

Or, you might get away with disabling gd support in your PHP configuration (if you don't want to create server-side images). Just add --without-gd in your ./configure directives.
 
I installed the zlib library.... I think it compiled right... because I didnt get any errors... and then I typed this in to compile php......

./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --with-zlib-dir=shared

I had the same errors...then I tried to compile via disabling gd..

./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --without-gd

It stilll didnt work..... uncompress function seems to exist..... when i type uncompress --help i get the help screen..... so I have no clue at this point.... PLEASE HELP !!!
 
Have you tried making sure the first executables you installed were completely deleted before recompiling? (Look at the file creation times of libphp.so, and httpd.) And did you do a &quot;make clean&quot; between recompiles?

Also, I recall a couple people telling me there were problems compiling Apache 1.3.19. Why don't you try to roll back to 1.3.17, or 1.3.14? I have had no trouble with those two and PHP 4.0.4pl1.

Thirdly, you might need to add more support for something or other in the Apache compile. Try adding 'enable-module=most' and 'enable-shared=max', or even 'enable-module=all'.
 
I tried with apache 1.3.14, and configured it using the -enable-module=all and --enable-module=shared, and then i compiled php with the usual configuring and added --without-gd with it.... I still get the same exact error.... I'm about to give up soon......
 
Hmm... let me ask, have you made sure you uninstalled or never installed the default Apache RPM that comes with RedHat6.2?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top