php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22273 Cannot load libphp4.so into server: Unresolved external
Submitted: 2003-02-18 09:12 UTC Modified: 2003-06-06 18:56 UTC
From: germano60 at yahoo dot it Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.2-dev OS: HP-UX 11.00
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: germano60 at yahoo dot it
New email:
PHP Version: OS:

 

 [2003-02-18 09:12 UTC] germano60 at yahoo dot it
Hello

I already looked in the support resources and in the bug lists but could not find a suitable clue.

I compiled apache and php then when I tried to start the web server, but this is the error message I got:
Syntax error on line 233 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server: Unresolved external

The error line did not return any further indications about which "external" did not resolve.

Configuration:
hp-ux 11.00
php 4.3.0
apache 2.0.44
gcc 3.2

Apache was generated with:
./configure \
  --prefix=/usr/local/apache2 \
  --enable-so

Php4.3.0 was configured with:
./configure \
  --with-mysql \
  --with-apxs2=/usr/local/apache2/bin/apxs

I modified the configure script for PHP by replacing invokes of "-lcrypt" with "-lc" and of "-ltermcap" with "-lcurses" to get libphp4.so generated by php's "make install" under the hp-ux 11 platform.
php's "make" and "make install" succeeded.

DSO modules were installed in the Apache2's default location 
/usr/local/apache2/modules and this is also where PHP's make install stored the library libphp4.so. In httpd.conf I added the following line:
LoadModule  php4_module  modules/libphp4.so

I'm not sure whether this is really a bug or due to my minimal configuration - I tried some of the hints I found in the support/bugs but without success.

Thanks in advance.
Germano Gasparini - germano60 at yahoo dot it

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 11:55 UTC] sniper@php.net
The latest snapshot should fix the crypt issue..
Try this configure line:

./configure --disable-all --with-mysql --with-pcre-regex --with-apxs2=/usr/local/apache2/bin/apxs

(--disable-all disables every 'by-default' extension)


 [2003-02-19 04:03 UTC] germano60 at yahoo dot it
I tried with the latest stable snapshot and with the ./configure options as per suggestion.

By the way, I confirm you that the issues related to crypt and termcap libraries in hp-ux environment are apparently solved with this latest stable. The overall generation was definitely smoother than my previous one.

Everything ran successfully, the new libphp4.so was installed in /usr/local/apache2/modules, the httpd.conf was updated by make install (this did not happen previously). 

Unfortunately, when I ran 

apachectl configtest 

I was still returned with the same error message.
Any hint?

Cheers
Germano Gasparini
 [2003-02-19 04:16 UTC] sniper@php.net
Add --enable-debug to your PHP configure line
and try checking if it's crashing with gdb.

(what MPM is used for Apache2 ?)


 [2003-02-19 04:57 UTC] germano60 at yahoo dot it
MPM used for Apache2: prefork

Operations I did:
cd to PHP latest stable directory
make clean
rm config.cache
./configure with all options as before plus --enable-debug
make  - succeeded, with more compiler warnings about unused declarations
make install  - succeeded
cd /usr/local/apache2/bin
./apachectl configtest

Same error message again.

gdb is not yet installed on my system, I'm currently getting the depot from HP-UX Porting Centre.
 [2003-02-19 09:02 UTC] germano60 at yahoo dot it
Results of analysis with gdb:

I used gdb to debug the "httpd -t" program, so to reproduce the problem without having to affect the operation of Apache.

The error condition is detected by the function:

errmsg = ap_build_config(&parms, p, ptemp, conftree);

located at line 1563 in Apache's source file config.c

Could this help?

Cheers
Germano Gasparini
 [2003-02-19 22:57 UTC] sniper@php.net
Simple 'bt full' output would have been enough.. :)
Anyway, does it do the same if you run it with 'httpd -X' ?
(provide that backtrace, and just the bt output)
 
(gdb) run -X
<crash?>
(gdb) bt full

(and to be absolutely sure this is php bug, I assume that apache works fine without PHP in httpd.conf? :)


 [2003-02-19 22:58 UTC] sniper@php.net
Just noticed there's some HPUX related note in the httpd.conf about not running it as 'nobody'..I guess you know this too?
 [2003-02-23 05:34 UTC] sniper@php.net
Can you try adding this to your configure line:

--enable-libgcc


 [2003-02-24 03:59 UTC] germano60 at yahoo dot it
I tried but yet nope.

I got this additional message during "make", at linking phase:

*** Warning: linker path does not have real file for library -lgcc.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libgcc and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/libgcc.a

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp4.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

Additionally, "make install" returned the following message (I added the #### to highlight a possible critical point):
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/man/man1/
Installing PHP SAPI module
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp4.la /usr/local/apache2/modules/
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a
ranlib /usr/local/apache2/modules/libphp4.a
chmod 644 /usr/local/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /opt/php4-STABLE-200302190830/libs'
#### Warning!  dlname not found in 
 /usr/local/apache2/modules/libphp4.la.
#### Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp4.so
[activating module `php4' in /usr/local/apache2/conf/httpd.conf]
Installing shared extensions: 
[ ... I skip this, everything regular ... ]
 [2003-02-24 04:03 UTC] sniper@php.net
Could you try this with using Apache 1.3.27 instead?
(I'd like to be sure it's stricly apache2 related)

 [2003-02-24 04:05 UTC] sniper@php.net
And another thing to try: GCC 2.95.3
(the latest versions of anything aren't always the best ones :)

 [2003-02-24 08:39 UTC] germano60 at yahoo dot it
I'm afraid that compiling with gcc 2.9.x is a little bit problematic for me. My HP-UX workstation came with gcc 3.x already installed and I'm a little bit concerned in installing an older version - just to avoid possible regression problems.

Howeverm these are the result of the test with Apache 1.3.27

Apache built with:
configure --prefix=/usr/local/apachetest \
          --enable-module=so

PHP configured with:
configure --disable-all \
          --with-mysql \
          --with-pcre-regex \
          --with-apxs=/usr/local/apachetest/bin/apxs \
          --enable-debug
I had to manually perform the following replacements inside configure:
-lcrypt replaced with -lc
-ltermcap replaced with -lcurses
otherwise the build fails (looks like the lcrypt problem is fixed with Apache2 but not with Apache - very strange).

PHP make and make install succeeded.

Result of /usr/local/apachetest/bin/httpd -X:
/usr/lib/dld.sl: Unresolved symbol: __umoddi3 (code)  from /usr/local/apachetest/libexec/libphp4.so
Syntax error on line 236 of /usr/local/apachetest/conf/httpd.conf:
Cannot load /usr/local/apachetest/libexec/libphp4.so into server: Unresolved external

I tried again rebulding PHP adding also --enable-libgcc to the configure command line (make clean and rm config.cache executed before re-running configure).

This time make install failed and I noticed that libs/libphp4.sl was not generated.
Here is the output of make install:
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/man/man1/
Installing PHP SAPI module
apxs:Error: file libs/libphp4.sl is not a DSO
*** Error exit code 1

Stop.
 [2003-02-24 08:48 UTC] sniper@php.net
I have no idea what causes this..must be yet another libtool issue I guess. Can't help you with this on any further, sorry about that. Hopefully someone who knows HPUX inside out pops up sometime and could fix these issues..

(Try asking the HP support? :)

 [2003-06-06 18:56 UTC] sniper@php.net
See bug #23758 for a workaround. And follow that bug report
for possible solution too, there's no need to have many reports about this.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC