php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81447 php8.1-fpm ERROR: Unable to open primary script
Submitted: 2021-09-16 14:58 UTC Modified: -
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: vyboh at zoner dot com Assigned:
Status: Open Package: FPM related
PHP Version: 8.1.0RC1 OS: Debian 10.10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-09-16 14:58 UTC] vyboh at zoner dot com
Description:
------------
I have file:

trialhosting:/# stat /www/sites/2/site75302/public_html/info.php
  File: /www/sites/2/site75302/public_html/info.php
  Size: 25              Blocks: 8          IO Block: 4096   regular file
Device: 851h/2129d      Inode: 168047394   Links: 1
Access: (0660/-rw-rw----)  Uid: (175302/site75302)   Gid: (175302/site75302)

I called url: https://floyd.php5.cz/info.php
and then I hooked the php-fpm process

trialhosting:/# ltrace -S -s 200  -p 102770
(some lines skipped)
strcasecmp("files", "files")                                                                                                                       = 0
strlen("/www/sites/2/site75302/public_html/info.php")                                                                                              = 43
strlen(".php")                                                                                                                                     = 4
strcmp(".php", ".php")                                                                                                                             = 0
strlen("/www/sites/2/site75302/public_html/info.php")                                                                                              = 43
memcpy(0x7f1a7b002030, "/www/sites/2/site75302/public_html/info.php\0", 44)                                                                        = 0x7f1a7b002030
strlen("/www/sites/2/site75302/public_html")                                                                                                       = 34
strlen("/info.php")                                                                                                                                = 9
memcpy(0x7f1a7b065000, "/www/sites/2/site75302/public_html", 34)                                                                                   = 0x7f1a7b065000
strncpy(0x7f1a7b06503a, "/info.php", 10)                                                                                                           = 0x7f1a7b06503a
SYS_getcwd("/", 4096)                                                                                                                              = 2
SYS_fcntl(3, 6, 0x7ffd03b8bb10, 0x65000)                                                                                                           = 0
strlen("ublic_html")                                                                                                                               = 10
_setjmp(0x7ffd03b8c1b0, 0x7f1a7b000000, 0x7f1a7b002060, 0x7ffd03b8c010)                                                                            = 0
__errno_location()                                                                                                                                 = 0x7f1a7b3be1c0
strerror(0)                                                                                                                                        = "Success"
__ctype_b_loc()                                                                                                                                    = 0x7f1a7b3be1d8
strlen("/www/sites/2/site75302/public_html/info.php")                                                                                              = 43
__ctype_b_loc()                                                                                                                                    = 0x7f1a7b3be1d8
strlen("Success")                                                                                                                                  = 7
memcpy(0x556f9b2ceed0, "Unable to open primary script: /www/sites/2/site75302/public_html/info.php (Success)", 84)                                 = 0x556f9b2ceed0
(some lines skipped)


In strlen("ublic_html") missing character "p" on the beginning.



Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Oct 25 16:03:36 2021 UTC