Skip to content
Advertisement

Tag: exec

Pass variable from PHP to Powershell script

I am trying to pass a variable from PHP to a powershell script. My PHP code is : And I am trying to capture it in powershell using : The $txt is a string variable as I can write it in a txt file from PHP. I do not know exactly where I am wrong as the powershell is executed.

RPI Launch VLC via php on local machine

I am trying to open a .mp4 file in VLC via the PHP exec command on a RPI 3 SITUATION I access localhost and select the .mp4 file I want to play on a mobile device. RESULT I want PHP to open the video file using VLC on the host machine, which is connected via HDMI to a display. The

How to pass a variable in PHP from a Python file?

I’m trying to call a Python script in a PHP file and pass a variable value from that script after pressing the submit button. I have it: index.php test.py Both files are in the same folder. Why is it not working? I’d like to do this without Flask / Django. Answer You can’t declare a variable in Python and use

Use PHP exec to execute Minecraft command

I’m working on creating my own little Website to manage a Minecraft server as fun project. Now what I would need to accomplish is being able to send commands to the screen in which the server is running. My approach to this was the following: Now that command line works just fine when i execute it in the terminal itself,

PHP cannot execute local programs when accessed through a browser

I am a bit new to PHP and web development in general, and I am trying to execute a program from php. I setup my virtual machine and hosted it properly, but when the website attempts to load the page, it says that the program could not be executed: “permission denied.” I tried everything including: Adding execute permissions to every

shell linux don’t execute commande

I have this command and it works fine on shell. I want to run it with php but it does not work what i missed : edited : $arg=”arg1″; $arg2= “arg2”; echo shell_exec(“sshpass -p “.escapeshellarg($…

Executing bash script with PHP, and input commands

I`m trying to execute a bash script using PHP, but the problem is that the script needs to have some commands and informations inputed during the execution process. This is what I`m using The script execute OK, but I`m not able to input any option on the script. Answer shell_exec() and exec() are not able to run interactive scripts. For

Tesseract exec not working

I have been trying to work this out for a couple days now and can’t crack it. I’m trying to use php to echo the result of tesseract. After everything I’ve researched and tried, I feel like the below code should work. The command runs fine via SSH and if I change the above to suit ifconfig it works fine.

Execute an external program in php and return output file download link

I’m trying to run file_creator.exe via PHP which accepts some arguments and produces an output file. so how can I get the name of output file in order to produce the download link? Answer You will want to use shell_exec() function in PHP (http://php.net/manual/en/function.shell-exec.php) to run your exe file. Pass in the parameters in the command line such as: Whatever

Advertisement