|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32591 Unsatisfied symbols: ntohs
Submitted: 2005-04-05 17:56 UTC Modified: 2005-04-08 00:24 UTC
From: admin at iut-info dot ens dot univ-reims dot fr Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.0.4 OS: HP-UX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: admin at iut-info dot ens dot univ-reims dot fr
New email:
PHP Version: OS:


 [2005-04-05 17:56 UTC] admin at iut-info dot ens dot univ-reims dot fr
When compiling PHP-5.0.4 under HP-UX 11.11 i got a link error.

/usr/ccs/bin/ld: Unsatisfied symbols:
   ntohs (first referenced in ext/mysql/php_mysql.o) (code)

Using "-D_XOPEN_SOURCE_EXTENDED" ntohs is not defined in "netinet/in.h" but in "arpa/inet.h".

Modifiying php_mysql.c to include it (as php_network.c) solve the problem.

Here is the patch:
--- ext/mysql/php_mysql.c.old   2005-02-22 16:32:38 +0100
+++ ext/mysql/php_mysql.c       2005-04-05 17:50:45 +0200
@@ -52,6 +52,9 @@
 # endif
 # include <netdb.h>
 # include <netinet/in.h>
+#include <arpa/inet.h>
 #include <mysql.h>

P.S. : i have also try with php5-STABLE-200504050630.

Reproduce code:
./configure                             \
        --prefix=/opt/APACHE/php        \
        --without-sqlite                \
        --with-oci8                     \
        --with-apache=../apache_1.3.33  \
        --with-gd                       \
        --with-jpeg-dir=/usr/local      \
        --with-png-dir=/usr/local       \
        --with-tiff-dir=/usr/local      \
        --with-freetype-dir=/usr/local  \
        --with-zlib                     \
        --with-bz2                      \
        --enable-sigchild               \
        --with-mysql=/opt/mysql         \
        --with-mysqli=/opt/mysql/bin/mysql_config       \
        --with-pgsql=/opt/pgsql         \
        --with-tsrm-pthreads            \
        --with-dom                      \
        --with-libxml                   \
        --with-xsl                      \
        --enable-ftp                    \
        --with-snmp=/usr/local          \
        --with-imap=/usr/local/imap     \
        --with-imap-ssl=/usr/local      \
        --with-openssl=/usr/local       \
        --with-ldap=/usr/local          \
        --enable-mbstring               \

Expected result:
make failed.

Actual result:
build succes.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-08 00:24 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 02:01:31 2023 UTC