nts php exec return no output
I've searched google, but no solution.
I'm using laragon 5 with apache 2.4 and php 7.3 non thread safe. I created a php file
<?php exec('svn help', $data, $status); echo '<pre>'.print_r($status, 1).'</pre>'; die('<pre>'.print_r($data, 1).'</pre>'); ?>
Then run it by command
php cm.php, the result shows fine.
But when i access by http like
http://location/cm.php, it shows no result.
And switch to php 7.3 thread safe, the http link works.
Can any one tell me why?
@trananhmanh89 PHP has 4 versions available to download, 32bit or 64 bit, Thread Safe (TS) or Non Thread Safe (NTS). For Laragon v5 you would use 64 bit. Apache requires the Thread Safe (TS) version, Internet Information Services (IIS) requires the Non-Thread Safe version (NTS). See Which version do I choose? for further explanation.
I hope this helps.
So reason why my exec commands don't work because of lacking
I found a work around. Turn on reverse proxy nginx and the command lines are working fine.
What @Pen-y-Fan is saying is you need the Thread-safe version for Apache.