[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] lynx return values

From: Chuck Houpt
Subject: Re: [Lynx-dev] lynx return values
Date: Wed, 13 Aug 2008 10:15:58 -0400

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 <>
-bash: syntax error near unexpected token `newline'
$ echo $?

Cheers - Chuck

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);


On Wed, Aug 13, 2008 at 7:47 AM, Chuck Houpt <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]