Ah, I think that explains the error code 2. The angle-brackets cause
the shell to report a syntax error, with the result code 258, which is
2 when wrapped modulo 256.
$ lynx -dump -nolist <http://www.harding.edu>
-bash: syntax error near unexpected token `newline'
$ echo $?
258
Cheers - Chuck
http://chuck.habilis.net
On Aug 13, 2008, at 9:51 AM, Frank McCown wrote:
I discovered that 2 was returned when I the URL contained < and > in
it. It may have been PHP that returned 2 instead of the lynx process.
After escaping the characters, the problem was solved.
BTW, this is the code I was executing:
$cmd = "lynx -dump -nolist \"$url\"";
$last_line = exec($cmd, $content, $return_val);
Thanks,
Frank
On Wed, Aug 13, 2008 at 7:47 AM, Chuck Houpt <[EMAIL PROTECTED]>
wrote:
Are there any error messages in the web servers error logs? I
believe that
when PHP runs a shell script, standard error is sent to Apache's
error log.
- Chuck
_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev