"Warning: exec() has been disabled" message

17 years 7 months ago #19881 by beat
Replied by beat on topic Re:
I implemented and thought i tested this in CB 1.0.1 before releasing :S

Well, please log bug at forge with reference to this thread and server versions information and i will take a look for next version.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

17 years 7 months ago #19955 by walb
Replied by walb on topic Re:Possible solution for the warnings
imgToolbox.class.php line 628 holding[code:1]
return in_array( 'exec', explode( ',',ini_get( 'disable_functions' ) ) );[/code:1]change into[code:1] return in_array( 'exec', explode( ', ',ini_get( 'disable_functions' ) ) );
[/code:1]Note the extra space behind the comma. This will cause that the exec function is found and no warning is displayed.

Please Log in to join the conversation.

17 years 7 months ago #20104 by beat
Replied by beat on topic Re:Possible solution for the warnings
walb wrote:

imgToolbox.class.php line 628 holding[code:1]
return in_array( 'exec', explode( ',',ini_get( 'disable_functions' ) ) );[/code:1]change into[code:1] return in_array( 'exec', explode( ', ',ini_get( 'disable_functions' ) ) );
[/code:1]Note the extra space behind the comma. This will cause that the exec function is found and no warning is displayed.


Thanks for noticing, fixed in next release with following code:

[code:1] function cbIsExecDisabled(){
if (is_callable("ini_get"«»)) {
$funcs = explode( ',',ini_get( 'disable_functions' ) );
for ( $i=0, $n=count($funcs); $i<$n; $i++ ) {
$funcs[$i] = trim($funcs[$i]);
}
return in_array( 'exec', $funcs );
} else {
return false;
}
}
[/code:1]

Can you please test final fix and report back if ok at your site ?

Thanks

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

17 years 7 months ago #20212 by walb
Replied by walb on topic Re:Possible solution for the warnings
beat wrote:


Thanks for noticing, fixed in next release with following code:

[code:1] function cbIsExecDisabled(){
if (is_callable("ini_get")) {
$funcs = explode( ',',ini_get( 'disable_functions' ) );
for ( $i=0, $n=count($funcs); $i<$n; $i++ ) {
$funcs[$i] = trim($funcs[$i]);
}
return in_array( 'exec', $funcs );
} else {
return false;
}
}
[/code:1]

Can you please test final fix and report back if ok at your site ?

Thanks

The code is tested and is of course OK.;)
Thanks,
Walb

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn