View Single Post
Old 04-19-2009, 04:38 PM  
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by Jakez View Post
I'm actually trying to get it to run from within a .php page, and I tried it with exec() but nothing happened..

I tried exec("perl rsapi.pl prem archive.rar 334");

Is it supposed to be -perl instead? Not too familiar with this crap lol.

Any particular reason that you're wrapping Perl in PHP? I suppose you're either
wanting to integrate it with some much larger PHP system, or you want to add
some gigantic security issues. ;) I'm guessing the former. Anyway, I'd run just
the script itself first, before trying to integrate it with the PHP. Rather than checking
your error logs as you work with it, add this to the top of the script in order to turn
it into a CGI script which will output any error messages to your browser:

Code:
#!/usr/bin/perl

BEGIN {
        if ($debug) {
                print "Content-type: text/html\n\n<html><body><pre>\n";
                open (STDERR, ">&STDOUT");
                select(STDERR); $| = 1;
                select(STDOUT); $| = 1;
        }
}
__________________
For historical display only. This information is not current:
support&#64;bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote