WebGUI – Overcoming installation hurdles…

Installation of WebGUI on RedHat 8 and RedHat 9 boxes is quite a pain but, once you get everything up and running, things run flawlessly. As a matter of fact, once the installation quirks are figured out, installation takes less than ten minutes start to finish.

Although WebGUI is free and open source, PLAINBLACK counts on installation difficulties to boost sales of their documentation and support programs. They also restrict users who have purchased documentation and support contracts from sharing their findings with normal users.

I agree that companies who create open source software need to make money somehow, but I disagree on putting a gag order on people to keep them from helping others solve problems. Luckily, I have purchased neither documentation nor support so I can share my findings! This will be a multipart series as I uncover more WebGUI weirdness.

Perl Module Installation Errors

According to the Linux installation page, the following modules are required:

LWP (Bundle::LWP)
DBI (Bundle::DBI)
DBD::mysql
Digest::MD5
Date::Calc
Image::Magick
Archive::Tar
Compress::Zlib

Unfortunately, quite a few errors are generated during the CPAN installations of these packages. No matter what you do Image::Magick won’t build so just install the ImageMagick, ImageMagick-devel and ImageMagick-perl RPMs from the installation CD. On RedHat 8, the rest of the errors can be safely ignored and installation can be forced. On RedHat 9, the character set must be changed and then the errors can be safely ignored and installation can be forced.

[root@habanero root]# export LANG=en_US
[root@habanero root]# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.71)
ReadLine support enabled
cpan> force install Digest::MD5

Web Server Configuration

Once all modules have been installed the Web server must be configured to allow for mod_perl execution. Although this isn’t a requirement it is highly recommended since it drastically increases execution speed. The default instructions, however, are incorrect for newer versions of Apache. Use the below configuration example if you receive the following error:

Can't locate Apache/Registry.pm in @INC

Replace the default options from the WebGUI installation instructions for Files in your httpd.conf or .htaccess file with the following1 or simply modify /etc/httpd/conf.d/perl.conf:

AllowOverride All
SetHandler perl-script
PerlHandler ModPerl::Registry::handler
PerlOptions +ParseHeaders
Options +ExecCGI

Absolute Path Modifications

Once mod_perl is successfully configured, you will more than likely receive the following error:

Can't locate WebGUI.pm in @INC

This is due to the fact that the $webguiRoot variable in index.pl may need to be changed to an absolute path, especially if you run multiple servers and have moved all of the WebGUI support files to a different directory. Simple change the variable to point at the absolute path where the support files are located.

We have encountered a problem with your request. Please use your back button and try again. If this problem persists, please contact us with what you were trying to do and the time and date of the problem.

WARNING: Wobject failed to compile:

This seems to be an include path problem. If you receive this error, edit index.pl and change $webguiRoot."/lib" to "/path/to/webgui/lib". No idea why this needs to be hardcoded…perhaps it’s a funky RedHat UTF thing?

Database Errors

Can't connect( HASH(0x8ff7500)), no database driver specified and DBI_DSN env var not set

Fairly obvious…you didn’t modify your WebGUI.conf file.

Can't call method "prepare" on an undefined value2

Your database username and/or password is incorrectly set in WebGUI.conf or another database error has occurred.

1 Thanks to http://www.ma.utexas.edu/pipermail/webcalendar/2003-May/000640.html
2 Thanks to http://everydevel.com/index.pl?node_id=323&lastnode_id=224