Re: Checking Server Status with PHP
From: Andrew _at_ Rockface (_at_)
Date: 01/30/05
- Next message: Andrew _at_ Rockface: "Re: Dynamic Pages"
- Previous message: Janwillem Borleffs: "Re: using php to process xml/xsl problem"
- In reply to: David Quinton: "Re: Checking Server Status with PHP"
- Next in thread: David Quinton: "Re: Checking Server Status with PHP"
- Reply: David Quinton: "Re: Checking Server Status with PHP"
- Reply: David Quinton: "Re: Checking Server Status with PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Jan 2005 13:25:30 +0000 (UTC)
David Quinton wrote:
> On Sat, 29 Jan 2005 09:48:58 +0000 (UTC), "Andrew @ Rockface"
> <andrew@rockface-records.co.uk> wrote:
>
>> exec() only returns the last line of output from the shell command,
>> whilst backticks (graves) return all output from the shell command.
>
> Hope you don't mind this "thread hijack", but it is related...
>
> We have a PHP page which exec()s lynx to read a local html file and
> write it out as text.
>
> This worked fine until a few days ago, now it only writes zero length
> text files. Same happens if I use system() instead of exec().
>
> If I run the command from shell, as the web user (the same user that
> PHP/Apache is running under), it writes the text file correctly.
>
> Other PHP scripts which use exec() to write files, but which don't run
> Lynx, write out perfectly.
>
> What could I have done? Or maybe some upgrade our hosting company has
> carried out? Any clues?
A bit strange. Sounds like permissions except that it does write the file
(just zero bytes) and you can do it from shell as the correct user. Try
doing a phpinfo() to check your php config. Like you say, it looks like your
host changed something.
- Next message: Andrew _at_ Rockface: "Re: Dynamic Pages"
- Previous message: Janwillem Borleffs: "Re: using php to process xml/xsl problem"
- In reply to: David Quinton: "Re: Checking Server Status with PHP"
- Next in thread: David Quinton: "Re: Checking Server Status with PHP"
- Reply: David Quinton: "Re: Checking Server Status with PHP"
- Reply: David Quinton: "Re: Checking Server Status with PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|