 |
 |
CGI:SSI, exec no longer working
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status:
Offline
|
|
I have a # of perl cgi scripts that need to include a set of header/footer files, some of which are php, so I can't just use a require statement.
I worked out a scheme using CGI:SSI to exec the files, just like a shtml directive. And this was working fine until "recently". Can't say for sure when it broke, but suddenly, these scripts no longer work. I get the error message
[an error occurred while processing this directive]
from the browser, as well as when running directly from the command line.
A sample file:
Code:
#!/usr/local/bin/perl
$|++;
sub header{
use CGI::SSI;
use CGI::Carp (fatalsToBrowser);
my $ssi = CGI::SSI->new();
print $ssi->exec(cgi => '/navjump_header.php'); # used to work, now fails
print $ssi->exec(cgi => '/cgi-bin/perldiver.cgi'); # fails
print $ssi->include(file => 'footer.pl'); # works
}
header();
1;
so I would "require" this perl file, from another perl script.
The 1st exec is the one I _had_ working. The 2nd exec was just a debug idea, and perldiver runs fine from the command line. The 3rd include does work, so CGI::SSI it not totally broken, but...
I get nothing in the apache error log, nor in system log.
Other "variables"... I did install a wireless router over the weekend, and applies all Apple updates. But I can get to the web page, and have specified in my ipfw rules that 192.168. has full access to port 80. Oh, and the machine in in the DMZ for the router (I'm not at home so I can't check the router log, but in _theory_ the machine is exec'ing a local cgi, so....). I checked and the http.conf file has not changed in a month (seemingly no Apple "stealth" update in the recent updates)
Ideas?
Mike
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
have you restarted apache?
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status:
Offline
|
|
Yes.
And I guess this ia not Apache related(?) since it also fails when invoked from the Terminal? (maybe I should post this in unix instead)
Mike
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
did #!/usr/local/bin/perl previously work on that system?
have you tried with #!/usr/bin/perl instead?
[edit] okay, i read the script closer that time. i see the 2 files which don't work start with a slash, while the worker doesn't. have you played around with that?
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status:
Offline
|
|
Originally posted by philzilla:
did #!/usr/local/bin/perl previously work on that system?
have you tried with #!/usr/bin/perl instead?
[edit] okay, i read the script closer that time. i see the 2 files which don't work start with a slash, while the worker doesn't. have you played around with that?
Yep. Can't say for _sure_ that include and exec both assume the same starting path, but I figured that if include could find the one file, then exec should find the others. I tried with a slash, without, and with dot-slash.
And I verified that an shtml file doing the same thing (SSI exec via Apache) works. Something is wrong with my perl CGI::SSI.
Mike
(Last edited by Zim; May 6, 2004 at 12:01 PM.
)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|