|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80198 Fail posix_getpwnam, posix_getpwuid, ...
Submitted: 2020-10-07 14:30 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: dl at CyberPunk dot ru Assigned:
Status: Open Package: Unknown/Other Function
PHP Version: Irrelevant OS: All FreeBSD
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-10-07 14:30 UTC] dl at CyberPunk dot ru
All FreeBSD do not implement the function sysconf with arguments _SC_GETGR_R_SIZE_MAX , _SC_GETPW_R_SIZE_MAX.

php use this sysconf() in:
- main/main.c php_get_current_user()
- main/fopen_wrappers.c php_fopen_primary_script()
- ext/posix/posix.c posix_getpwnam(), posix_getpwuid(), posix_getgrnam(), posix_getgrgid()
- ext/standard/filestat.c php_get_uid_by_name(), php_get_gid_by_name()

The problem is the unsuccessful result for these functions.

Eliminated is trivial. patch applied.

Test script:
<?php var_dump(posix_getpwuid(0)); ?>

Current php-7.4.10

without patch

with patch
array(7) {
  string(4) "root"


php_FreeBSD_sysconf (last revision 2020-10-07 14:30 UTC by dl at CyberPunk dot ru)

Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 21:05:52 2022 UTC