Hi all,
I have a problem with PHP passthru() blocking when it is supposed to start a
daemon and return.
I have a Node.js daemon with a bash script wrapper around it. Users can call
this bash script directly, but it is also used by our deployment system. Our
deployment system uses Phing
On Mon, August 6, 2007 4:14 am, Payne wrote:
Does anyone know way to passthru man pages so they don't show the
ascii
formating?
The man command itself has a man page which describes how to format
the output to your liking, with or without all kinds of formatting.
man man
--
Some people have
Hi,
Does anyone know way to passthru man pages so they don't show the ascii
formating?
Payne
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Does anyone know way to passthru man pages so they don't show the ascii
formating?
You could:
1) Replace all newlines (ASCII 10) with a br tag. htmlspecialchars()
will do this for you.
2) Use a pre tag within which newlines are preserved
3) Use preg_replace to replace non-printable
Richard Heyes wrote:
Does anyone know way to passthru man pages so they don't show the
ascii formating?
You could:
1) Replace all newlines (ASCII 10) with a br tag. htmlspecialchars()
will do this for you.
2) Use a pre tag within which newlines are preserved
3) Use preg_replace to replace
Why don't you just use the man2html script?
2007. 08. 6, hétfő keltezéssel 05.14-kor Payne ezt írta:
Hi,
Does anyone know way to passthru man pages so they don't show the ascii
formating?
Payne
On Fri, June 17, 2005 6:47 am, Jason Barnett said:
What is a reliable cross-platform way of showing which user PHP is
running as?
http://php.net/get_current_user
The bogus User Contributed note about REMOTE_USER is, well, bogus, almost
for sure.
If that fails, I guess you could try:
?php
What is a reliable cross-platform way of showing which user PHP is
running as?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, June 16, 2005 11:44 am, Chris Herold said:
Thanks for the tips; however, I think I am still missing something.
My perl script is running when called by passthru() because within the
body of the simple test code I have set it up to:
code
print Content-type: text/html\n\n;
print
I dunno what 127 actually means, but the last time we saw it on this list,
it boiled down to:
You can't even run your 'sh' shell, much less Perl in that shell.
Check what's in /bin/sh and what its permissions are.
Make sure it's actually a valid shell binary, and not something bogus.
If that's
Hi,
I have been told that in order to pass variables via passthru() to
another script (in my case, a perl script) one can do the following ...
passthru(home/test.cgi $var)
and that $var will then be passed through to the cgi.
I have tried this and failed.
Is this the proper format or is
On Wed, June 15, 2005 5:36 pm, Chris Herold said:
I have been told that in order to pass variables via passthru() to
another script (in my case, a perl script) one can do the following ...
passthru(home/test.cgi $var)
and that $var will then be passed through to the cgi.
I have tried this
hi list-
(B
(BI am trying to display a SWF file fullscreen, but having problems with IE.
(B
(BThis is a SWF file that is sitting on the disc, and i want to do a simple
(Bpassthru; works fine in opera, firefox, but not IE. Found some notes on
(Bthis issue, realted to downloads, but not
Hi all,
I am trying to use htmldoc with passthru function :
passthru(htmldoc -t html --quiet --jpeg --webpage --footer --bottom
0.2cm --left 1.78cm --right 1cm --top 0.2cm '' $options $filename);
where $filename is urls, it works fine but not with GET pamameters :
if $filename is like
put quotes around:
passthru(htmldoc -t html --quiet --jpeg --webpage --footer --bottom
0.2cm --left 1.78cm --right 1cm --top 0.2cm '' $options '$filename');
Guillouet Nicolas wrote:
Hi all,
I am trying to use htmldoc with passthru function :
passthru(htmldoc -t html --quiet --jpeg --webpage
I'm having problems getting the following passthru statement to work. It
works fine with the just the grep command.
Help
?php
echo pre\n;
passthru('/usr/bin/grep c=2048 c=32 c=2 /var/log/messages |
/usr/bin/awk {print $1 $3 $5} ');
?
On Friday 16 January 2004 06:06, Carlton L. Whitmore wrote:
I'm having problems getting the following passthru statement to work. It
works fine with the just the grep command.
Help
?php
echo pre\n;
passthru('/usr/bin/grep c=2048 c=32 c=2 /var/log/messages |
/usr/bin/awk {print $1 $3
On Thu, 2004-01-15 at 17:06, Carlton L. Whitmore wrote:
I'm having problems getting the following passthru statement to work. It
works fine with the just the grep command.
Help
?php
echo pre\n;
passthru('/usr/bin/grep c=2048 c=32 c=2 /var/log/messages |
/usr/bin/awk {print $1 $3
Then there must be some kind of restriction on the server, Is it running
in
chrooot enviroment. Try copying ls to a directory in the server root and
try
again.
--
regards,
Tom
I've tried that too, with ls and other programs in the local directory where
the
script was located. And with
On Friday 21 November 2003 08:53, Jesper Hansen wrote:
I'm trying to run a super simple command through passthru.
Here's my test.php file:
htmlbody
? passthru('ls -l'); ?
/body/html
It works if run directly with php test.php.
When this is run from the browser, there is no output, and
Tom Rogers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
You probably have to put the full path to ls
? passthru('/bin/ls -l'); ?
--
regards,
Tom
No, I've tried that along with all other obvious path stuff.
/Jesper
--
PHP General Mailing List (http://www.php.net/)
To
Hi,
Saturday, November 22, 2003, 1:23:36 AM, you wrote:
JH Tom Rogers [EMAIL PROTECTED] wrote in message
JH news:[EMAIL PROTECTED]
JH No, I've tried that along with all other obvious path stuff.
JH /Jesper
Then there must be some kind of restriction on the server, Is it running in
chrooot
I'm trying to run a super simple command through passthru.
Here's my test.php file:
htmlbody
? passthru('ls -l'); ?
/body/html
It works if run directly with php test.php.
When this is run from the browser, there is no output, and the
following error is logged in /var/log/httpd/error_log :
sh:
Hi,
Friday, November 21, 2003, 10:53:08 AM, you wrote:
JH I'm trying to run a super simple command through passthru.
JH Here's my test.php file:
JH htmlbody
JH ? passthru('ls -l'); ?
JH /body/html
JH It works if run directly with php test.php.
JH When this is run from the browser, there is no
Anyone come across something like this before?
I have made a little test script as follows:
?
header (Content-Type: application/pdf);
$command_line = /usr/bin/pdflabelseries .
escapeshellcmd($_POST['labelstart']) . .
I'm trying to get the output of a shell command with PHP
This is the command I'm Trying to execute, I also tried using system instead
of passthru
?php
passthru(ftpwho -v, $return_var);
echo $return_var;
?
Both cases passthru and system Outputed 2 but should have
On Wednesday 02 July 2003 22:04, david wrote:
I'm trying to get the output of a shell command with PHP
This is the command I'm Trying to execute, I also tried using system
instead of passthru
?php
passthru(ftpwho -v, $return_var);
echo $return_var;
?
passthru (et
What could that mean errno 11 when I try to run a small program with four
parameters. From a shell prompt it works. What does it mean errno 11?
--
René
www.comunica2.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I've ran into a problem using the passthru/exec commands with RH8. When
I try and run my program (or even pwd, ls, etc) the number '127' is
returned every_time. With passthru, the size of the optional return
array is 0. Can anyone fathom a guess at the problem? Is the 127 value
signifcant?
I've written a little script for VoiceXML applications to generate a WAV
from an MP3 on demand:
#file wavwrapper.php
?
header('Content-Type: audio/wav');
$filename = $_GET['filename'];
$mp3dir=/var/www/mp3s/;
$playercmd=/usr/local/bin/mpg123 -m -w - -q -4 --8bit;
passthru($playercmd
I'm SURE you've got a good reason, but why are you wanting to generate a WAV
on demand? The loss in file quality occurs going from WAV MP3, so then
later going back to WAV would only result in a bigger file size, with ZERO
benefit in audio quality.
Just asking :)
Justin
on 26/10/02 4:53 PM,
I have a PHP script that computes the URLs to files that i need to
download. Is it possible to put passthru() with wget in a while loop and
donwload multiple files at one time ? Or does passthru() complete the shell
command and then proceed.
Any other suggestions ?
thx in advance
gamin.
how does one pass arguements to PassThru()
ie would the following work
PassThru(/home/bleh/bleh.cgi bleh.txt);
and if that does work PassThru() sends its output back to the page yes?
Greetings,
I am having a small problem displaying PDF files to my users via passthru.
This is the situation: I have a bunch of PDF files on my server directory.
I show the user a listing of the PDF files they can view, and allow them to
hyperlink click on the PDF they wish to browse. When the
PROTECTED]]
Sent: Thursday, April 12, 2001 12:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] passthru Problems
Greetings,
I am having a small problem displaying PDF files to my users via passthru.
This is the situation: I have a bunch of PDF files on my server directory.
I show the user a listing of the
Greets,
Just to elaborate: I want my user to be able to click on a hyperlink that
points to my PDF file, and have a new window pop up, displaying the contents
of the PDF file in the browser window (without prompting if they should save
the file) as well as set the HTML TITLE tag to the name of
You need to use a frameset to do what you want.
the problem is the browser will only launch the Acrobat control if it
receives the content type app/pdf, an html page uses the content type
text/html.
your links should point to another page that outputs something like the
following based on
/html/blah), and I
can do it as the same user that apache runs as ('apache').
BUT, when I try:
?php passthru("someProgram arg1 arg2 arg3"); ?
it fails. I get no output at all. I can check that everything else is ok
by doing something like
?php passthru("someProgram arg1 arg2 a
Just guessing here. On our setup, PHP runs as nobody. Is there a permissions
problem around "someProgram"?
Kirk
-Original Message-
From: Michael Dickson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 1:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP
I can do this from anywhere on the server (for example, from the
same directory where my php scripts are located, /var/www/html/blah), and
I
can do it as the same user that apache runs as ('apache').
BUT, when I try:
?php passthru("someProgram arg1 arg2 arg3"); ?
it fails. I get
Hi all,
Having a weird problem running the passthru() function on quite an old
version of PHP3 (3.0.7).
Pasted below is the php source code:
===
HTML
HEAD
TITLETape Status Check/TITLE
/HEAD
BODY
if this page is blank - that is good!
?
passthru ('/usr/bin/mt
OK, I finally found it. Someone else here recommended setenv -- it's
actually putenv. putenv was *not* found through any search I could make on
the PHP Web site involving the word environment and so on, I found it
through Google. And it's apparently documented under "PHP Options and
Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
-Original Message-
From: Rich Puchalsky [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2001 05:52
To: [EMAIL PROTECTED]
Subject: [PHP] passthru environment
I'm trying to use passthru in a PHP program to have an external program
display some data. The problem is that I was trying to have the external
program's environment pick up the form field variables automatically
passed
into the PHP program as shell environment variables.
In other words,
"Richard Lynch" [EMAIL PROTECTED] wrote:
http://php.net/setenv
Thanks! But when I try this link, or the "Quick Ref" button on the PHP home
page, I can't find anything about setenv. And the manual doesn't have
anything about it under Program Execution Functions. Is it undocumented?
--
"Rich Puchalsky" [EMAIL PROTECTED] wrote in message
966dad$pkm$[EMAIL PROTECTED]">news:966dad$pkm$[EMAIL PROTECTED]...
"Richard Lynch" [EMAIL PROTECTED] wrote:
http://php.net/setenv
Thanks! But when I try this link, or the "Quick Ref" button on the PHP
home
page, I can't find anything
I'm trying to use passthru in a PHP program to have an external program
display some data. The problem is that I was trying to have the external
program's environment pick up the form field variables automatically passed
into the PHP program as shell environment variables.
In other words, if a
47 matches
Mail list logo