|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10964 Unable to use getservbyport function
Submitted: 2001-05-18 19:27 UTC Modified: 2001-05-19 18:26 UTC
From: xbouli at hotmail dot com Assigned:
Status: Closed Package: Network related
PHP Version: 4.0.5 OS: Linux 2.4.4 RedHat
Private report: No CVE-ID: None
 [2001-05-18 19:27 UTC] xbouli at hotmail dot com
I made a little php script like that :
    print getservbyport(25,tcp);
and i got this error:
  Fatal error: Call to undefined function: getservbyport()
My configure line is :
  ./configure --with-ldap --with-mysql --with-gd --disable-pear --enable-calendar --with-config-file-path=/etc/httpd/conf --with-zlib --with-bz2 --with-snmp --enable-magic-quotes --with-gnu-ld --with-apxs --with-ttf --without-openssl --enable-ucd-snmp-hack --enable-sockets


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-19 03:48 UTC]
I could verify this.
getservbyport is only available if HAVE_SERVBYPORT is defined, but
aparently there are no tests for this function in the configure scripts, and that's why it's
not set.

Can anybody familiar with the build process have a look at this?
(I can do it later).

 [2001-05-19 18:26 UTC]
Fixed in CVS. Will be fixed in PHP 4.0.6


PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 23:03:13 2021 UTC