php-windows Digest 23 May 2004 09:28:55 -0000 Issue 2258
Topics (messages 23797 through 23811):
Prevent error output from shell_exec
23797 by: Paul J. Smith
23798 by: Jeroen Serpieters
23799 by: Paul J. Smith
23800 by: Jeroen Serpieters
23801 by: Jeroen Serpieters
23804 by: Svensson, B.A.T. (HKG)
23805 by: Svensson, B.A.T. (HKG)
23806 by: Paul J. Smith
23807 by: Paul J. Smith
23808 by: Svensson, B.A.T. (HKG)
23809 by: Paul J. Smith
PageRank
23802 by: Peter Rinab
23810 by: Manuel Lemos
Re: How do you filter out certain IP values?
23803 by: Svensson, B.A.T. (HKG)
Can someone tell me how to set an image transparent?
23811 by: Daniel Anderson
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi,
I'm looking for a way to _silently_ execute system commands via php.
All the silent commands seem to dump the output to the page if an error
value is returned. I've tried >null and various other things to no
effect. Anyone know how to do this on a windows platform?
Thanks.
--- End Message ---
--- Begin Message ---
On Sat, 22 May 2004, Paul J. Smith wrote:
> I've tried >null and various other things to no
> effect. Anyone know how to do this on a windows platform?
>
Redirecting to NUL (not null) should do the trick.
--
Jeroen
Like the creators of sitcoms or junk food or package tours, Java's designers were
consciously designing
a product for people not as smart as them.
-- Paul Graham
--- End Message ---
--- Begin Message ---
Thanks. Spot the deliberate mistake ;)
Unfortunately, in my case, it doesn't work. I still get the PSEXEC
header, which is what I am trying to suppress.
Any other ideas?
-----Original Message-----
From: Jeroen Serpieters [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 19:05
To: Paul J. Smith
Subject: Re: [PHP-WIN] Prevent error output from shell_exec
On Sat, 22 May 2004, Paul J. Smith wrote:
> I've tried >null and various other things to no
> effect. Anyone know how to do this on a windows platform?
>
Redirecting to NUL (not null) should do the trick.
--- End Message ---
--- Begin Message ---
On Sat, 22 May 2004, Paul J. Smith wrote:
>
> Any other ideas?
>
If you just want to prevent the error showing up in the output of yout php
script you could use output buffering.
e.g.:
ob_start(); // start buffering
system(....); // execute your stuff
ob_end_clean(); // silently discard the output
--
Jeroen
Mostly, when you see programmers, they aren't doing anything.
One of the attractive things about programmers is that you cannot tell whether or not
they are working simply by looking at them.
Very often they're sitting there seemingly drinking coffee and gossiping, or just
staring into space.
What the programmer is trying to do is get a handle on all the individual and
unrelated ideas that are scampering around in his head.
-- Charles M Strauss
--- End Message ---
--- Begin Message ---
On Sat, 22 May 2004, Jeroen Serpieters wrote:
>
> e.g.:
>
> ob_start(); // start buffering
>
> system(....); // execute your stuff
>
> ob_end_clean(); // silently discard the output
>
If you want to log the output you could grab the buffered output with
ob_get_contents(), save it somewhere and then do ob_clean()
--
Jeroen
Describing the difference between computer hardware and software:
"Those parts of the system that you can hit with a hammer (not advised) are called
hardware;
those program instructions that you can only curse at are called software."
-- From Levitating Trains and Kamikaze Genes
--- End Message ---
--- Begin Message ---
Have you tried this with popen()?
-----Original Message-----
From: Paul J. Smith
To: Jeroen Serpieters
Cc: [EMAIL PROTECTED]
Sent: 22-5-2004 20:10
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Thanks. Spot the deliberate mistake ;)
Unfortunately, in my case, it doesn't work. I still get the PSEXEC
header, which is what I am trying to suppress.
Any other ideas?
-----Original Message-----
From: Jeroen Serpieters [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 19:05
To: Paul J. Smith
Subject: Re: [PHP-WIN] Prevent error output from shell_exec
On Sat, 22 May 2004, Paul J. Smith wrote:
> I've tried >null and various other things to no
> effect. Anyone know how to do this on a windows platform?
>
Redirecting to NUL (not null) should do the trick.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Or maybe you just want to do:
@shell_exec(...)
?
-----Original Message-----
From: Svensson, B.A.T. (HKG)
To: '[EMAIL PROTECTED] '
Sent: 22-5-2004 23:36
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Have you tried this with popen()?
-----Original Message-----
From: Paul J. Smith
To: Jeroen Serpieters
Cc: [EMAIL PROTECTED]
Sent: 22-5-2004 20:10
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Thanks. Spot the deliberate mistake ;)
Unfortunately, in my case, it doesn't work. I still get the PSEXEC
header, which is what I am trying to suppress.
Any other ideas?
-----Original Message-----
From: Jeroen Serpieters [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 19:05
To: Paul J. Smith
Subject: Re: [PHP-WIN] Prevent error output from shell_exec
On Sat, 22 May 2004, Paul J. Smith wrote:
> I've tried >null and various other things to no
> effect. Anyone know how to do this on a windows platform?
>
Redirecting to NUL (not null) should do the trick.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thanks. Tried that, but it still outputs the error.
I tried shell_exec and system. Same result :(
-----Original Message-----
From: Jeroen Serpieters [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 19:13
To: Paul J. Smith
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
On Sat, 22 May 2004, Paul J. Smith wrote:
>
> Any other ideas?
>
If you just want to prevent the error showing up in the output of yout
php
script you could use output buffering.
e.g.:
ob_start(); // start buffering
system(....); // execute your stuff
ob_end_clean(); // silently discard the output
--
Jeroen
Mostly, when you see programmers, they aren't doing anything.
One of the attractive things about programmers is that you cannot tell
whether or not they are working simply by looking at them.
Very often they're sitting there seemingly drinking coffee and
gossiping, or just staring into space.
What the programmer is trying to do is get a handle on all the
individual and unrelated ideas that are scampering around in his head.
-- Charles M Strauss
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I tried popen, but it doesn't run the program. I'm not sure popen works
on win platforms?
-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 22:36
To: '[EMAIL PROTECTED] '
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Have you tried this with popen()?
-----Original Message-----
From: Paul J. Smith
To: Jeroen Serpieters
Cc: [EMAIL PROTECTED]
Sent: 22-5-2004 20:10
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Thanks. Spot the deliberate mistake ;)
Unfortunately, in my case, it doesn't work. I still get the PSEXEC
header, which is what I am trying to suppress.
Any other ideas?
--- End Message ---
--- Begin Message ---
I can guarante you that popen() does work - I use it myself on a win2003
server. Since you can use shell_exec() I assume this has nothing to do with
safe_mode being switched on.
How do you call popen() ands what kind of dos program are you calling?
-----Original Message-----
From: Paul J. Smith
To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
Sent: 22-5-2004 23:47
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
I tried popen, but it doesn't run the program. I'm not sure popen works
on win platforms?
-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 22:36
To: '[EMAIL PROTECTED] '
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Have you tried this with popen()?
-----Original Message-----
From: Paul J. Smith
To: Jeroen Serpieters
Cc: [EMAIL PROTECTED]
Sent: 22-5-2004 20:10
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Thanks. Spot the deliberate mistake ;)
Unfortunately, in my case, it doesn't work. I still get the PSEXEC
header, which is what I am trying to suppress.
Any other ideas?
--- End Message ---
--- Begin Message ---
I'm calling ps_exec.
$handle = popen($cmd);
$read = fread($handle, 2096);
echo $read;
pclose($handle);
Does nothing whereas system($cmd) or shel_exec($cmd) works fine, apart
from the output. $read outputs nothing when I tested it. When calling
popen, can you pass program parameters such as "dir *.tmp /p" ? Maybe
this is why it's not working. The $cmd I call has rather a lot of
command line parameters to go with it.
-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: 22 May 2004 22:59
To: '[EMAIL PROTECTED] '
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
I can guarante you that popen() does work - I use it myself on a win2003
server. Since you can use shell_exec() I assume this has nothing to do
with
safe_mode being switched on.
How do you call popen() ands what kind of dos program are you calling?
-----Original Message-----
From: Paul J. Smith
--- End Message ---
--- Begin Message ---
Hi,
anybody there who knows a source to evaluate the google PageRank?
I know a couple of web pages to get the page rank online but this doesn't help.
Looking for a source.
Thanks, Peter
--- End Message ---
--- Begin Message ---
Hello,
On 05/22/2004 05:29 PM, Peter Rinab wrote:
anybody there who knows a source to evaluate the google PageRank?
I know a couple of web pages to get the page rank online but this doesn't help. Looking for a source.
The only way to get the page rank of any page is by using Google Toolbar.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Filter from what? Accessing the page?
-----Original Message-----
From: Daniel Anderson
To: PHP Mailing List
Sent: 22-5-2004 18:05
Subject: [PHP-WIN] How do you filter out certain IP values?
Hi, can anyone tell me how to filter out some IP values?
For example: 80.2.*.30
Many thanks,
Dan
--- End Message ---
--- Begin Message ---
Hi can someone please tell me how to make the colour attribute of an image transparent.
The PHP Documentation is all well and good, but not one person on it is talking sense.
http://www.php.net/manual/en/function.imagecolortransparent.php
Thanks,
Dan
--- End Message ---