Exec, Shell_exec, System, And Passthru Not Working At All
Can't get these commands to work! The following page simply doesn't
finish loading ( Waiting... Opening... :-( )
<?php echo system("dir"); ?>
The same for <?php echo exec("dir"); ?> or <?php echo
shell_exec("dir"); ?>, etc...
I'm running Apache 2.0.55 & PHP 5.0.5 with Zend Optimizer v2.5.10 on
windows XP SP2.
View Complete Forum Thread with Replies
Related Forum Messages:
- Using Passthru(), Exec(), System() Etc.
- Exec(), System(), Shell_exec(), Etc + Nmap
- System(), Exec(), Shell_exec(), But "Permission Denied"
- System/exec Not Working In Browser
- Passthru & Exec
- Passthru() Or Exec()
- Cannot Get Exec() Or Passthru() To Work?
- Why I Can Use Exec() And Passthru() To Execute Lynx
- Exec, Passthru Disabled So How To Call C++ .exe File?
- Exec Or Shell_exec
- Exec()-shell_exec
- Exec And Shell_exec
- Problem: Exec() And Shell_exec()
- Exec Or Shell_exec For Dumping MySql Info?
- Exec And Shell_exec Not Executing Batch File Properly
- Passthru & System Has Beed Disabled !
- Format Result Text Using Passthru Of System
- Shell_exec - Cd Is Not Working
- Shell_exec Not Working On Win2K3
- Shell_exec Using System Tools - Wait For Process To Finish
- System(); Command Not Working On Remote System. Windows.
- PHP System() And Exec()
- System() And Exec()
- Exec(), System()
- Bug In System And Exec Commands
- System() Or Exec() And Permissions
- Exec() And System() Problems
- System/shell/exec/etc
- Exec(), System() And Win 2003
- Use Exec() In PHP 5.2 On A Windows XP Pro System
- Exec Is Not Working Right
- Problem Using System/exec Function.
- Using System/exec, How To Backup Database?
- Command Window - Exec/system
- Php Exec() Function Is Not Working
- Exec Stopped Working?
- Exec And System Commands Blocked By Host
- Alternates To System() And Exec() In Order To Use ImageMagik?
- Exec - Create An Executable That Return The System Drives
- Exec(curl --proxy ....) Or Passthru(curl --proxy....)
- Running An .exe File Using Exec() Or System(), Unable To Fork Error
- PHP Functions Not Working In My System
- System() Function Is Not Working In Windows
- Can't Get Phpinfo Working On My Linux System
- System(); Not Working Within A Made Function
- Working On A Username Validating System
- Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
- Passthru()
- Passthru
- Help With Passthru And Wmic...
- Variables In Passthru
- Passthru Output
Exec(), System(), Shell_exec(), Etc + Nmap
i'm trying to create a script that executes nmap from my server, then displays the output. i've tried: $output = passthru('nmap -v -A'.' $ip'); $output = shell_exec('nmap -v -A'.' $ip'); system('nmap -v -A'.' $ip'); the problem i'm having is that using the above methods i only get the first line of output, ie. Starting Nmap 4.20 ( http://insecure.org ) at 2007-08-31 21:46 CST and nothing else. i've managed to find a way around it by sending the nmap output to a textfile, the using file_get_contents() to pull the data back in: exec('nmap -v -A '.$ip.' > /usr/local/www/apache22/data/nmap/'.$ip.'.html'); $file = "/usr/local/www/apache22/data/nmap/$ip.html"; $result = file_get_contents($file); echo "(pre)$result(/pre)"; that works perfectly, but i'd rather not be writing anything to the drive. i guess the problem might be that nmap takes about 5-10 seconds to do its scan, and for some reason php doesn't want to wait that long, i really have no idea. can it be made to work without needing to write to files? and for the curious minds, i'm not doing anything dodgy, i just wanted an online tool i could access from any computer to test networks i support .
View Replies !
System/exec Not Working In Browser
In two files, and I serve foo.php then I notice If I use commandline execution i.e. php foo.php then foo.txt is touched/created all right. i.e. system command is executed as expectedBut If I use browser then I notice that the shell command in config.php is *not* executedAny ideas as to why this might be happening? Code:
View Replies !
Passthru & Exec
I have a script which uses passthru to execute a shell script. This shell script then (at some point in its running) executes a php script. When executing the shell script from the command line everything works fine. When using passthru, however, I get the following error when it gets to the point where it tries to execute the 2nd php script: Code: Status: 404 X-Powered-By: PHP/4.4.2 Content-type: text/html No input file specified. 255 I'm hosted on Dreamhost with php 4.4.2.
View Replies !
Passthru() Or Exec()
I am trying to make a website where I can restart an application. I can make it terminate the app but it hangs when trying to restart it. the website calls the function this way: ##################### PHP ##################### <?php if (isset($_POST["kill_server"])){   kill_server();   echo "<img src=./images/ok.gif> El server esta siendo apagado. Por favor espere 1 minuto!"; } elseif (isset($_POST["init_server"])){   init_server();   echo "<img src=./images/ok.gif> El server esta siendo iniciado. Por favor espere 3 minutos!"; } ?>.
View Replies !
Cannot Get Exec() Or Passthru() To Work?
I cannnot seem to get exec() or passthru() to execute a perl script; here's the code snippet: if ($debug) { echo "username1 = ".$username1."<br>"; echo "dbname = ".$dbname."<br>"; echo "SESSION[dbname] = ".$_SESSION['dbname']."<br>"; echo "Output file = ".$outputfile."<br>"; echo "Project name = ".$projectname."<br>"; echo "Study name = ".$studyname."<br>"; echo "The command to be run is: ".$cmd."<br>"; } // Run the command! exec($cmd,$myoutput,$rtnvar); echo "rtnvar = ".$rtnvar."<br>"; foreach ($myoutput as $line) { echo $line."<br>"; } Which produces the results: username1 = rick dbname = cgb_lab_data SESSION[dbname] = cgb_lab_data Output file = myoutput Project name = IBS11_1103 Study name = IBS 11 The command to be run is: perl /home/caseyr/projects/LIMSScripts/3100DataIO/mk3100plt.pl -n 'IBS 11' -b 1103 -o myoutput -p IBS11_1103 -i S rtnvar = 13 The command looks perfectly legit, and will run at the command line if I cut and paste it. I do not understand the return value of 13. I can get a simple perl script that takes no arguments to run ok; so I think this has something to do with the arguments. I've used escapeshellarg() to no avail. I've always tried the same with system() and the backtick operator --
View Replies !
Exec, Passthru Disabled So How To Call C++ .exe File?
I am at my wit's end trying to get information out of Streamline.net's support dept about my problem. They reply quickly enough, but seem to try and give out the least possible amount of info each time. The transcript so far is reproduced for your amusement below. To summarise: I've put up a Sudoku-solving program called Sudoku.exe. I want to call it in a php script to solve a puzzle and output the solution. It works fine with Apache/php on my own machine, but it seems Streamline.net disable exec, passthru etc. They eventually say, cryptically: ' CGI executables are supported, however this is very different from executing a program from within a PHP script'. So how would I call my Sudoko.exe file? The 'dialog': My last question seems to have been 'fixed' before being answered, so I'll have another go. I'm trying to call an .exe file on the server but get an 'unable to fork' error message. I have Apache/php installed locally and it works fine. Do you have to turn on 'cmd.exe' permissions or something? Try it yourself at: Warning: passthru(): Unable to fork [Sudoku.exe (argument...)] in (.php file...) It's the same with exec() as well. We do not support passthru or exec functions. So how would I call my Sudoku.exe program from a php script? I do not want 'scripting help', I just want to use some of the functions that you offer as a host and which I have paid for. As I have said what I am trying to do works perfectly on my machine, so it must be a question of something you have to enable your end. What do you mean you don't support passthru or exec? They are both standard php commands. . You asked "how would I call my Sudoku.exe program from a php script?" clearly this is asking us how you can use scripting? Certain functions are disabled in PHP for security reasons. Which functions are 'disabled in PHP for security reasons' ? You can find this out with the inbuilt php function phpinfo() Could you tell me where on the page that phpinfo() produces these functions are listed? For example, passthru() does not appear to be on the page. . search for "disable_functions" on that page. disable_functions lists 'no value'. So again, could you tell me where I can find the list of standard php functions which you have disabled? Please can you provide a link to your phpinfo file so we can investigate this further. We had previously checked this on a linux server, which showed the functions that have been disabled. We've passed this on to an engineer to investigate further. For your information the following are disabled: shell_exec,exec,system,passthru,popen Your knowledge base says: Q. Are CGI (Common Gateway Interface) executables supported? A. Yes these are supported on either the Windows and Linux servers But you are telling me that the only php functions which can call my executable are disabled. Will you clarify once and for all if I can call my exe file or not. I AM NOT ASKING FOR SCRIPTING HELP, I have books about that. I just want to know if I can do ON YOUR SERVER what you say I can do, and if not why not.
View Replies !
Exec Or Shell_exec
I am trying to us shell_exec and keep getting an error. I do have safe_mode = off also. Code: if ($publish == "yes") { $command = "e:scriptspublish.bat"; $result=shell_exec($command); } The publish.bat file does work and I have proper permissions set in windows, I set everyone full access. Oh, Windows server, IIS6.0, PHP. Error is as follows: Warning: shell_exec() [function.shell-exec]: Unable to execute 'e:scriptspublish.bat' in
View Replies !
Exec()-shell_exec
my server: apache2/php5 and win2k3. I'm able to use shell_exec or exec for dos command that doesn't require auth. I would like to exec certain dos command under "domainuser" "password" .So I'll be able to access remote computer etc... example: echo shell_exec(find /i "SomeDataImLookingFor" "RemoteWorkstationc$ ext.txt) if i use this command in a dosshell under my user session it will return data.Of course if i execute this with PHP on the server with the phpserver account it won't function. I have been looking for a while on google and forums but i can't find it ,i just need someone to point me to the right page/post/.
View Replies !
Exec And Shell_exec
I'm new to running exec commands on php. I've had ffmpeg installed on my server, at /usr/local/bin/ffmpeg (a cmd line video decoder). It's a linux server, running php5. From looking around the internet, I came up with this code to run it: Code:
View Replies !
Problem: Exec() And Shell_exec()
I've got the following problem: exec() and shell_exec(), etc. don't give anything back, just the error code 127 For example, the following script: <?php exec("cat ./test", $lines, $result); // or exec("./cat ./test", $lines, $result); echo "result = $result<br>"; echo "Lines<br> "; foreach ($lines as $k => $v) { echo "k=$k v=$v<br> "; } ?>
View Replies !
Exec Or Shell_exec For Dumping MySql Info?
I'm trying to figure out how to export info from a Mysql database, using PHP to manage the export, as phpMyAdmin manages to do. I'm guessing I need to run a shell script that looks like this: mysqldump -u username -ppassword database_name FILE.sql and I need to call this shell script using one of the functions on this page: Code:
View Replies !
Exec And Shell_exec Not Executing Batch File Properly
I am running Apache and PHP on windows XP. Latest versions of them all. I am trying to execute a simple .bat batch file that simply copies 4 files from one location to the batch files location. The php exec command runs like this: V:Corehtdocswp ransfer.bat Y:folder here the batch file is executed and the command following is thrown into the batch file to specify where the files that need to be copied are. The Y: directory is in windows considered to be a network drive, although it is really just a folder on the same machine, i did this because there are spaces in the folder names on its way to where I need the information copied from i.e. "Program Files" When I run this in the command prompt by entering this in manually it runs perfectly. However when running exec in the PHP script nothing happens; when I run shell_exec it gives me the output and it shows that every line in the batch file is executed however it does not actually copy anything. Looking into my apache error log I see that this is related: "The system cannot find the drive specified." Now what I am wondering is, how is it that I can run this script manually but apache tells me I cannot. My permissions are set to allow all and deny nothing since it is a machine well tucked into a safe place. Apache resides on the machine in C: eactorcore and it also setup a virtual drive as v:core. Trying both does not work.
View Replies !
Format Result Text Using Passthru Of System
I tried to use the Passthru and System function to resolve some whois information. echo passthru('whois 62.69.168.12') .'<br>' -or- $whois = system('whois 62.69.168.12', $retval); It works fine, but all the result text is at one line. How can i format this output correctly ?
View Replies !
Shell_exec - Cd Is Not Working
I have the following script: $c_path = "/absolute_path_to_some_directory"; $test_cmd = "cd $c_path; ls"; $test_res = shell_exec($test_cmd); Regardless of where I put the script, when executed, it always lists the contents of the directory where it is placed, rather than the contents of the some_directory. In other words,it appears that cd is not working. I have verified that path and permissions are correct. PHP is version 4.3.9. What's wrong ?
View Replies !
Shell_exec Not Working On Win2K3
We have PHP 4 installed on Windows 2003 with Apache 2, and the shell_exec has mysteriously stopped working - it hangs the page rather then returning anything. To check it out, I tried shell_exec("dir") which works fine on the development machine, but not on the live server. I'm guessing the network guys have done something to the security of the live server that would cause this - but it's very strange; why would Apache (running under the default system account) not allow PHP to run shell_exec statements? I have checked PHP and it's not in safe mode. I'm a bit stuck -
View Replies !
Shell_exec Using System Tools - Wait For Process To Finish
I have a problem that hopefuly someone here knows the answer to. I want to do a shell_exec command from PHP. I then want to continue with the script when the shell program is finished with what it does. Problem here is, that will take approximately one hour. How do I make the script wait until the program that I call in shell_exec is finished?
View Replies !
System(); Command Not Working On Remote System. Windows.
My server is a windows machine, on the same domain as python(also a windows machine). Apache is running as a service as an administrator. This is a test only environment to whom it may concern(I hate people telling me how insecure my system is) I'm just trying to run: $last_line = exec('dir pythonc$', $retval, $g); print_r($retval); echo '<br>'.$g.'<br>'; echo '$last_line= '.$last_line.'<br>'; Which outputs: Array ( ) 1 $last_line= The command from the command line works fine. And apache can access directories that only administrators can access on the local machine.
View Replies !
PHP System() And Exec()
Background: I am trying to execute a binary on the server located in the current directory where the php script is being run. The server is a linux (debian based). I am having trouble getting php to execute the binary properly, below is my code. Code:
View Replies !
System() And Exec()
If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends. I have tried numerous time by redirecting to a file or other stream to free up a php web page that called a perl script for example, but the php script always hangs...has anyone had any luck freeing up a calling php script from a process, or program that it launched in the background? Code:
View Replies !
Exec(), System()
I write very, very simple script who call external program. The script is run on Linux Slackware, Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.8b PHP/4.4.4 here is my script: <?php echo exec('ls'); ?> this work properly. but if i write: <?php echo exec('xine'); //xine is a multimedia player ?>
View Replies !
Bug In System And Exec Commands
If PHP is running via a web server, and mutiple system calls are made within the script to another script, hundreds of processes are created. Here is an example: Script 1: <?php for ($i=1; $i<=5; $i++) { system("php script2.php"); } ?> Script 2: <?php exit; ?> The effect is the same (and more difficult to stop) when the system calls are made in the background. e.g. system("php script2.php >>/dev/null 2>>/dev/null &"); system("php script2.php >/dev/null 2>&1"); I have even tried calling a shell script, which in turn calls the second PHP script (both in the background), but it still causes lots of processes. The "exec" command is also affected. At first, I thought this was a problem with either Zeus web server of Fast CGI, but I have since tried it with Apache and normal CGI with the same effect. Does anyone have any idea why this happens and whether there is any way to prevent it? I have posted a bug report to bugs.php.net (ID 14997), but so far to no avail.
View Replies !
Exec() And System() Problems
I am trying to use php's exec() or system() to execute a shell script that I wrote. exec and system() work fine with a simple command like ls, but nothing happens when I point it at the shell script. The shell script works fine from my shell login. Can't figure out what tho problem is. Is php just incapable of running shell scripts?
View Replies !
System/shell/exec/etc
I've got PHP 5.1.6, Apache 2.2.2, on Fedora 5. Everything is great except that when I use an of the external launching commands, persistent apps dont stay open. I have a simple shell script set up to load an app, and I have it write a PID file. Immediately after calling exec (milliseconds later) the PID is alive. However, within a few more milliseconds it seems to close. I've made sure that the apache uid/gid have full access to the script and the apps it calls. When sudo'ing manualy in a shell with the apache uid, the script works flawlessly and loads the program, and stays open, as it should. I've verified that the app loads under the uid 'apache' with ps. When running it through PHP, it seems to close almost immediately after succeeding. Is there some fundamental issue with how this works that I'm missing? I can't seem to get any real errors out of php, apache, or even the shell when redirected to a file. Should I try PHP4? Is PHP5 buggy with this kind of thing? I even tried running 'at' to schedule the script (so that it'd be invoked by at instead of the shell itself) but that failed, silently, as well.
View Replies !
Exec(), System() And Win 2003
I have searched high and low for the past 2 days for an answer to my problem. I have found a few references, but nothing has helped me. My problem is this: I am trying to ping a remote server from a PHP script in IE 6.0. When I load the page, the cmd.exe loads on the server and takes up all my CPU. I have to manually stop the process for it to go away. My setup is this: Windows 2003 Server PHP 5.0.1 I have tried - giving my system32cmd.exe full IUSR_%machinename% rights - moved the cmd.exe to the script folder, to the PHP folder And about a million other things that I can't remember =(. I have tried multiple functions, written in mulitple ways and the outcome is always the same. when the cmd.exe is opened it hangs on the 2003 server.
View Replies !
Use Exec() In PHP 5.2 On A Windows XP Pro System
I'm trying to use exec() in PHP 5.2 on a Windows XP Pro system. What I'm trying to do is use it to tell an already running program what to. For example: X:pathprogram.exe /something or X:pathprogram.exe /something_else If I do the command through the command line, it works, but so far I have been unsuccessful in PHP. Usually it PHP just hangs, and give no error message, and does nothing to the program.
View Replies !
Exec Is Not Working Right
I'm trying to convert a video with exec i have just installed php 5.0.5 on my server and every thing seems to work except exec can you help i have tried <? runExternal( "ffmpeg -i video.mov -s 320x240 -r 30 video.flv", &$code ); if( $code ) echo "bad transcoding"; else echo "looks good"; function runExternal( $cmd, &$code ) { $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("pipe", "w") // stderr is a file to write to ); $pipes= array(); $process = proc_open($cmd, $descriptorspec, $pipes); $output= ""; if (!is_resource($process)) return false; #close child's input imidiately fclose($pipes[0]); stream_set_blocking($pipes,false); stream_set_blocking($pipes[2],false); $todo= array($pipes[1],$pipes[2]); while( true ) { $read= array(); if(!feof($pipes[1]) ) $read[]= $pipes[1]; if(!feof($pipes[2]) ) $read[]= $pipes[2]; if (!$read) break; $ready= stream_select($read, $write=NULL, $ex= NULL, 2); if ($ready === false) { break; #should never happen - something died } foreach ($read as $r) { $s= fread($r,1024); $output.= $s; } } fclose($pipes[1]); fclose($pipes[2]); $code= proc_close($process); return $output; } ?> and <? exec("ffmpeg -i video.mov -s 320x240 -r 30 video.flv"); ?> and <? system("ffmpeg -i video.mov -s 320x240 -r 30 video.flv"); ?> None worked ....
View Replies !
Problem Using System/exec Function.
I am faced with strange problem. Basically I want to make a script which would take mysql back up for me. I have come up with following. [ basically code is borrowed from some other place ] PHP Code:
View Replies !
Using System/exec, How To Backup Database?
system("mysqldump --opt myDatabase > backup.sql"); here are my problems, i don't think it works on the webserver. next, where exactly the file, backup.sql be place if it does succeed. i believe we just can't execute commands on the webserver can we? i also tried using the sql query BACKUP TABLE ... TO .. but i'm guessing the problem lies with the TO... how do i know what directory shall i place it therE? for instance, my pages are placed in, home/myname/public_html/... i tried to put home/myname/public_html/backup in the TO but nothing happens.
View Replies !
Command Window - Exec/system
I'm in the process of developing a script in Windows where I need to use exec/system. Whenever I execute either, Windows spawns a command window which automatically sappears. Is there a clean way to force Windows to NOT display the command window? I've seen this discussed a few times previously, but, none of the solutions seem to be working (tried both exec and system; tried using cmd /c, tried using start /B, etc.)
View Replies !
Php Exec() Function Is Not Working
I am trying to execute linux command with php. I am try to log on as super user, so I have used the following code: exec("su root"); exec("<password>"); But I dont think its working, becuase if I want to change my directory and view the list, I find myself in the same directory. I have used the following code: exec("cd /"); Passthru("ls -l");
View Replies !
Exec Stopped Working?
I wonder if anyone has experienced something like this, as it seems truly bizarre and is causing me to tear out my hair (what little there is left of it).... The exec() function just suddenly stopped working, for no discernable reason. Here is the code:
View Replies !
Exec And System Commands Blocked By Host
I've got this code, its the simpliest example I could make. It works perfectly on my windows xp/apache/php box, but doesn't do anything on a commercial website host. The actual code should use gzip to compress a folder but that doesn't work either. Anyone know the reason why they would be blocking these commands? I suspect the problems with commonly used php apps like phpBB to be the real reason. <? exec("ping 127.0.0.1 > test.txt") or die(); // get contents of a file into a string $filename = "test.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); fclose ($fd); echo $contents; ?>
View Replies !
Alternates To System() And Exec() In Order To Use ImageMagik?
My Web host apepars to not allow exec() and system(), as a line in my script: system("convert -scale 100x100 $uploadfile $toimage"); gives the error: "Warning: system() has been disabled for security reasons" Is there some other way to use ImageMagik (or is it GhostScript?)'s "convert" command in PHP that may be safer and generally allowed by Web hosts?
View Replies !
Exec(curl --proxy ....) Or Passthru(curl --proxy....)
I am trying to do some proxy stuff , I am able to retrieve the page but not able to catch the return , what I am doing is passthru("curl --proxy 195.115.142.120:80 xyz.com"); or exec("curl --proxy 195.115.142.120:80 xyz.com"); It throws the results (displays the xyz.com) to my page but I want to catch that in a variable like $variable=passthru("curl --proxy 195.115.142.120:80 xyz.com"); or $variable=(some php fucntion)("curl --proxy 195.115.142.120:80 xyz.com"); echo $variable , should give me the page.
View Replies !
Running An .exe File Using Exec() Or System(), Unable To Fork Error
I have a problem with running an .exe file using exec() or system() I have downloaded a file called ffmpeg.exe for converting movie clips. I can use the program thourg the command line in windows (cmd), but I'm not able to have PHP run the file. First PHP gave be an "unable to fork" error. But then I gave users access to the cmd.exe file and solved that problem. So now is no problem running for example exec("dir");
View Replies !
System() Function Is Not Working In Windows
I want to encrypt a text file's content using public key of other user. I'm working in windows NT and running my php in apache server. I've installed my gnupg in c:gnupg. To encrypt the content I used the following code: PHP Code:
View Replies !
Working On A Username Validating System
i am a working on a username validating system...and it needs to do the following things... Only allow lowercase letters Allow numbers Allow "_" and "$" and not allow anything else...and if it does not go by this print an error out.
View Replies !
Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
This is kind of a part II to a question a posted earlier about exec and shell_exec not working. I'm trying to use ftp_exec to execute some simple command: $conn_id = ftp_connect("$server") or die ("Cannot initiate connection to host"); ftp_login($conn_id, "$username", "$userpass") or die("Cannot login"); $command = 'cd..' if (ftp_exec($conn_id, $command)) { echo "$command executed successfully"; } else { echo "could not execute $command"; } ftp_close($conn_id); I'm getting the following error: Warning: ftp_exec() [function.ftp-exec]: SITE EXEC is an unknown extension in /home/urieilam/public_html/work/video/test1.1.php on line 21 could not execute cd.. Have tried other commands as well, get the same. Could this be a security issue or something to do with p Safe Mode? I don't know much about commands, shell, etc..
View Replies !
Passthru()
Anyone know why i'm getting an "unable to fork [datafile] " error using the passthru function. Tried it on txt files and grafix, and both types give error.
View Replies !
Passthru
Warning: passthru() has been disabled for security reasons in ... how can I change my php.ini file (php4/apache/winxp server) to enable this function? How can I best work around if I can't use this function?
View Replies !
Help With Passthru And Wmic...
I'm trying to get this to work. <?php echo passthru('wmic cpu get loadpercentage'); ?> and just output to the browser... It looks like cmd.exe hangs when it tries to execute the command. The IUSR_ account has access to both the cmd.exe and wmic files. I have also tried copying the wmic files to the C:php dir, and to the directory the web app is running from.
View Replies !
Variables In Passthru
I am trying to print the website statistics for certain websites to a PDF file using htmldoc. $pdf = passthru("/usr/bin/htmldoc -t pdf --quiet --jpeg --webpage http://$username:$pass@$domain:2082/awstats.pl?year=$year&output=main&config=$domain&lang=en&month=$month"); The issue is that none of the variables after $year work the $domain and $month variable.
View Replies !
Passthru Output
I need to run a linux command via php and display the output in a browser. <? passthru('/home/user/qmHandle -R > output'); header("location:./output"); ?> The above code is supposed to run qmHandle and write the output to a file "output". It works fine, but it only writes the last line to "output". However, when I run qmHandle directly at a terminal, it outputs several hundred lines to screen.
View Replies !
|