Re: Re: php + lynx + grep
| From: | Michal Migurski | Date: | Wed, 07 Apr 2004 18:47:06 +0000 |
| Subject: | Re: Re: php + lynx + grep | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182689@lists.php.net to get a copy of this message | ||
> Try adding the apache user to sudoers in /etc/sudoers if not already
>there
DANGER WILL ROBINSON.
Don't add the Apache user to /etc/sudoers -- Apache's security model
relies on that user being unprivileged.
>> lynx --source
>> http://weather.noaa.gov/weather/current/KTOL.html |grep
>> -v '41-35-19N' |grep TOL | head -n 1
>>
>> I need to get the output of the above command for a web site I'm
>> working on. I've tried exec(), system() and neither seems to work.
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.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html