Questions tagged [passthru]

PHP Function to execute an external program and display raw output.

void passthru ( string $command [, int &$return_var ] )

The passthru() function is similar to the function in that it executes a command. This function should be used in place of or when the output from the Unix command is binary data which needs to be passed directly back to the browser.

92 questions
0
votes
1 answer

Why no Authorization Header received in SSO?

I implement a SSO with NTLM and passthru, and it works if our client had joined into domain. As in our code we will check if there is a "Authorization header" in the request header. And the problem is: If our client joined domain, then in our…
MemoryLeak
  • 7,322
  • 23
  • 90
  • 133
0
votes
1 answer

Send Variables from ajax results to php with a passthru

I have a PHP file where when checked boxes are checked and a button is clicked a js file is called that has the following code $.ajax ({ type: "POST", url: "decisionExec.php", dataType: "json", …
0
votes
2 answers

can't get an answer from passthru

This is a simple php code And the node.js script just…
nova
  • 313
  • 6
  • 19
0
votes
1 answer

Execute a php file from a php function

I'm stuck in a very big problem. Inside my website I call this function, for execute this file called "sched.php" function write() passthru('php /var/www/html/sched.php',$err); return $err; } But nothing is done. It's my output:
Phil
  • 11
  • 1
  • 5
0
votes
1 answer

PHP shell_exec / passthru showing output different from actual shell output

I am trying to display the output of a shell command using PHP's passthru function. I am getting an extra [0;32m where the actual shell output has a green line and am also getting an extra [m at the beginning of few other lines. What do I need to do…
Bengali
  • 198
  • 2
  • 13
0
votes
1 answer

Realtime output in CakePHP

I'd like to print the output of a program in php in "real time" (buffers are not important). The process takes a long time and having the (partial) data earlier would be very helpful. Usually I'd use plain passthru() but this is done in CakePHP and…
David Ventura
  • 418
  • 2
  • 7
  • 20
0
votes
1 answer

PHP exec whit nohup works on commandline but not on http calls

I've have this script who run another one in the background, without waiting to it to finish. My script.php: $cmd = "nohup php script2.php > /dev/null 2>&1 &"; exec($cmd); My script2.php: sleep(10); mail("me@mail.com","test","ok"); If I run it in…
Gorka
  • 43
  • 7
0
votes
0 answers

Confusion with PHP header for Content Disposition

I have a basic question and may sound silly. Is it mandatory to mention the file extension in php header() function? For example, header('Content-Type:application/pdf'); header('Content-Disposition:attachment; filename:"testfile.pdf"'); The code…
Sriram
  • 55
  • 1
  • 9
0
votes
1 answer

Making dynamic text item transparent for mouse

I'm working with actionscript 3 and have a trouble. I need to write player where users will see text on the front of the movie. The text is text field of type "Dynamic text". The problem is that I need to make this text object transparent for mouse…
rshmelev
  • 588
  • 4
  • 12
0
votes
1 answer

Passthrough indentification in wcf

How do I pass the identity of the logged on user in an a webapplication to a service beeing called by the webserver? My idea her is to set som kind of EndpointIdentity on the cahnnel. In my case this will be an GUID identifing the user's session on…
PEtter
  • 806
  • 9
  • 22
0
votes
1 answer

Getting response from unix commands executed via PHP

I would like to list the Cron tasks for a given user in the browser. I am using the following, which works fine via SSH: crontab -u username -l Which outputs something like: */2 * * * * cd /home/username/public_html/cron; php -q -c ./…
I wrestled a bear once.
  • 22,983
  • 19
  • 69
  • 116
0
votes
2 answers

How can I syntax highlight the output from the exec() function in PHP?

I'm fetching output from the exec() function and I would like to have some syntax highlighting in the results. Raw output Current output is raw: * [35mmanu[m/etc/init.d/mast: line 105: /var/log/mast/mast-all.log: Permission denied Text such as…
Édouard Lopez
  • 40,270
  • 28
  • 126
  • 178
0
votes
2 answers

How to use local DB table in a pass-through query?

I am currently working on a query in Access 2010 and I am trying to get the below query to work. I have the connection string between my local DB and the server that I am passing through to working just fine. Select column1 , column2 from…
tarheel
  • 4,727
  • 9
  • 39
  • 52
0
votes
1 answer

Calling Matlab exec with argument(s) from PHP doesn't work

My first time to deploy matlab exec in php and i need ur help. I have a matlab script compiled as sampleExe.exe (standalone app) with a single argument 'IdNo' to processes images. When i call it thru command line using sampleExe 2014000, the program…
Joy
  • 75
  • 1
  • 7
0
votes
0 answers

Show java output in browser in real time

I want to call a java class file from PHP, and display the text output (indicating progress) in real time to the user's browser. The passthru(), echo() and system() PHP functions won't work, and a php/java bridge seems like overkill. The code below…
user3349492
  • 23
  • 1
  • 4