I have the following code:
<?php
echo "Hola mundo.";
exec ("uname -a");
exec ("echo uname -a");
?>
the exec command does nothing on the two lines.
I'm newbie in php and I'm stuck.
SO Lubuntu 18.04
xampp 5.6.30
PHP Version 5.6.23 ( According to PHPInfo )
If you suggest that I check the php.ini, you can tell me which of the php.ini I have is what I have to see:
root@Lubuntu18:/home/rafael# find / -name php.ini -print
/etc/php/7.2/apache2/php.ini
/etc/php/7.2/cli/php.ini
/etc/php/5.6/apache2/php.ini
/etc/php/5.6/cli/php.ini
/opt/lampp/etc/php.ini
root@Lubuntu18:/home/rafael# find / -name php.ini-development -print
/usr/lib/php/7.2/php.ini-development
/usr/lib/php/5.6/php.ini-development
root@Lubuntu18:/home/rafael# find / -name php.ini-production -print
/usr/lib/php/7.2/php.ini-production
/usr/lib/php/5.6/php.ini-production
root@Lubuntu18:/home/rafael#
If you suggest that you remove exec from disable_functions , disable_options only has this pcntl_exec option, I have removed and put and nothing. Nowhere does exec come out.
Any ideas that complement what I have tried or something different ???
Update :
Investigating a little more I confirmed that the php.ini that reads is the
/opt/lampp/etc/php.ini
and it has these parameters that may be of interest:
disable_functions=
safe_mode=Off