Page 1 of 1

cgi script to run whenever file is requested

PostPosted: 08. January 2010 17:50
by geebers
I need to run a cgi script each time a .jpg file is requested.

In my .htaccess file i've included the following......
Code: Select all
<IfModule actions_mod>
AddHandler cgi-script .cgi
AddHandler image/jpg .jpg
Options ExecCGI
Action image/jpg /cgi-bin/myscript.cgi

some configuration notes....
permissions seem to be fine. apache runs as user bob.
myscript.cgi user=bob, group=bob, filepermission=755
all files in my directory user=bob, group=bob

I can run myscript.cgi successfully by manually typing ./myscript.cgi
but does not run when a .jpg file is requested.
any clues??? Thanks for any help.