|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #512 apache and php3 both supply an strerror on a system without one
Submitted: 1998-07-06 00:21 UTC Modified: 1998-09-10 18:16 UTC
From: charles at comm dot polymtl dot ca Assigned:
Status: Closed Package: Other
PHP Version: 3.0 Final Release OS: SunOS 4.1.4
Private report: No CVE-ID: None
 [1998-07-06 00:21 UTC] charles at comm dot polymtl dot ca
apache 1.3.0
php 3.0
SunOS 4.1.4 (w/ libraries that come with the system)

On SunOS 4, a system without strerror in its provided libraries, both
apache-1.3.0 and php-3.0 supply a replacement function named strerror.
At link time for httpd, ld complains about a multiple definition and

I won't venture to say if it is an apache or a php problem.  It's rather
a question of convention and synchronisation between the two projects.
(I made a similar report to the other project, apache PR#2548.)

I use php as a static module.  (There are problems more complicated to
solve on SunOS in trying to use it as a shared module; for instance,
the absence of a shared version of libm.  So static is the simpler way
to go.)

There are three possible ways this could be fixed:

. one or both projects define their replacement function with a prefix
  that is exclusive to them (duplication, but a small one)

. apache configuration detects that php3 is used as a static module
  and provides its own strerr, and so apache does not define
  NEED_STRERR, even when strerror is not provided by the os

. similarly, php does not provide a strerror if it detects that apache
  will provide one

Of course, care should be taken with the last two options that we
don't end up with no strerror at all.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-09-10 18:16 UTC] zeev
Looks as if this was changed long ago.  PHP will now compile strerror() only if it is not being compiled as an Apache
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 12 20:01:30 2024 UTC