Re: [PHP] Re: php + lynx + grep

2004-04-08 Thread Burhan Khalid
[ snippity snip snip ]

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


Re: [PHP] Re: php + lynx + grep

2004-04-07 Thread Michal Migurski
>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/cahttp://mike.teczno.com/contact.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php + lynx + grep

2004-04-07 Thread Catalin Trifu
Hi,

I had same problem myself once.
Try adding the apache user to sudoers in /etc/sudoers if not
already there

Cheers,
Catalin


"Brian L. Ollom" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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.
>
> It's output should be something like this(it changes hourly):
> KTOL 031452Z 28013KT
>   10SM CLR 10/01 A2977 RMK AO2 SLP086 T0106 58015
>
> Help!
>
> 
> | Brian Ollom  |   |
> | NiteHawke.Com|  http://www.nitehawke.com/|
> | An Authorized Firefly Dealer |  email  [EMAIL PROTECTED]  |
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php + lynx + grep

2004-04-06 Thread Brian L. Ollom
> 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.
>
> It's output should be something like this(it changes hourly):
> KTOL 031452Z 28013KT
>   10SM CLR 10/01 A2977 RMK AO2 SLP086 T0106 58015

It works fine on the command line, but won't show any info on
the site.


| Brian Ollom  |   |
| NiteHawke.Com|  http://www.nitehawke.com/|
| An Authorized Firefly Dealer |  email  [EMAIL PROTECTED]  |


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php