Warning 100 after changing php to 7.2.11

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
kasperiusz
Posts: 4
Joined: Feb 10, 2020 4:58 am

Warning 100 after changing php to 7.2.11

Post by kasperiusz »

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?

cas
Posts: 750
Joined: Mar 11, 2006 11:08 am
Contact:

Re: Warning 100 after changing php to 7.2.11

Post by cas »

seems a configuration option is not correct, did you make any changes?

kasperiusz
Posts: 4
Joined: Feb 10, 2020 4:58 am

Re: Warning 100 after changing php to 7.2.11

Post by kasperiusz »

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.

kasperiusz
Posts: 4
Joined: Feb 10, 2020 4:58 am

Re: Warning 100 after changing php to 7.2.11

Post by kasperiusz »

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?

atrol
Site Admin
Posts: 7757
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Warning 100 after changing php to 7.2.11

Post by atrol »

kasperiusz wrote:
Mar 19, 2020 2:33 am
These 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?
Thanks kasperiusz for providing this information.

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?
Please use Search before posting and read the Manual

kasperiusz
Posts: 4
Joined: Feb 10, 2020 4:58 am

Re: Warning 100 after changing php to 7.2.11

Post by kasperiusz »

Single quotes.
This are bigger fragments from this string:
C*&^$#G and $%^$#%@
From there was found variable with name: ^$#

atrol
Site Admin
Posts: 7757
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Warning 100 after changing php to 7.2.11

Post by atrol »

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.

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 ) ) {
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.
Please use Search before posting and read the Manual

atrol
Site Admin
Posts: 7757
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Warning 100 after changing php to 7.2.11

Post by atrol »

Please use Search before posting and read the Manual

Post Reply