View Issue Details

IDProjectCategoryView StatusLast Update
0015524mantisbtotherpublic2013-06-24 02:59
Reporterrcheng Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.2.14 
Summary0015524: Incorrect error_reporting value or setting in Apache skips required fields validation in Issue Report
Description

When the PHP value of error_reporting is set incorrectly in the apache configuration using php_flag or php_value directive, this makes that in the validation of an empty and required fields in like Category, Summary of Description in "Report Issue" being skipped, creating an empty issue report which have no sense. It could happen with other mantis validations.

Mantis configuration is defaults

Apache and PHP don't show any warning or error about this incorrect value.

It happens with PHP version 5.3.3 and 5.3.2. Apache version tested: 2.2.13 and 2.2.14

Steps To Reproduce

Create in Mantis an issue report without anything filled. Expected behavious is Application Error because empty fields. Incorrect behaviour: create an empty issue report.

In the configuration of a virtual host of Apache, set:

Case 1: php_flag error_reporting E_ALL
Results: created (BAD)
Comments: error_reporting should not be changed using php_flag. PHPInfo displays the value 22527

Case 2: php_value error_reporting 22527
Results: not created (OK).
Comments: PHPInfo displays the value 22527

Case 3: php_value error_reporting E_ALL
Results: created (BAD)
Comments: error_reporting should be an integer. PHPInfo displays the value E_ALL.

Additional Information

The workaround is to set error_reporting in Apache configuration using php_value directive and using integer value. For example:

php_value error_reporting 22527

TagsNo tags attached.

Relationships

related to 0012632 closeddregad Signup with empty username and e-mail is possible when display_errors[E_USER_ERROR] = 'inline' 
related to 0010966 closeddregad No Errors shown at all if error_reporting=0 configured at server 

Activities

dregad

dregad

2013-06-14 17:34

developer   ~0037198

The problem you describe is not caused by MantisBT. It is is normal and documented behavior [1][2] when using PHP constants in Apache config files.

Also note that php_flag (your case 1) is used to configure boolean values, and should therefore not be used for integer values such as error_reporting; use php_value instead.

The solution you have indicated under Additional Information is the correct one.

[1] http://php.net/errorfunc.configuration.php#ini.error-reporting, see Note: PHP Constants outside of PHP
[2] http://php.net/manual/en/configuration.changes.php, see yellow Caution box