Hi,
Can anyone help me with this problem:
I have Mantis in 2.23.0 version and PHP in version 7.1.10, and everything is working well, but when I try to change PHP version to 7.2.11 or 7.3, there is warning message showing on logon page:
Warning: 100 in /home/mantis/core/config_api.php on line 191
What should I do?
Warning 100 after changing php to 7.2.11
Moderators: Developer, Contributor
Re: Warning 100 after changing php to 7.2.11
seems a configuration option is not correct, did you make any changes?
-
- Posts: 4
- Joined: 10 Feb 2020, 09:58
Re: Warning 100 after changing php to 7.2.11
No, it's strange, because i change only version of php and nothing else. When I set back version 7.1.10, this warning disappears.
-
- Posts: 4
- Joined: 10 Feb 2020, 09:58
Re: Warning 100 after changing php to 7.2.11
I've finally found what was the problem. It was config variable $g_crypto_master_salt, which had in it's value specific substring: &^$# or %^$#%. These characters were treated by php 7.2 and 7.3 as variable name ^$#, and there was warning, while unsuccessful trying to set it.
I've changed those characters to simple numeric characters and warning stopped to appear.
Maybe you (Mantis Team) need to correct reading config variables, to not analyze text inside string variables in php higher than 7.1?
I've changed those characters to simple numeric characters and warning stopped to appear.
Maybe you (Mantis Team) need to correct reading config variables, to not analyze text inside string variables in php higher than 7.1?
Re: Warning 100 after changing php to 7.2.11
Thanks kasperiusz for providing this information.kasperiusz wrote: ↑19 Mar 2020, 07:33These characters were treated by php 7.2 and 7.3 as variable name ^$#, and there was warning, while unsuccessful trying to set it. to not analyze text inside string variables in php higher than 7.1?
I had a short look at it and did not find any documented incompatible change in PHP 7.2 compared to PHP 7.1 where something like that is mentioned.
https://www.php.net/manual/en/migration ... atible.php
Can you provide some more information?
Have you set $g_crypto_master_salt in single or double quotes?
-
- Posts: 4
- Joined: 10 Feb 2020, 09:58
Re: Warning 100 after changing php to 7.2.11
Single quotes.
This are bigger fragments from this string:
C*&^$#G and $%^$#%@
From there was found variable with name: ^$#
This are bigger fragments from this string:
C*&^$#G and $%^$#%@
From there was found variable with name: ^$#
Re: Warning 100 after changing php to 7.2.11
I had a deeper look at the issue and I am able to reproduce.
It happens as Mantis checks configuration variables for references of other configurations variables.
This is done by looking for something like %other_variable_name%
In your case this is ^$# that does not exist.
It's not related to the PHP version, but can be reproduced with any PHP version.
I assume you have set different error settings in PHP 7.1 and PHP 7.2, so you don't get the warning in 7.1.
It happens as Mantis checks configuration variables for references of other configurations variables.
This is done by looking for something like %other_variable_name%
In your case this is ^$# that does not exist.
Code: Select all
/**
* check for recursion in defining configuration variables
* If there is a %text% in the returned value, re-evaluate the "text" part and replace the string
*
* @param string $p_value Configuration variable to evaluate.
* @param boolean $p_global If true, gets %text% as a global configuration, defaults to false.
* @return string
*/
function config_eval( $p_value, $p_global = false ) {
$t_value = $p_value;
# return $t_value;
if( !empty( $t_value ) && is_string( $t_value ) && !is_numeric( $t_value ) ) {
if( 0 < preg_match_all( '/(?:^|[^\\\\])(%([^%]+)%)/U', $t_value, $t_matches ) ) {
I assume you have set different error settings in PHP 7.1 and PHP 7.2, so you don't get the warning in 7.1.
Re: Warning 100 after changing php to 7.2.11
Opened https://mantisbt.org/bugs/view.php?id=26798 to track the issue