SSI to include a perl script

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

Hello everyone,
Looks like I got my moderator position revoked. Thats actually good, I haven't had time to visit the forums as much as I had intended..sorry. Anyways, puttin that behind me, is there anyway to use SSI to execute a perl script?

I have tryed using #include but I keep getting "there was an error processing this directive" the standard error for when SSI can't find or can't use a specified file. Could someone point me in the right direction? Should I use #exec instead? I'm kinda lost, and I am heading home..ready to crack open a beer and fragg some arses in Q3...who's wit me? Alright.

Thanks guys,
Ken Elliott

Vendors Word of Wisdom: Keep your hotdogs' buns warm, or another vendor might warm them for you.

Pimpin like a pimp with an electrofied pimpin machine!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

Mark you rock! Man yer the big cheeze in my book! You deserve a cookie or something...someone get this man a cookie!

Ken Elliott
TWF - Moderator Alumni

Pimpin like a pimp with an electrofied pimpin machine!

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

Ah man one more thing. Is there something special I must do to my cgi script to have the output printed to the browser? I used a simple perl script as a test...

print "I smell like a monkey";

with the shebang of course...but I got a blank space in my shtml file...why? Atleast it is not erroring on me now. I'd appreciate any help...thanks..

Ken Elliott
PIMP for hire

Pimpin like a pimp with an electrofied pimpin machine!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

uhhhhh...

is the CHMOD right?

try printing the header:
print "Content-type:text/html\n\n";

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

yeah I added the mime type, but I still don't get any output. Should I maybe specify the output as STDOUT or something? Thanks for yer help.

Ken Elliott

Pimpin like a pimp with an electrofied pimpin machine!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

have you tried running your CGI in a browser?
just point your browser to where your CGI is located on the server.

not sure if this will make a difference, but try adding a space between the last " and -->
becomes

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.