MinimServer Forum
minimserver cli issue with php on synology - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Support (/forumdisplay.php?fid=4)
+--- Thread: minimserver cli issue with php on synology (/showthread.php?tid=7616)



minimserver cli issue with php on synology - lyapounov - 23-08-2025 07:30

Hi Simon

on my synology /var/packages/MinimServer/target/bin/mscript -c rescan

works well in cli mode. Same with /volume1/@appstore/MinimServer/bin/mscript -c rescan (first being a symbolic link to the other)

However, in my php program,

exec_shell('/var/packages/MinimServer/target/bin/mscript -c rescan')

returns null (same with the other command)

I imagine an issue with rights ? If so, should I change the rights /owner of the mscript program ?

(currently -rwxr-xr-x 1 MinimServer MinimServer 3187 Aug 24 2021 mscript
while my php files are drwxrwxrwx+ serge users

Thx !


RE: minimserver cli issue with php on synology - simoncn - 23-08-2025 12:41

I don't see an exec_shell PHP function. There is a shell_exec function.

Your file permissions look fine.


RE: minimserver cli issue with php on synology - lyapounov - 23-08-2025 22:53

Sorry tapping error. I meant shell_exec

So why does shell_exec return null while the command itself is ok ?


RE: minimserver cli issue with php on synology - simoncn - 24-08-2025 17:24

The following is working for me:

/usr/bin/php somefile

where somefile contains the following:

<?php
shell_exec("/var/packages/MinimServer/target/bin/mscript -c rescan");
?>

If you want to see output from the rescan command, use the following:

<?php
system("/var/packages/MinimServer/target/bin/mscript -c rescan");
?>