Forum Home
Press F1
 
Thread ID: 43085 2004-03-02 23:51:00 webserver and CGI question robsonde (120) Press F1
Post ID Timestamp Content User
219726 2004-03-02 23:51:00 I what to have a form that lets users input dat/numbers in to then a CGI script in perl will put all the info in to a .CONF file and then run an external program that reads the .CONF file and does lots of stuff with it resulting in a .JPG file that will be returned by the web server to the user to see on the web page.


question is how?

I will be using perl due to the fact that i have it set up on the webserver box.

how can i make the perl script call on external program?

if the external program takes 3 minutes to make the .JPG wont the web browser "timeout" ?


BTW all this is to be done on unix with apache and perl.
robsonde (120)
219727 2004-03-03 06:25:00 bump robsonde (120)
219728 2004-03-03 09:19:00 Hey robsonde,

That's a lot of information you're asking for and I can only say you may need to research on these specific commands

UNIX - touch, chmod (also on perl)
PERL - open, close, flock, print
APACHE - suEXEC

Also a lot of security measures and error handling required. You'll have to write the function of timing out for the script, if it takes to long end it, report the error back to the user and exit the external program. Make sure the user is aware of what is happening and that they can't resubmit the information again as this may cause problems.

I hope this helps a bit, but for something like this involves an indepth explanation on what you want. If you could show examples or give examples of what is going to happen in more depth you might get the answers you require.


Noel Nosivad.
Noel Nosivad (389)
219729 2004-03-03 10:32:00 i have most of the problem solved.....

the only problem is that the program i want to run wont run as "nobody" and "nobody" has cat write to a file in the html directory......

how can I make it all run as a user other than nobody?

I am using system to run my program from perl....
robsonde (120)
219730 2004-03-03 10:34:00 what i tried to say was.....


the only problem is that the program i want to run wont run as "nobody" and "nobody" cant write to a file in the html directory......
robsonde (120)
219731 2004-03-03 10:41:00 looks like i am out of my depth....

I will call in my unix geek on the weekend.
robsonde (120)
219732 2004-03-03 14:48:00 Hey robsonde,

This user 'nobody' should never own files, it's a generic user installed for running non-privileged jobs that don't belong to any one user. Mainly for scripts used in cron jobs.

The owner of the HTML directory is either 'apache' or yourself and they would be allowed to write to this directory with correct chmod settings.

You should look at suEXEC if you haven't, this allows you to run the program, hopefully with the right owner of the directory.


Noel Nosivad
Noel Nosivad (389)
1