php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65026 if a function is used which is blocked by disable_functions nothing is logged
Submitted: 2013-06-13 08:57 UTC Modified: 2013-06-13 13:53 UTC
From: mbr at hlkomm dot de Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: Irrelevant OS: Irrelevant
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: mbr at hlkomm dot de
New email:
PHP Version: OS:

 

 [2013-06-13 08:57 UTC] mbr at hlkomm dot de
Description:
------------
Today I had the issue that the use of a function was silenty ignored.

On the system the configuration directive 

disable_functions exec

was set.

In a script exec was used.

Even I wrote something like:

ini_set('display_errors', 'On');
error_reporting(E_ALL);
$lastLine = exec($command, $output, $returnValue);

during debugging no INFO/WARN/ERROR was shown that the exec was blocked by configuration.

I would expect a WARN like "Use of function exec is blocked by configuration on line xxx" or something like this


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-13 11:27 UTC] mbeccati@php.net
-Status: Open +Status: Not a bug -Type: Feature/Change Request +Type: Bug -Package: Testing related +Package: Scripting Engine problem
 [2013-06-13 11:27 UTC] mbeccati@php.net
Are you sure you didn't have some error handler catching the warning? And/or are you sure that you modified the right php.ini using the right syntax?

e.g.
php -d disable_functions=strlen -r 'echo strlen("abc");'

PHP Warning:  strlen() has been disabled for security reasons in Command line code on line 1
 [2013-06-13 13:53 UTC] mbr at hlkomm dot de
sorry, it seems you are right.
Didn't know that an error handler can hide such information.
In fact this is a typo3 Installation where I inserted the code.

sorry for the inconvenience! :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 01:01:29 2025 UTC