vletroye / Mods

Mods can be used to Create or Open/Edit and Generate packages for Synology
Microsoft Public License
86 stars 10 forks source link

Q: mods.php is not executed #21

Open phit42 opened 2 years ago

phit42 commented 2 years ago

Hi, I know you have created a very detailed wiki, but I am still at a loss: I have created a simple package for one shell script. My original attempt to base it of Dummy did not work, so I based it of MODS Sample - Basic CGI. I replaced the item with my script and the generic package information, but left the rest intact. It successfully installs in my DSM, and creates the icon. However, when executed via the menu icon, the script is not executed inside the DSM, but a new browser window is opened with the link to my mods.php (/webman/3rdparty/MyScriptsPackage/Shutdown_Rackstation/mods.php) and I am offered to save the mods.php on my local windows pc drive.

Mods Packager v7.3 DSM 6.2.4-25556

vletroye commented 2 years ago

Hi Phit

If you post your spk (possibly zipped), I will try it this weekend and look what's possibly worng.

That being said, I know that since the last update of DSM, my packages have issues. I didn't have time yet to investigate.

V.

phit42 commented 2 years ago

Hi V, thank you, very much appreciated. Here is the spk.

MyScriptsPackage.zip

vletroye commented 2 years ago

Ok.. I see. You didn't use the "Init 3rd Party" package to enable the execution of php script from the package folder or my cgi router trick... Although you did copy the Basic CGI sample, the router and the config file are not in your package

Regarding my cgi router trick, the best would have been tu use the "MODS Sample - Simple CGI". I should really refactor my documentation to make clear how to create a package from scratch

I did fix your package (including the option to run embedded in a DSM window):

MyScriptsPackage.zip

You will have to re-edit your script (I did echo your command for testing purpose)

image

Uninstall your version, refresh your browser (CTRL-F5), install the new one.

phit42 commented 2 years ago

I knew it, beginner's mistake. I am sorry! Thank you for taking the time and also fixing it. I think I did try "simple CGI" as well before, but my efforts to bring in the correct cgi router trick configurations did not work. Thanx for a great tool and your support.