Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running PERL on a server

Status
Not open for further replies.

Phatricko

Programmer
Jun 3, 2008
4
I'm trying to use a program called Image Converter Plus on my website but I know absolutely nothing about web programming. This is the example they give for PERL.
Code:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
$ExecString = 'C:\Progra~1\ImageConverter Plus\ICPCL.exe -convertto tiff –source C:\In\ic1.bmp –dest C:\out dither:no -oper Resize size:800 1256 keep_prop:no method: bilinear';
exec $ExecString;
I played with it and got it to work on my computer but I don't know anything about web programming and was just wondering if someone could please help direct me on what needs to be done. My server does support PERL. Any little bit of advice can be a BIG help.
 
If you got the script to work, what direction are you lookig for? An explanation of what the statements listed above do? Here's a generic layout.

1. path to perl
2. Web print directive
3. directive to script to do conversion with options provided, stored in varible $ExecString.
4. Execute the string.
 
I'm not sure what you are trying to do at all :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Okay the Image Converter Plus command line is supposed to be able to allow me to take any picture file and convert it into a different picture file format. I got it to work on MY computer but can't get it to convert files on the server. Like I really don't even know the basics of web programming at all. I know there's something about the cgi-bin folder and file permissions but that's about it...

Here is the help site where I got the example syntax code.

I hope that clarifies my problem, I just really need some help here haha.
 
You really need to pick up a basic perl book and start learning perl. If you don't know any of the concepts you really came to the wrong place.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Is the program uploaded to the server and runs? Few hosts allow users to upload executables and run them. If the program is on the server and you have permission to use it then look into system() or qx// instead of exec() to run the program.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Okay now I tried this and it just doesn't do anything. The .pl file goes into the cgi-bin folder to run, does the picture need to be somewhere special?

Code:
$ExecString = 'icpcl.exe -convertto jpg -source [URL unfurl="true"]http://www.flashxtras.com/ic1.bmp[/URL] -dest [URL unfurl="true"]www.flashxtras.com[/URL] dither:no -oper Resize size:500 500 keep_prop:no method: bilinear';

$result = system$ExecString;
 
You did not answer my question.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Oh you mean is the program uploaded to the server and runs? Well I did upload ICPCL.exe to the server and gave it executable permissions...
 
I doubt your host allows exe files to be uploaded and run, you need to ask them.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top