Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 16, 2012, 06:06:39 PM

Pages: [1]   Go Down
  Print  
Author Topic: Simple CGI Question  (Read 2388 times)
sm535
Trekkie
**
Offline Offline

Posts: 17


« on: July 29, 2010, 07:15:55 AM »

Hello,

This must be a simple question for gurus out there:

I am trying to build a cgi script in perl that calls a user application located currently at /opt/some/path/app.

system("/opt/some/path/app -option1 -option2 ...");

Is this allowed since /opt/some/path is not under the web root /public_html/.... directory? Or do I need to install the application under  the cgi-bin path? Will soft/hard link/.htaccess change work to point to /opt/some/path from under cgi-bin?

Thanks.
« Last Edit: July 29, 2010, 11:56:14 AM by sm535 » Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5191



« Reply #1 on: July 30, 2010, 11:55:26 AM »

If this is on a Lunarpages shared server, you probably won't be allowed to access /opt. If it's on a VPS or dedicated server, or home PC LAMPP server, it might be allowed. Check if there is any kind of "open_basedir" restriction in effect for your server configuration. Perl itself shouldn't have any trouble running something on an absolute path (does not have to be under public_html/). I wouldn't think you'd need to move (or fake a move with a link) the application out of /opt, unless you can't get around the open_basedir restriction (and if you could install your application into /opt in the first place, I would assume that you have the power to change the server configuration).
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
Pages: [1]   Go Up
  Print  
 
Jump to: