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: 2021-11-27 22:59 UTC
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: bukka (profile)
Status: Closed Package: FPM related
PHP Version: 8.1.0RC1 OS: Debian 10.10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vyboh at zoner dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-16 15:37 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix for bug in file handling refactor.
On GitHub:  https://github.com/php/php-src/pull/7660
Patch:      https://github.com/php/php-src/pull/7660.patch
 [2021-11-27 22:59 UTC] bukka@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: bukka
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC