php / php/php-src

php_admin_value disable_functions and upload_tmp_dir ignored

Open
#19,018 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug SAPI: apache2handler
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

php 8.2 at least.
if disable_functions is null in php.ini but populated in apache config php_admin_value , its ignored, phpinfo says its there but those functions like the dangerous exec is there and usable. why phpinfo says we are protected but in fact are not, thankfully we found out 3 weeks after upgrading from 7.4 which I know worked well in protecting the systems. I also tonight found it ignores the php_admin_value upload_tmp_dir as well.

Thankfully it still knows what to do with open_basedir which still appears to work.

MY understanding of disabled functions changes in 8.0 meant this (apache vhost) method was complmentary, to the php.ini, but its ignored outright.

This is using apache 2.4 with mod_php, from php 8.2.29 tested and confirmed with this release when we had it with .28 as well.

PHP Version
PHP 8.2.29 (cli) (built: Jul  3 2025 19:24:07) (ZTS)
Copyright (c) The PHP Group
Zend Engine v4.2.29, Copyright (c) Zend Technologies
Operating System

slackware 15.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with PHP 8.2.29, Apache 2.4, and mod_php, using php.ini and Apache php_admin_value settings for disable_functions and upload_tmp_dir. Compare their behavior and phpinfo output with open_basedir. Done means the reported directives are applied consistently and their effective values are accurately reflected.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, php
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.