Hello all,
I'm attempting to run the following command in PHP (on Ubuntu):
<?php
if (exec("/home/johnboy/ffmpeg/ffmpeg -i test1.mp4 -acodec aac -ab 128kb -vcodec mpeg4 -b 1220kb -mbd 1 -s 320x180 final_video.mov"))
{ echo "Success"; }
else { echo "No good"; }
And I always get "No good" echoed back, and no file created.
...
I have a PHP script that creates other PHP files based on user input. Basically, there are files containing language specific constants (define) that can be translated by the user. In order to avoid runtime errors, I want to test newly written files for parse errors (due to "unusual" character sequences). I have read several posts here o...
Hi all,
Is it possible to use
Runtime.getRuntime().exec("cmd.exe");
in gwt? When I compile it, I get
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
Any workarounds / ideas?
...
Hi,
I'm using Ant to build my project, generate docs and check coding strandard violations. I use some external tool through exec task. Exec prefixes the output lines with [exec]
This string messes my output up.
If I specify the -e switch in the command line, it remains quiet.
Is there a way to
specify the -e switch on every run in th...
I'm trying to execute a copy of the Perl interpreter using Java's Runtime.exec(). However, it returned error code 9. After running the file a few times, the perl interpreter mysteriously started to return code 253 with no changes in my command at all.
What does code 253 / code 9 mean? A Google search for perl interpreter's exit codes tu...
You would think that launching a bat file from Java would be an easy task but no... I have a bat file that does some sql commands for a loop of values read from a text file. It is more or less like this:
FOR /F %%x in (%CD%\listOfThings.txt) do sqlcmd -Slocalhost\MSSQL %1 %2 -d %3 -i %CD%\SQLScripts\\%%x
exit
Don't worry about the spe...
hy,
in my script i run a exec() function to make a movie file with ffmpeg.
the problem is ffmpeg can run only 1 time on the server,
if 2 people are online on server and first one already run ffmpeg i want the second to wait until the first end the process
how to code this?
thank you
...
This is a followup question to my other question : http://stackoverflow.com/questions/2434125/run-bat-file-in-java-and-wait
The reason i am posting this as a separate question is that the one i already asked was answered correctly. From some research i did my problem is unique to my case so i decided to create a new question. Please go ...
Hey, I'm trying to execute a program on windows through PHP, the command is posted below. This doesn't seem to be running through the script at all, even though it works when the command is manually entered into the command prompt.
exec('C:\\ffmpeg -i ' . $movedfile . ' -acodec aac -ab 128k -vcodec libx264 -fpre C:\\ffmpeg\\share\\ffmp...
Hi,
I am working on an application an have an issue about running shell command from java application. here is the code:
public String execRuntime(String cmd) {
Process proc = null;
int inBuffer, errBuffer;
int result = 0;
StringBuffer outputReport = new StringBuffer();
StringBuffer errorBuffer ...
I am trying to track down a very odd crash. What is so odd about it is a workaround that someone discovered and which I cannot explain.
The workaround is this small program which I'll refer to as 'runner':
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
int main(int argc, char *argv[])
{
if (argc == ...
Is there anyway to use atrm command to remove queue job from PHP web application?
I wrote a shell script to remove the queue job but it doesn't work well.
#! /bin/sh
export PATH=/usr/local/bin:$PATH
echo atrm 3700 2>&1
...
Hi everyone,
I am setting up a github account, to work on a small project with some friends.
I would like to have my home machine able to do a git pull via php, so that we just have to call this small php file for the machine to be up to date.
As of right now :
<?php
$output = shell_exec('git help');
echo "<pre>$output</pre>";
?>
T...
I am trying to run a command line action in my Team Build (MSBuild).
When I run it on the command line of the build machine it works fine. But when run in the build script I get a "exited with code 3".
This is command that I am running:
C:\Program Files\Wavelink\Avalanche\PackageBuilder>.\jresdk\bin\java -classpath
"WLUtil.jar;WLPac...
I want to do the next thing:
String[] cmd = {"cmd","/c","c:\\Program Files (x86)\\Microsoft Office\\Office12\\WINWORD.exe","/mOpenPage","c:\\Navodilo.doc"};
Process proc = Runtime.getRuntime().exec(cmd);
But, without to specify the winword.exe path but open the document with the macro...
I read that there exist Auto Open...
Hi there,
I'm trying to use the PHP exec() or system() (or any other similar function) to run a batch file, but I can't seem to get these to return anything.
The simplest example I've seen is this, which outputs nothing:
<?php
echo system('dir');
?>
The script is running on a windows XP machine on IIS with PHP installed and I've...
I found a very helpful post on here about cropping images in a circle. However, when I try to execute the imagemagick script using exec in PHP, I'm getting no results. I've checked to make sure the directories have the correct permissions and such. Is there a step I'm missing?
Any insight would be much appreciated. Here's what my script...
I am trying to list all of the columns from whichever Adventureworks table I choose. What T-sQL statement or stored proc can I execute to see this list of all columns? I want to use my C# web app to input one input parameter = table_name and then get a list of all the column_names as output. Right now I am trying to execute the sp_col...
Hey Everyone,
I've set up a daemon (daemon.php) using PEAR's System_Daemon which waits for something to appear in the database. Once something is there, the daemon gets enough information and sends it out to another script (execute.php) using the shell_exec command this way I'm not worried about waiting for a response and holding up the...
Hi, I'm trying to write a bash script that "wraps" whatever the user wants to invoke (and its parameters) sourcing a fixed file just before actually invoking it.
To clarify: I have a "ConfigureMyEnvironment.bash" script that must be sourced before starting certain executables, so I'd like to have a "LaunchInMyEnvironment.bash" script th...