Common Problems and Troubleshooting
Media Gallery has been designed to run in many diverse environments, but there are always issues that pop up. Below is a list of common problems you might run into, and their solutions.
Problem: Uploading media items results in a blank page.
Solution: Generally this is a result of trying to upload a file that is larger than the file size specified in the following php.ini configuration directives:
Verify that the php.ini settings are large enough to allow the file upload.
Another issue that can cause a blank screen after upload is insufficient memory. Most default PHP installations are configured to use a maximum of 8 Mb of memory per process. Media Gallery requires at least 48 Mb of memory to process larger image files. Check the value of the memory_limit directive in your php.ini. Depending on what Graphics Program you are using and the size of the media being uploaded, you may need more than 48M of memory. Search your web server's error log file for an error similar to this:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2480 bytes) in path/to/glfusion/public_html/mediagallery/lib-upload.php on line 534
If these solutions do not solve the issue, check your web server's error log file to see if there are any diagnostic messages. Please post the issue in the Media Gallery support forums.
Problem: Thumbnails and display images are not being created after image upload.
Solution: Validate that the directory permissions will allow the web server write access to all the sub-directories under public_html/mediagallery/mediaobjects/.
Also, double check to ensure your graphics package is properly configured.
Both of these can be checked by going into the Media Gallery Administration Screen, selecting System Options and saving. Media Gallery will run a self-check to validate directory permissions and the graphics package. If any errors are reported try to fix the issue and try again.
Problem: An error has occurred:
2 - fopen(/path/to/glfusion/private/logs/error.log) [function.fopen]: failed to open stream: Permission denied @ /path/to/glfusion/public_html/lib-common.php line 1807.
Solution: This is an easy one. The web server does not have write permissions to the path/to/glfusion/private/logs directory or the file path/to/glfusion/private/logs/error.log. This is glFusion's error log file and Media Gallery tries to log the install steps there.
Problem: An error has occurred:
2 - file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/X11R6/bin/jhead) is not within the allowed path(s): (/home/mfxnjunn/:/usr/lib/php:/usr/local/sqmail:/usr/local/lib/php:/tmp) @ /home/mfxnjunn/public_html/lfp/admin/plugins/mediagallery/cfgedit.php line 240.
Solution: This is sort of a permission problem. One of the things Media Gallery does is when you enter the configuration screen it tries to proactively find the external programs it wants to use. Jhead is one of those programs.
On sites that have PHP configured with open_basedir restrictions, that means that PHP is not allowed to access a file unless the directory is specifically listed in the allowed directory list. Media Gallery is trying to look in a directory that is not allowed, so you get the error.
You can disable this check by putting the following into your Media Gallery config.php:
$_MG_CONF['skip_file_find'] = 1;
That will disable looking for the files and prevent the error from happening in the future.
If you can make sure the web server can write to that directory you should be back in business.
Common Troubleshooting Practices
If you run into problems when using Media Gallery, there are a few standard trouble shooting items you should perform to help isolate the problem.
Check your Web Server's Error Log
One of the first places to look for detailed error messages is in the web server's error log. Depending on your hosting environment or your hosting service, how you do this varies. Many hosting services will actually place an error_log file in each of the directories that run PHP code. So, for example, if you are having a problem uploading images, check in the public_html/mediagallery/ directory to see if there is an error_log file.
Check your glFusion Error Log
glFusion maintains its own error file, it is located at private/logs/error.log. Depending on the type of problem you are having there may be more detailed information in this file.
Turn on Verbose Logging in Media Gallery
Media Gallery does a very good job of logging its steps as it attempts to process images, etc. By turning on Verbose Logging, it will log much more detail which may help diagnose a problem. These messages are logged to the glFusion error.log file mentioned previously.
Search the Support Forums at glFusion.org
There is a very good history of issues and resolutions in the support forums at glFusion.org. Check and see if there have been others with a similar problem. If not, please post your problem there and it will be addressed as quickly as possible.