468,248 Members | 1,495 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,248 developers. It's quick & easy.

[4.4.1] Compile libphp4.so from src w/o apache src?

Hello, I was running php 4.1.2 that came with my Linux distro a while
back (RH7.3 RPM, Kernel 2.4.20-20.7) and I wanted a newer version so I
download the src tarball from the web and compiled it and it looks like
that well, as I have the new one in /usr/local/bin (the old binary is
still in /usr/bin until I have the new one working with my apache) :

$ php -v
PHP 4.4.1 (cgi) (built: Dec 13 2005 20:32:47)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
My question is, how can I compile a libphp4.so for use with my apache.
My apache is of a special configuration, so recompiling is not an option
(it was made available as an RPM when I obtained it some time ago, so I
don't have the source.)

Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b
PHP/4.1.2 mod_perl/1.26 FrontPage/5.0.2.2510 configured

The INSTALL file that came with the tarball wasn't very helpful in this
regard. It seems to make sense to me that one should be able to simply
compile the libphp4.so separately and add it to the modules for apache.

Thanks for any help
Feb 21 '06 #1
4 2030
I think this will work:
../configure --with-apxs=/usr/bin/apxs

Feb 21 '06 #2
Sjoerd wrote:
I think this will work:
./configure --with-apxs=/usr/bin/apxs


Do you mean for php (from the root source dir?)

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 21 '06 #3
Sjoerd wrote:
I think this will work:
./configure --with-apxs=/usr/bin/apxs


Do you mean for php (from the root source dir?)

Feb 21 '06 #4
Sjoerd wrote:
I think this will work:
./configure --with-apxs=/usr/bin/apxs


Thanks.

I did:

../configure --with-mysql --with-apxs=/usr/sbin/apxs

and `make` and `make install` and got nor errors. Now, after restarting
apache, it segaults as soon as I try to do any sort of GET (any type,
even noremal html pages.)

(Apache works fine if I comment out the php entried in my httpd.conf)

error_log:
[Tue Feb 21 11:33:10 2006] [notice] Apache/1.3.27 (Unix)
(Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b PHP/4.4.1 mod_perl/1.26
FrontPage/5.0.2.2510 configured -- resuming normal operations
[Tue Feb 21 11:33:10 2006] [notice] suEXEC mechanism enabled (wrapper:
/usr/sbin/suexec)
[Tue Feb 21 11:33:10 2006] [notice] Accept mutex: sysvsem (Default:
sysvsem)
[Tue Feb 21 11:33:57 2006] [notice] child pid 26807 exit signal
Segmentation fault (11)
[Tue Feb 21 11:33:57 2006] [notice] child pid 26806 exit signal
Segmentation fault (11)
httpd.conf php4 lines:
[...]
<IfDefine HAVE_PHP4>
#LoadModule php4_module modules/libphp4.so
</IfDefine>
[...]
<IfDefine HAVE_PHP4>
#AddModule mod_php4.c
</IfDefine>
[...]
From the error log you can see that the new php "PHP/4.4.1" is
recognized (where as before it said "PHP/4.1.2" in that same spot.)

Did I miss something when compiling? I have GCC 3.

Than kfor any help

$ gcc --version
gcc (GCC) 3.2.1 20020903 (prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ uname -mrs
Linux 2.4.20-20.7 i686

$ php -v
PHP 4.4.1 (cli) (built: Feb 21 2006 11:24:53)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 21 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robert Blaha | last post: by
reply views Thread by lok | last post: by
reply views Thread by Mairhtin O'Feannag | last post: by
reply views Thread by prompt | last post: by
reply views Thread by Kurt | last post: by
reply views Thread by Jordan Willms | last post: by
reply views Thread by mchristopher | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.