A
A
Alex Helber2016-12-03 14:45:10
PHP
Alex Helber, 2016-12-03 14:45:10

How to call BASH script from PHP?

<?php
shell_exec('bash /tmp/testsh.sh');
?>

Why does not it work?
script to create folder "test" in /tmp/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Regretful, 2016-12-03
@regretful

1) You can try this
or
2) Try to enable error display in php script.

error_reporting(E_ALL);
ini_set('display_errors',1);

3) And check the execution rights for the script.
ls -la /tmp/testsh.sh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question