Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Doesn't return 404 on nonexisting files

オープン
#1,869 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, php
領域
backend

調査の方向性

この報告では、ソースファイル、テスト、エントリーポイントのいずれも指定されていません。Web サイトのルートに index.php を置き、/favicon.ico のようなリクエストを使用して動作を再現し、その後 FrankenPHP が存在しないファイルをどのように処理するかを追跡し、期待される 404 の動作または文書化された設定オプションが必要かどうかを判断してください。

索引モデルが issue の本文から書いたものです。

説明

bug
What happened?

If you have an index.php file in the website root, any request to nonexisting files will be executed by index.php and return 200. This will result in incorrect responses serving the actual website content on nonexisting paths with the incorrect status code (200) instead of 404.

If this is the intended behaviour, is it possible to disable it?

Build Type

Docker (Debian Trixie)

Worker Mode

No

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration
System 	Linux 2e987d8e2f6e 6.12.43+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1 (2025-08-27) x86_64
Build Date 	Aug 28 2025 18:15:48
Build System 	Linux - Docker
Build Provider 	https://github.com/docker-library/php
Configure Command 	'./configure' '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--with-pic' '--enable-mbstring' '--enable-mysqlnd' '--with-password-argon2' '--with-sodium=shared' '--with-pdo-sqlite=/usr' '--with-sqlite3=/usr' '--with-curl' '--with-iconv' '--with-openssl' '--with-readline' '--with-zlib' '--enable-phpdbg' '--enable-phpdbg-readline' '--with-pear' '--with-libdir=lib/x86_64-linux-gnu' '--enable-embed' '--enable-zts' '--disable-zend-signals' 'build_alias=x86_64-linux-gnu' 'PHP_UNAME=Linux - Docker' 'PHP_BUILD_PROVIDER=https://github.com/docker-library/php'
Server API 	FrankenPHP
Virtual Directory Support 	enabled
Configuration File (php.ini) Path 	/usr/local/etc/php
Loaded Configuration File 	(none)
Scan this dir for additional .ini files 	/usr/local/etc/php/conf.d
Additional .ini files parsed 	/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini, /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
PHP API 	20240924
PHP Extension 	20240924
Zend Extension 	420240924
Zend Extension Build 	API420240924,TS
PHP Extension Build 	API20240924,TS
PHP Integer Size 	64 bits
Debug Build 	no
Thread Safety 	enabled
Thread API 	POSIX Threads
Zend Signal Handling 	disabled
Zend Memory Manager 	enabled
Zend Multibyte Support 	provided by mbstring
Zend Max Execution Timers 	enabled
IPv6 Support 	enabled
DTrace Support 	disabled
Registered PHP Streams	https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
Registered Stream Socket Transports	tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters	zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk
Relevant log output

For example, when the browser tries to request /favicon.ico that doesn't exist, index.php will be executed and return the main website content as HTML:

caddy-1  | {"level":"info","ts":1757529977.5878327,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"1.2.3.4","remote_port":"50513","client_ip":"1.2.3.4","proto":"HTTP/2.0","method":"GET","host":"example.com","uri":"/favicon.ico","headers":{"Sec-Fetch-Dest":["image"],"Sec-Fetch-Site":["same-origin"],"Cache-Control":["no-cache"],"Accept":["image/avif,image/jxl,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"],"Pragma":["no-cache"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"],"Priority":["u=6"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Mode":["no-cors"],"Te":["trailers"],"Accept-Language":["sl,en-GB;q=0.8,en-US;q=0.5,en;q=0.3"],"Referer":["https://example.com/test"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}},"bytes_read":0,"user_id":"","duration":0.003590894,"size":80152,"status":200,"resp_headers":{"Server":["Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000"],"X-Powered-By":["PHP/8.4.12"],"Content-Type":["text/html; charset=UTF-8"]}}
主要言語
Go
スター
11.4k
フォーク
490
平均マージ
2日 22時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php/frankenphp のほかの issue

php/frankenphp の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。