BLANK CONFIGURATION PAGE! Fresh Install...

16 years 7 months ago #45193 by jof
Hi Beat,

I already tried site debugging, but also with debugging on, I see only the blank page with no errors.

All other tabs for community builder are working, except the Configuration Tab...

Please Log in to join the conversation.

16 years 7 months ago #45216 by jof
I think I know now what the failure is.

It has something to do with Imagemagick and the exec() command.

My hoster has Imagemagick installed but exec() is forbidden.

ImgToolbox.php sees that imagemagick is installed and wants to use it, but it can't because exec() is forbidden.

I tried to modify this script so that it uses GD2 but with no luck.

Can someone please help me with that?

Please Log in to join the conversation.

16 years 7 months ago #45223 by beat
That's in administrator/components/com_comprofiler/imgToolbox.class.php

and normally exec isn't called, if disabled, and even if called with the @ it shouldn't stop, but you can comment it to be extra sure...

[code:1]<?php
function cbIsExecDisabled() {
return $this->cbIsFunctionDisabled( 'exec' );
}
//END OF CB_FIXES.
function testIM(){
if($this->cbIsExecDisabled()){ //CB_FIXES:
return false; // exec() is disabled, so give up
}
@exec('convert -version', $output, $status);
if(!$status){
if(preg_match("/imagemagick[ \t]+([0-9\.]+)/i",$output[0],$matches))
return $matches[0];
}
unset($output, $status);
}
[/code:1]

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.

16 years 7 months ago #45224 by jof
i already commented all exec functions with no success.
Is there a possibility to force the use of GD2?

Please Log in to join the conversation.

16 years 7 months ago #45264 by jof
Hi,

Now I have a working solution for me.

It seems like this function is not working right, because it doesn't recognize that exec is disabled:

[code:1]function cbIsFunctionDisabled( $function ) {
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( $function, $funcs );
} else {
return true;
}
}

function cbIsExecDisabled() {
return $this->cbIsFunctionDisabled( 'exec' );
}
[/code:1]


So I commented this lines out:


[code:1]
function getImageLibs(){
// do auto-detection on the available graphics libraries
// This assumes the executables are within the shell's path
$imageLibs= array();
// do various tests:
# if ($testIM = $this->testIM()) {
# $imageLibs = $testIM;
# }
# if ($testNetPBM = $this->testNetPBM()) {
# $imageLibs = $testNetPBM;
# }
$imageLibs = $this->testGD();
return $imageLibs;
}
[/code:1]

Now everything is workin fine and CB is using GD2.

Thanks Jof

Please Log in to join the conversation.

16 years 7 months ago #45417 by beat
Do you have safeMode on in your php config ?

Would be interesting to know what's the exact setting used to disallow exec() while it's not listed in the disabled functions.

Or is ini_get() disabled too ?

Marked thread for review.

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.

Moderators: beatnantkrileon
Time to create page: 0.229 seconds

Facebook Twitter LinkedIn