#22273 [Fbk-Opn]: Cannot load libphp4.so into server: Unresolved external
ID: 22273 User updated by: germano60 at yahoo dot it Reported By: germano60 at yahoo dot it -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: HP-UX 11.00 PHP Version: 4.3.0 New Comment: 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 ... ] Previous Comments: [2003-02-23 05:34:53] [EMAIL PROTECTED] Can you try adding this to your configure line: --enable-libgcc [2003-02-20 07:40:20] germano60 at yahoo dot it I confirm you that: - httpd.conf is working fine without the directive LoadModule php4_module etc. - Apache2 has always be set to work with User www Group other (with Group nobody, in HP-UX11 Apache simply does not work) Thanks for the bt full hint, yesterday it was the firs time I used gdb, so please forgive my newbie behaviour :) I tried again with httpd -X, putting some breakpoints around the critical points, i.e.: - when the load_module() method is invoked to check the input values - when the apr_dso_load() method is invoked to check the input values - after the apr_dso_load() method is finished and the apr_pstrcat() method is invoked to generate the output string, to check the return conditions The source code is available in Apache2 distribution inside modules/mappers/mod_so.c Here is what bt full returned after each step (sorry, once again it's long): Code section under test /usr/local/httpd-2.0.44/modules/mappers/mod_so.c function load_module() (gdb) break mod_so.c:213 Breakpoint 2 at 0x5f908: file mod_so.c, line 213. // BREAK on invoke of load_module (gdb) break mod_so.c:282 Breakpoint 3 at 0x5f9ec: file mod_so.c, line 282. // BREAK on invoke check for errors in loading the module (gdb) break mod_so.c:285 Breakpoint 4 at 0x5fa10: file mod_so.c, line 285. // BREAK on invoke generation of the error string for display (gdb) enable (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Breakpoint 2, load_module (cmd=0x7f7f1340, dummy=0x7f7f3640, \ modname=0x40069010 php4_module, \ filename=0x40069020 modules/libphp4.so) at mod_so.c:213 213 *(ap_directive_t **)dummy = NULL; (gdb) bt full #0 load_module (cmd=0x7f7f1340, dummy=0x7f7f3640, \ modname=0x40069010 php4_module, \ filename=0x40069020 modules/libphp4.so) at mod_so.c:213 modhandle = (apr_dso_handle_t *) 0x6c08000 modsym = 0x7f7f3584 modp = (module *) 0x7f7f3640 szModuleFile = 0x7f7f3580 @\006\217\220 sconf = (so_server_conf *) 0x7f7f3640 modi = (moduleinfo *) 0x40069020 modie = (moduleinfo *) 0x40069038 i = 1074171936 modhandle = (apr_dso_handle_t *) 0x6c08000 modsym = 0x7f7f3584 #1 0x00064c5c in invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340, \ mconfig=0x7f7f3640, args=0x7f7f15b0 ) at config.c:739 w = 0x40069010 php4_module w2 =
#22273 [Fbk-Opn]: Cannot load libphp4.so into server: Unresolved external
ID: 22273 User updated by: germano60 at yahoo dot it Reported By: germano60 at yahoo dot it -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: HP-UX 11.00 PHP Version: 4.3.2-dev New Comment: 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. Previous Comments: [2003-02-24 04:05:00] [EMAIL PROTECTED] And another thing to try: GCC 2.95.3 (the latest versions of anything aren't always the best ones :) [2003-02-24 04:03:57] [EMAIL PROTECTED] 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 03:59:14] 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-23 05:34:53] [EMAIL PROTECTED] Can you try adding this to your configure line: --enable-libgcc [2003-02-19 22:58:23] [EMAIL PROTECTED] Just noticed there's some HPUX related note in the httpd.conf about not running it as 'nobody'..I guess you know this too? The remainder of the comments for this report are too
#22273 [Fbk-Opn]: Cannot load libphp4.so into server: Unresolved external
ID: 22273 User updated by: germano60 at yahoo dot it Reported By: germano60 at yahoo dot it -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: HP-UX 11.00 PHP Version: 4.3.0 New Comment: I confirm you that: - httpd.conf is working fine without the directive LoadModule php4_module etc. - Apache2 has always be set to work with User www Group other (with Group nobody, in HP-UX11 Apache simply does not work) Thanks for the bt full hint, yesterday it was the firs time I used gdb, so please forgive my newbie behaviour :) I tried again with httpd -X, putting some breakpoints around the critical points, i.e.: - when the load_module() method is invoked to check the input values - when the apr_dso_load() method is invoked to check the input values - after the apr_dso_load() method is finished and the apr_pstrcat() method is invoked to generate the output string, to check the return conditions The source code is available in Apache2 distribution inside modules/mappers/mod_so.c Here is what bt full returned after each step (sorry, once again it's long): Code section under test /usr/local/httpd-2.0.44/modules/mappers/mod_so.c function load_module() (gdb) break mod_so.c:213 Breakpoint 2 at 0x5f908: file mod_so.c, line 213. // BREAK on invoke of load_module (gdb) break mod_so.c:282 Breakpoint 3 at 0x5f9ec: file mod_so.c, line 282. // BREAK on invoke check for errors in loading the module (gdb) break mod_so.c:285 Breakpoint 4 at 0x5fa10: file mod_so.c, line 285. // BREAK on invoke generation of the error string for display (gdb) enable (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Breakpoint 2, load_module (cmd=0x7f7f1340, dummy=0x7f7f3640, \ modname=0x40069010 php4_module, \ filename=0x40069020 modules/libphp4.so) at mod_so.c:213 213 *(ap_directive_t **)dummy = NULL; (gdb) bt full #0 load_module (cmd=0x7f7f1340, dummy=0x7f7f3640, \ modname=0x40069010 php4_module, \ filename=0x40069020 modules/libphp4.so) at mod_so.c:213 modhandle = (apr_dso_handle_t *) 0x6c08000 modsym = 0x7f7f3584 modp = (module *) 0x7f7f3640 szModuleFile = 0x7f7f3580 @\006\217\220 sconf = (so_server_conf *) 0x7f7f3640 modi = (moduleinfo *) 0x40069020 modie = (moduleinfo *) 0x40069038 i = 1074171936 modhandle = (apr_dso_handle_t *) 0x6c08000 modsym = 0x7f7f3584 #1 0x00064c5c in invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340, \ mconfig=0x7f7f3640, args=0x7f7f15b0 ) at config.c:739 w = 0x40069010 php4_module w2 = 0x40069020 modules/libphp4.so w3 = 0x40069038 /usr/local/apache2/modules/libphp4.so errmsg = 0x40069038 /usr/local/apache2/modules/libphp4.so #2 0x00066348 in execute_now (cmd_line=0x40068fb8 LoadModule, \ args=0x7f7f158b php4_module modules/libphp4.so, \ parms=0x7f7f1340, p=0x0, ptemp=0x40063480, sub_tree=0x7f7f3640, parent=0x0) at config.c:1351 mod = (module *) 0x40008d1c cmd = (const command_rec *) 0x40069038 mod = (module *) 0x40008d1c #3 0x00065684 in zif_mysql_select_db () at config.c:942 sub_tree = (ap_directive_t *) 0x0 current = (ap_directive_t **) 0x7f7f3580 curr_parent = (ap_directive_t **) 0x7f7f3584 conftree = (ap_directive_t **) 0x400098cc retval = 0x40069038 /usr/local/apache2/modules/libphp4.so args = 0x7f7f158b php4_modulemodules/libphp4.so cmd_name = 0x40068fb8 LoadModule newdir = (ap_directive_t *) 0x40068fc8 mod = (module *) 0x40008d1c cmd = (const command_rec *) 0x40069038 args = 0x7f7f158b php4_modulemodules/libphp4.so mod = (module *) 0x40008d1c #4 0x00065c84 in zif_mysql_get_proto_info () at config.c:1149 current = (ap_directive_t *) 0x40068f90 curr_parent = (ap_directive_t *) 0x0 l = LoadModule php4_module modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u, '\0' repeats 15 times, ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0 \b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177... errmsg = 0x1 Error reading address 0x1: Invalid argument current = (ap_directive_t *) 0x40068f90 curr_parent = (ap_directive_t *) 0x0 l = LoadModule php4_module modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u, '\0' repeats 15 times, ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
#22273 [Fbk-Opn]: Cannot load libphp4.so into server: Unresolved external
ID: 22273 User updated by: germano60 at yahoo dot it Reported By: germano60 at yahoo dot it -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: HP-UX 11.00 PHP Version: 4.3.0 New Comment: 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 Previous Comments: [2003-02-18 11:55:00] [EMAIL PROTECTED] 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-18 11:53:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-02-18 09:12:56] 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 -- Edit this bug report at http://bugs.php.net/?id=22273edit=1
#22273 [Fbk-Opn]: Cannot load libphp4.so into server: Unresolved external
ID: 22273 User updated by: germano60 at yahoo dot it Reported By: germano60 at yahoo dot it -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: HP-UX 11.00 PHP Version: 4.3.0 New Comment: 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. Previous Comments: [2003-02-19 04:16:53] [EMAIL PROTECTED] 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:03:11] 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-18 11:55:00] [EMAIL PROTECTED] 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-18 11:53:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-02-18 09:12:56] 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 -- Edit this bug report at http://bugs.php.net/?id=22273edit=1