Click to See Complete Forum and Search --> : php does not compile libphp4.so


Rickead2000
06-12-2004, 12:09 PM
Hi,

Am having a few problems compiling php to work with apache 1.3.

I have downloaded the source .tar of php and am compiling with the following options

./configure --with-apache --with-mysql.

the configure, make, and make install commands all complete sucessfully and I have a working php command at the commandline.

However, no libphp4.so is ever created for apache, and hence it just spews out the txt contents of the php file.

It created the following files in my apache modules/php4 dir...

libmodphp4.a
Makefile.libdir
mod_php4.c
mod_php4.h
mod_php4.o
libphp4.module
Makefile.tmpl
mod_php4.exp
mod_php4.lo

What am I doing wrong? I have tried using the path to apache in the configure options, but it doesnt seem to have any effect.

Any advice would be very much appreciated!

I would install from the rpms but can't seem to find any for mandrake.

JohnT
06-12-2004, 12:40 PM
Try 'locate libphp4.so" from the commandline it might possibly be in an unexpected location.

sharth
06-12-2004, 12:47 PM
try /usr/local/lib/apache/1.3/

otherwise... I dunno.

The configure command debian uses is as follows if it helps.

./configure --prefix=/usr --with-apxs=/usr/bin/apxs --with-regex=php --with-config-file-path=/etc/php4/apache --disable-rpath --enable-memory-limit --disable-debug --with-layout=GNU --with-pear=/usr/share/php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db4 --with-iconv --enable-exif --enable-filepro --enable-ftp --with-gettext --enable-mbstring --with-pcre-regex=/usr --enable-shmop --enable-sockets --enable-wddx --disable-xml --with-expat-dir=/usr --enable-yp --with-zlib --without-pgsql --with-kerberos=/usr --with-openssl=/usr --with-exec-dir=/usr/lib/php4/libexec --disable-static --with-curl=shared,/usr --with-dom=shared,/usr --with-dom-xslt=shared,/usr --with-dom-exslt=shared,/usr --with-zlib-dir=/usr --with-gd=shared,/usr --enable-gd-native-ttf --with-jpeg-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6 --with-png-dir=shared,/usr --with-freetype-dir=shared,/usr --with-imap=shared,/usr --with-imap-ssl --with-ldap=shared,/usr --with-mcal=shared,/usr --with-mhash=shared,/usr --with-mm --with-mysql=shared,/usr --with-unixODBC=shared,/usr --with-recode=shared,/usr --enable-xslt=shared --with-xslt-sablot=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-sybase-ct=shared,/usr --with-ttf=shared,/usr --with-t1lib=shared,/usr

mdwatts
06-12-2004, 01:14 PM
Originally posted by Rickead2000

I would install from the rpms but can't seem to find any for mandrake.

Mandrake should include all the packages you need for PHP, Apache and MySQL to all work together. What version of Mandrake?

From SuSE

# rpm -qa | grep php
mod_php4-core-4.3.3-13
mod_php4-4.3.3-13
phpdoc-4.3.0-33
apache2-mod_php4-4.3.3-13

# rpm -qa | grep apache
apache2-example-pages-2.0.48-124
apache2-2.0.48-124
apache2-doc-2.0.48-124
apache2-mod_php4-4.3.3-13
apache-1.3.28-60
apache2-prefork-2.0.48-124

JohnT
06-12-2004, 01:31 PM
LOL...like Mike said....they should be on your cd as a matter of fact......at least they included them when I last did MDK.....7.0...I think.

Rickead2000
06-12-2004, 01:37 PM
Fixed it.

when i compiled apache I hadn't used the --enable-module=so

So in effect, apache wasnt compiled to recognise any modules, php configure must have realised this and so didnt bother with building the .so.

Thanks for your help!

mdwatts
06-12-2004, 03:17 PM
Glad you got it working, but still you could have installed the rpm packages included with Mandrake as they ARE there on the installation cd(s) and are built to work together.

Would have been easier to uninstall the rpm package if you were required to upgrade in future.

Everyone should print off a hardcopy of the packages and descriptions your distro includes for a quick reference. SuSE has one at http://www.suse.com/us/private/products/suse_linux/prof/packages_professional/index_all.html