Have you verified that lynx, grep, and head are in PHP's path? Check the output of `which lynx` or phpinfo() to figure out what your path is, and whether it includes lynx. Alternatively, use a full path to lynx to avoid confusion.
Could be that the apache process has no rights to run these commands. Try su as apache and see if you can run it.
When you run php from the command line, it runs as the active user.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php