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
2 answers

mysqldump passthru returncode's

I am trying to do a mysql dump via php. This is the code $backupFile = $table. "-". date("Y-m-d-H:i:s") . '.gz'; //Command nog aanpassen.... $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; …
sanders
  • 10,794
  • 27
  • 85
  • 127
0
votes
0 answers

Powershell: start multiple processes and put them in a list and observe them

i want to create some Powershellscript where i can add a uncertain number of processes to a list. After that i want to observe, if the processes are finished. so i created this: $procs = New-Object -TypeName 'System.Collections.ArrayList'; $procs…
0
votes
0 answers

Is it possible to launch passthru on XAMPP?

When I launch passthru -> exe on XAMPP, it doesn't give errors (PHP). Can I fork exe on XAMPP? But the file doesn't…
0
votes
0 answers

PHP passthru with proper child process closing

I am currently using the code below to try and restream a hls live stream via php the reason for this is php is all i have access to on the system i am using i can not use or install anything else and i like to watch my home tv in my current…
0
votes
1 answer

Determine how long a system(), pasthrus(), exec(), operation is taking in php

Want to know how to determine how long a call to system(), passthru(), exec() (either of these) takes. For example. I use system() to call an external program, I would like to time how long it takes so that if it's taking too long I can kill it or…
si-mikey
  • 183
  • 3
  • 10
0
votes
2 answers

Postgresql with IBM App Connect Enterprise

I am trying to use IBM APP Connect Enterprise to connect to a Postgresql Datasource and execute Database complex queries (Complex SELECT, INSERT, UPDATE Statements) All I can find is the loopback node which is using limited (select, insert and…
0
votes
0 answers

PHP passthru with pdftk not supporting unicode characters

I am trying to fill a pdf template with Chinese and Japanese Language. TCPDF is the library used and for filling data to pdf used forge_fdf. Following is the code used passthru("pdftk $abs_pdf_path fill_form $fdf_fn output $certFileName owner_pw…
0
votes
1 answer

Unable to execute ttf2afm from php

I am working on a project that involves PDF API TCPDF. So I needed an area in admin where site admin can upload and install new fonts to be used with TCPDF. I am working on a script that does following : 1) upload TTF font to TCPDF fonts/utils/…
Ravish
  • 2,383
  • 4
  • 37
  • 55
0
votes
1 answer

Hex string passed to php script in $_REQUEST array isn't being interpreted?

Here's a really simple example: $val = ""; if(array_key_exists("param", $_REQUEST)) { $val = $_REQUEST["param"]; } print "echo \"$val\""; passthru("echo \"$val\""); I'm expecting the passthru() to print A if I pass test.php?param=\x41.…
0
votes
3 answers

Problem with passthru on server

I have a problem trying to run passthru function in my php code (Joomla module). the code is following (this is only a snippet) ob_start(); passthru("/usr/bin/whois 85.70.231.130 | /usr/bin/grep 'address:'",$code); $whoisData =…
simekadam
  • 7,334
  • 11
  • 56
  • 79
0
votes
0 answers

Using passthru() to download file results in broken/modified file

I have an PHP Yii2 webapplication, which runs an command line script using passthru(). The passthru() result should passed into an downloaded file, so that the user can download the output of passthru(). Example: If I execute the following command…
The Bndr
  • 13,204
  • 16
  • 68
  • 107
0
votes
1 answer

PHP executing commands on software console

I have executed the twinkle-console by using shell_exec and it works perfectly unknown@mrunknown-HP-650:~$ twinkle-console Twinkle 1.10.1, October 7, 2016 Copyright (C) 2005-2015 Michel de Boer and contributors Users: * profile profile1…
Ely
  • 13
  • 6
0
votes
2 answers

passing json string from php to python

I am trying to call a python script within a php script. However, I cannot seem to figure out how to pass an input through to the python script. The code I am using is as follows: $input = '[{"item": "item1"}, {"item": "item2"}, {"item":…
Christian
  • 991
  • 2
  • 13
  • 25
0
votes
1 answer

Acces passthrough query for large sql table

I have a large table in a mysql database (6 million records). If I link the table, I can open it just fine--it seems like access requests the records as needed. However, if I use a passthrough query, it seems like access requests the entire table…
Nathan
  • 1,241
  • 3
  • 12
  • 17
0
votes
1 answer

Mailx passthru() with included variable

Having some troubles getting this to work, so I thought I'd ask you folks. I'm just trying to have a user simply enter their email in an input field, then shoot them an email with a confirmation number. The email sends, but cannot get the…
Greg Miller
  • 1,064
  • 13
  • 22