Troubleshooting Tip #1: Running Pixenate with Mod_Perl 2.0

We’ve recently had a couple of customers reporting the same issue when they tried to edit photos using Pixenate.
Whenever the user tried to upload or edit a file the server returned an “Internal Server Error”.

The problem is that, with any perl script running under mod_perl 2.0, the current working directory (the directory the script is working from) is not the same as the directory in which the script resides. This is a problem because Pixenate’s server-side code assumes that the working directory is the same directory in which the script/code resides. What’s more, Pixenate assumes that all of the supporting modules will reside in a ‘lib’ directory in the working directory so chances are the script won’t even compile when invoked from Apache.

Fortunately, the workaround is simple.

Near the top of pxn8.pl there will be a BEGIN {} block. Inside that block, add the following code…

chdir "/var/www/vhosts/mydomain.com/httpdocs/pixenate";
use lib "/var/www/vhosts/mydomain.com/httpdocs/pixenate/lib";

Make sure to change the Emphasised values in the code above to match your own directory structure.

Do the same thing for upload.pl and you’re done.

update: If you’re comfortable tweaking mod_perl’s configuration, check out the following solution…
http://www.mail-archive.com/modperl@apache.org/msg35378.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: