Solving blank page of configuration manager in Joomgallery
Joomgallery is a great extension of Joomla. You can make gallery, upload photos, or even product catalog easily. If you are using Joomgallery 1.5.5.5.2, you may experience problem that the configuration manager of it becomes a blank page. And this how-to teaches you how to solve the problem.
Content |
Problem
I am trying to setup a company website for a client. The website consists of a product catalog, and I found that JoomGallery suits the job very well since I can batch upload product into the website. However when I transfer the website from my own server to the production server, the Joomgallery's configuration manager becomes blank. It can't be shown. Even if I set Joomla to debug mode, and set the error reporting to maximum, it is still a blank page. People from forum suggested that it is a system error. And the error log should be in the Apache log. However I don't have the access to it.
I am using:
- Joomla 1.5.20
- JoomGallery 1.5.5.2
Getting PHP and Apache error reports in Joomla
Please refer to the following link to achieve that:
Logging Joomla PHP Errors Without Using Apache Logs
The Error
If you look at the .error_log, you will find that the JoomGallery tried to use the function exec, but exec is disabled. Therefore it just died silently.
From the JoomGallery forum, they said the problem should have been solved in this version. But I checked the code in the error file:
/administrator/components/com_joomgallery/models/config.php, the end of the file, there is a function getIMVersion():
function getIMVersion(){
$config = & JoomConfig::getInstance();
$status = null;
$output = array();
$disabled_functions = explode(',', ini_get('disabled_functions'));
foreach($disabled_functions as $disabled_function){
if(trim($disabled_function) == 'exec'){
return 0;
}
}
if(!empty($config->jg_impath)){
$execstring = $config->get('jg_impath').'convert -version';
}
else{
$execstring = 'convert -version';
}
@exec($execstring, $output, $status);
if(count($output) == 0){
return 0;
}
else{
return $output[0];
}
}
}
The error actually is generated by the line:
@exec($execstring, $output, $status);
Since the share hosting disabled the function. The getIMVersion() is supposed to take care of it, however there is a subtle bug in this line:
$disabled_functions = explode(',', ini_get('disabled_functions'));
To get disable function, we should call:
$disabled_functions = explode(',', ini_get('disable_functions'));
using 'disable_function' instead of 'disabled_function'. Changing it in line 73 helps you solve the 'JoomGallery configuration manager being blank' problem.
Please login to post comment.