I have this:
exec('lsblk -no "UUID" 2>&1', $result);
print_r($result);
in CLI mode, everything is fine, the output is:
Array
(
[0] =>
[1] =>
[2] => d5b31fcc-ba84-47bc-ab1e-7f71178c791f
[3] =>
[4] => Dj0hJ3-c9C4-B1px-HIYW-DGwi-v9I9-eppfgL
[5] => e266aff1-e6a7-444a-b9b3-2da2f9b71202
[6] => 3fc422ac-0cde-4b54-aab1-cac10d3d5f0b
[7] =>
)
But from http, the output is:
Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
)
Is this a bug, or a charset problem?
var_dump($result);and look into the source code if you see anything in the browser?[0]=> string(0) ""; @Augwa I don't think it's about permissions, because I have the same size of the array both cases, just without valueslsblk -no "UUID"; 2>&1also perhaps you have permissions to view the uuid with your user at the cli and the webserver does not so it just returns empty strings.