PerlMagick aparently failing when called from Apache
I'm migrating some perl scripts to a new server.
Some perl routines manipulate images with PerlMagick. When I run these routines from the command line as root everything works; when I call them from a web page the routine seemingly completes (no error messages) but I get no image served.
Some perl routines serve an image without using PerlMagick and they work just fine. The problem, I'm beginning to think, lies with getting PerlMagick working with Apache. The technique I use is to first write the page header and then write the binary image data back to the requesting browser. There is no HTML as such.
All ImageMagick ownership and group is root with 644 chmod settings.
I compiled ImageMagick and PerlMagick from source. Is there some security mechanism in ISPConfig3 that is preventing these compiled binaries running under Apache? Apache had modules mime and mime-magic loaded as per original configuration.
All the routines run just fine on an old BlueQuartz CentOS 4 system.
Any help to stop this amateur web-coder pulling hair appreciated!
So you're trying to show an image in your browser with a perl script ..
remember that you're not allowed to send a single byte extra besides the image data + it's mime type .. so the browser knows how to interpretate it..
Read an image (png and output as jpeg):
Thanks for wanting to help.
I've got something similar to yourcode. The routines are already proven on my old running server.
The only difference between my code and yours is the image I fetch remains in memory; so I do a blobToImage convert on the fetched data before pushing it out.
And I say, it all runs from the command line just fine. I'm really mystified.
Mmm, perhaps an extreme work-around... but I changed my Linux Distro from Ubuntu to SuSe and started over with a new install.
ImageMagick did its thing with no messing around.
|All times are GMT +2. The time now is 21:08.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.