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 Complete Forum Thread with Replies
Related Forum Messages:
- Unable To Fork Exec()'d File In IIS 5.1
- Exec(): Unable To Fork
- Exec() Function Warning: Unable To Fork (Access Violation At 77F81B4D)
- Error Running Exec() To Kill A Process
- Using Form To Post Info And Pic's (Warning: Unable To Fork)
- Error: Unable To Cache A Remote File Using Copy
- Error :: Unable To Open 'file Path' For Writing
- Exec() Not Running
- Running Exec As Root?
- Exec() - Running An External Program From Inside PHP.
- File System Error
- Find The PHP Error Log File On A Windows System
- PHP System() And Exec()
- System() And Exec()
- Exec(), System()
- System Apparently Unable To Cope With Loading
- Bug In System And Exec Commands
- System() Or Exec() And Permissions
- Exec() And System() Problems
- Using Passthru(), Exec(), System() Etc.
- System/shell/exec/etc
- Exec(), System() And Win 2003
- Use Exec() In PHP 5.2 On A Windows XP Pro System
- Running PHP System()
- Problem Using System/exec Function.
- Using System/exec, How To Backup Database?
- Exec(), System(), Shell_exec(), Etc + Nmap
- System/exec Not Working In Browser
- Command Window - Exec/system
- Running System Command
- Exec, Shell_exec, System, And Passthru Not Working At All
- Exec And System Commands Blocked By Host
- Alternates To System() And Exec() In Order To Use ImageMagik?
- Running System() As Root User
- Exec - Create An Executable That Return The System Drives
- CGIWrap Error: Exec Format Error
- PHP Running Exec() Windows Program Very Slow In Comparison To UNIX Equivalent Program
- Install Php5 On A SuSE 9.3 Linux System Running Apache 2.0.49
- 'echo "": No Such File Or Directory" Error Using "exec" To Pipe In PHP Script
- Unable To Find Php_domxml.dll Error
- Php Exec Error
- Warning: Stream_select(): Unable To Select [0]: No Error In ...
- Error Suppression And Exec?
- Warning: Move_uploaded_file() Unable To Move *file* To *new File* In *script*
- Unable To Load Dynamic Library Php_mcrypt.dll.. Error
- Error Starting Up SSH Connection(-5): Unable To Exchange Encryption
- SquirrelMail Error: Warning: Fsockopen(): Unable To Connect To [ip Address]:143
- Using Exec Function To Get A .exe Return Status Gives CGI Error
- System(), Exec(), Shell_exec(), But "Permission Denied"
- Fatal Error: Unable To Start Browscap Module In (null) On Line 0
- PHP Installation Issues On WinXP And IIS - Error: Unable To Start DCOM Server
- Zend Encode :: Fatal Error: Unable To Read 6001 Bytes
Unable To Fork Exec()'d File In IIS 5.1
I am repeatedly trying to execute a file on my server using exec() or passthru() and I keep getting an Unable to Fork error. Has anybody else had a problem with this in IIS?? The path to the perl script is correct and the script works fine in the C: prompt.
View Replies !
Exec(): Unable To Fork
I am trying to use exec() on windows IIS ,but i get the following error Code: Warning: exec(): Unable to fork [html2pdf.exe "http://www.yahoo.com/" "yahoo.pdf"] in c:inetpubwwwrootoctsuppublicationpublicationreport2.php on line 62 and the code that i used is Code: <? $convertpdfprg="html2pdf.exe "http://www.yahoo.com/" "yahoo.pdf""; $checkvar=exec($convertpdfprg);?>
View Replies !
Exec() Function Warning: Unable To Fork (Access Violation At 77F81B4D)
I am trying to execute a DOS command with the exec() function. All I get is fork errors or access errors, regardless of what file I try to execute. Example: <?php exec("sync.bat"); `sync.bat`;?> Warning: Unable to fork [sync.bat] in C:testexec.php on line 3 Warning: Unable to execute 'sync.bat' in C:testexec.php on line 4 PHP has encountered an Access Violation at 77F81B4D Id doesn't seem to matter what kind of file I try to execute, .exe, .bat or .com. Any ideas? Has ANYONE executed an external program under php/Windows?
View Replies !
Error Running Exec() To Kill A Process
Red Hat Linux 7.3, Apache 1.3, PHP 4.3.3 I am trying to create a PHP script to terminate a process that is running on the server. The file and folder permissions are set correctly, but I am getting the error "kill 943: Operation not permitted"; I am running the command "exec ("/bin/kill 943");".
View Replies !
Using Form To Post Info And Pic's (Warning: Unable To Fork)
I have created an admin form which allows the admin to update info and pic's to his site but I am having trouble with the update_pic script. When I pass along the form to the php script it gives me the following error message: "Warning: Unable to fork [C:WINDOWSTEMPphp30.tmp /full/path/to/joesauto/images/anime_dvd_icongif.gif] in c:inetpubwwwrootadd_data.php on line 39" This is line 39: exec("cp $picture /full/path/to/joesauto/images/$picture_name"); This is the form I used which was taken from this site. Code:
View Replies !
Error: Unable To Cache A Remote File Using Copy
I used the following code to copy a remote file to my server: copy($URL,$cachefile); This worked very well on my old server, but it does not work on the new one. I am getting the following error: Unable to open 'http://[...]' for reading: No such file or directory in /local/copyfile.php on line 23 I searched for more than two hours, but I have not found the solution. On the php.net I found the following: Note: As of PHP 4.3.0, both source and dest may be URLs if the "fopen wrappers" have been enabled. I am using PHP 4.2., though I don't think that this is the reason, why it does not work.
View Replies !
Error :: Unable To Open 'file Path' For Writing
I have been working on this code for 2 days now and while progressing have encountered this error: Warning: imagejpeg() [function.imagejpeg]: Unable to open 'C:/web/root/images/thumbs/' for writing in C:web ootdevfilesadditemresize.php on line 40 here is code for the file outputting the error i have noted line 40 so you can spot it easily: Also the value of $GLOBALS['thumbpath'] is : 'C:/web/root/images/thumbs/' .....
View Replies !
Exec() Not Running
I just installed ImageMagick on my development machine (OS X 10.4.7, Apache 1.3, PHP 4). I am trying to use exec() to call it. I have created a command via PHP: PHP Code: $cmd = "/usr/local/ImageMagick-6.3.0/bin/convert /Library/WebServer/Documents/one.jpg -resize 250x /Library/WebServer/Documents/photos/two.jpg" exec($cmd, $output, $retVal); I know ImageMagick is correctly installed because when I run the command via the console, it works perfectly. The "photos" directory is chmod'ed to 777. The paths are correct. I have tested a simple "ls -l ." as the command, that outputs everything just fine. Is there somehing I'm not doing right? Someting I need to disable or enable? I've gotten this exact code to work on a different server (GoDaddy of all places) so I'm quite certain it's not the code itself.
View Replies !
File System Error
"Warning: Unable to create '/banners/uploaded':" I get this error after i upload a file and attempt to copy it to /banners/uploaded. Is this error telling me there is no dir named /banners/uploaded or that it can't copy to it for some reason or another?
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 !
System Apparently Unable To Cope With Loading
I have a customer who is having problems when their Windows 2000/IIS/PHP-based system begins to experience a level of loading that isn't, in my view, unreasonably high. I'm wondering what others think, specifically: - are these volumes, for this kind of configuration, at or beyond the levels at which PHP should be able to cope? I hope not ! - what might be done to alleviate these problems? One of our suspicions is that Windows 2000/IIS/PHP is unable to cope at these volumes (for whatever reasons) but a Linux/Apache/PHP configuration would be more stable and cope with the required volume levels. - Is the Windows/IIS/PHP configuration inherently flawed? - What kind of volumes should we be able to expect with Linux/Apache/PHP? - How many web servers would be the norm for these volumes? Here's the current config: F5 load balancer fronting 4 web servers. The web servers are each dual-processor Intel machines running IIS5 under Windows 2000. Over 500Mb memory is still available when IIS gives up, so they aren't memory-constrained. PHP 4.3.6 in CGI mode, with the Zend Accelerator included Required volumes: 30,000 to 100,000 page views per hour The customer sees problems with PHP at less than 3,000-4,000 page views per hour. The webservers were only doing 20% until they spiked to 100% and then went back to zero - it seems that at a particular level of loading, IIS closes down and restarts itself, then runs till the loading hits a threshold again and the cycle repeats.
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 !
Running PHP System()
How can I run a PHP system()/exec() command with root privileges? As stated in my earlier posts, I would like to run the following in php file: [code] <?php $output = shell_exec('lsof -i :<port_no>); echo $output; ?> [code] running as http://<mysite.com>/phptest.php doese not allow me to execute this command which requires root access.. Can I run some command that will provide root privelegs to the user httpd ?? Code would be something like: [code] <?php exec('set root priveleges'); // may be sudo $output = shell_exec('lsof -i :<port_no>); echo $output; ?> [code]
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 !
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 !
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 !
Running System Command
I'm using shell_exec to run a system command which should generate a file that i want to read, however the file isnt generated. I have safemode disabled and if i echo out the command and paste it into SSH the command executes fine. I have checked out the error log and there are no errors. This is an example of the command i'm running: Code: echo 'passphrase' | /home/website/gnupg-1.4.2/g10/gpg -u JON --passphrase-fd 0 --clearsign --force-v3-sigs -o /home/website/temp_dir/8edef434308edfa0fd804cfd6d139512.asc /home/website/temp_dir/8edef434308edfa0fd804cfd6d139512.txt I've tried executing this with system(), shell_exec() and popen() to no avail.
View Replies !
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 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 !
CGIWrap Error: Exec Format Error
This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. This is typically a problem if the script was edited or uploaded from a DOS/Windows/Macintosh station to a unix based server. If you are not the owner of this script, please forward this error and the URL that caused it to the script owner. That is often the component in the URL right after /cgiwrap/. does anybody know what does this message means?
View Replies !
Install Php5 On A SuSE 9.3 Linux System Running Apache 2.0.49
I am trying to install php5 on a SuSE 9.3 Linux system running apache 2.0.49. For some reason,when attempting to restart the server,I get the following error: "Syntax error on line 26 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2-prefork/libphp5.so into server: /usr/lib64/apache2-prefork/libphp5.so: undefined symbol: php_session_create_id" Does anyone know what is causing this error,or what I can do to correct it?
View Replies !
Unable To Find Php_domxml.dll Error
I have just finishing installing apache and PHP4. It is claiming that it cannot find the php_domxml.dll file giving me the following error when I go to load a page with dom xml function on it: Unknown(): Unable to load dynamic library 'C:/php/extensions/php_domxml.dll' - The specified module could not be found I am convinced that the paths are correct as I have the following line in php.ini: extension_dir = "C:phpextensions" The file, php_domxml.dll, is defininetely in the extensions folder.
View Replies !
Php Exec Error
i cannot execute the exec command and pass varaible through it exec('/secure/sed_repl.sh "route add -host $obj->host device $device2" "" '); I have to execute it this way ... exec('/secure/sed_repl.sh "this one" "this one to" ');
View Replies !
Warning: Move_uploaded_file() Unable To Move *file* To *new File* In *script*
I'm having trouble with move_uploaded_file()- my script was working fine until a month or two ago when it suddenly stopped. Now I get the error: Warning: move_uploaded_file() Unable to move *file* to *new file* in *script* Thats it, no permissions error or "unable to open stream"- all the searching I've done everyone seeems to get another error- but I'm only getting the one. Permissions on the folder are 777, the paths are absolute and definitely correct, safe_mode and open_basedir are both off. I even called is_uploaded_file() on the line before it and it returned true. The only thing I can think of is that the hosts upgraded to php4.4 recently- could that be it? Are there any known problems (or changes that would break my script)?
View Replies !
Unable To Load Dynamic Library Php_mcrypt.dll.. Error
I am getting the error "unable to load dynamic libray php_mcrypt.dll...". I understand that php_mcrypt.dll depends on the existence of libmcrypt.dll library. I am using Windows 2003 and I have downloaded two versions of this dll and installed them once in php's ext folder and Windows's system32. The question is why am I still getting this error? Why are there different versions of libmcrypt.dll around while there's no version info in the dll? Also why isn't libmcrypt.dll distribued with php_mcrypt.dll? At least the PHP folks should mention where we can get it and what version goes with what.
View Replies !
Error Starting Up SSH Connection(-5): Unable To Exchange Encryption
For the life of me I can not figure out why I am getting this error: Error starting up SSH connection(-5): Unable to exchange encryption keys $connect = ssh2_connect('d50-1.s50', 22); That's the code. One line PHP. I've tried connecting to localhost as well. Still no love. I've got ssh2 working on other installs but not this one. Any ideas on something I'm missing or a php.ini thing?
View Replies !
SquirrelMail Error: Warning: Fsockopen(): Unable To Connect To [ip Address]:143
If anybody has experienced the following SquirrelMail error: Warning: fsockopen(): unable to connect to xx.xx.xx.xx:143 in /home/virtual/siteX/fst/var/www/squirrelmail/functions/imap_general.php on line 172 or something similar, then listen up, here's the solution. PHP 4.3.x has known bugs with file handle and socket leak issues. This is true up to PHP 4.3.3. The only solution for now is to revert to PHP 4.2.x. I'm told that this issue only affects systems with 250+ SquirrelMail sites.
View Replies !
Using Exec Function To Get A .exe Return Status Gives CGI Error
I'm trying to make a web page to work. It worked before so it has to be something related with the configuration. My problem is a call to a compiled executable (made for me) that returns 1 or 0. It does not print any text to the standard ouput so the error is strange: CGI Error: The script can .. because of the HTTP headers (I have it in spanish so the message is not the exact one). As supposed, the HTTP headers are needed only if the executable prints out a text to the browser but it's not the case. And (I repeat) It worked as it before. The machine had to be formatted and the guy in charge of that is not with me anymore.
View Replies !
PHP Installation Issues On WinXP And IIS - Error: Unable To Start DCOM Server
I just installed PHP 5.1.4 on Windows XP and I am getting an error trying to load a simple phpinfo() script. Server Application Error The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance. I checked the Event Viewer and I'm getting an error and a warning. error: Unable to start DCOM Server as /IWAM_MYNAME_LT1. The error "access denied" warning: The server failed to load application /LM/W3SVC/1/ROOT. The error was "general access denied error" I have given Full Controll privileges to c:php, c:Inetpubwwwroot and the php.ini file to both the IUSR and IWAM accounts. I have set IIS to allow "Scripts and Executables". Application protection is "Medium (pooled). I'm not sure what to do at this point. I don't remember ever having this problem before. Any ideas what's going on? One note... I changed "Application Protection" in IIS to "Low (IIS Process" and now the PHP script loads... but restarting IIS with "issreset /restart" causes IIS to crash.
View Replies !
|