PSI::ESP reveals that you have an unescaped +, ?, or * in a regular expression. :)
| [reply] [d/l] [select] |
I ran it from the shell, and it gave me the same error but pointed to a question mark on line 73. But I don't see what's wrong:
$newurl = "/$newurl";
if ($newurl =~ "\?") { # line 73 (I think)
($newurl,$junk) = split(/\?/, $newurl, 2);
}
| [reply] [d/l] |
This
if ($newurl =~ "\?") { # line 73 (I think)
should be:
if ($newurl =~ /\?/) {
The problem is that the string on the right hand side is being treated as the regular expression to match... but the backwhack is treated as an escape, so the regex becomes simply /?/ and hence the quantifier (?) "follows nothing."
-sauoq
"My two cents aren't worth a dime.";
| [reply] [d/l] [select] |
Is that error showing up in your browser, or in the server's error log?
If the script fails to compile properly, or if it produces a warning before commensing its run, it will output text that will cause a corrupted header.
What happens if you run the script from the command line? Often you can do that, particularly if the script was written with CGI.pm. I've found that doing so will usually give you a better idea of the problem. In particular, you'll be able to determine more easily if the message is a compiletime error, warning, or a runtime issue.
Dave
"If I had my life to live over again, I'd be a plumber." -- Albert Einstein
| [reply] |
Can you post your code (or a fragment of the code you think is causing the problem) so we can have a look at it? Without looking at your code, we can only guess what is happening.
You should check the Apache error.log to see what is causing this error. The error log usually showes the error in detail.
You can also run the script at the command-line to see if you can get the HTML you expected.
| [reply] |
The error I posted was from the error log.
| [reply] |