-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MODS Sample - Simple CGI is downloaded, not executed #6
Comments
This typically happens when the right version of php is not installed. The latest versions of the cgi router in my packages is using php3.0. Is it installed on your Synology? |
Thank you very much for the prompt answer. We have PHP 7.3 installed and this is what router.cgi script is using Ist 7.3 is what you mean by php3.0? There is no PHP 3.0 package in Synology Packet Center. I see your last commit in MODS Web Console is named "Fix php page being downloaded instead of executed" and this package is working just fine with our DSM configuration. Should I apply these changes to Simple CGI? |
Oh yes, sorry.... I was meaning php7.3. I just reinstalled the latest MODS_Sample_Simple_CGI.spk to be sure... and it's working fine on my Synology... Another reason why the script is sometimes downloaded : an error during the execution.. Ex.: due to an access denied. This can happen if the log file may not be written... : LOG="/var/log/@SYNOPKG_PKGNAME@" Notice: you may only access /var/log if your are connected as root via ssh The execution will also fail if the ini file does not exist: ls -la /usr/local/etc/php73/cli/php.ini You can do a quick test. As a second line of the router.cgi, type: exit If you get the message, than the issue is with the router.cgi. Simply comment the line declaring the LOG so you won't have access issue with it. Next, try to execute the script (index.php) directly in the console ssh: You should get the html page:
if you didn't see the message "Sorry, the page you are looking for is not found." but still got the file downloaded, then the pblm is with the web server nor redirecting the call to the router. If you are using Nginx, then check that the custom config of the package, for Nginx, is linked to the right location: ls -la /usr/syno/share/nginx/conf.d/dsm.MODS_Sample_Simple_CGI.conf lrwxrwxrwx 1 root root 57 Jan 8 18:44 /usr/syno/share/nginx/conf.d/dsm.MODS_Sample_Simple_CGI.conf -> /volume1/@appstore/MODS_Sample_Simple_CGI/ui/dsm.cgi.conf If it is there, then it seems to be not load properly. Restart first Nginx to be sure: synoservicecfg --restart nginx If it still does not work, did you customize Nginx ? its config should load all dsm.*.conf files under /usr/syno/share/nginx/conf.d/ as you can see via: cat /etc/nginx/nginx.conf | grep syno
If all these are fine... I would reboot at least once the Synology... V. |
Another stupid trick which worked for me : clear your cache (Ex. within Chrome : your browsing data). This is especially valid if you installed/uninstalled/re-installed the package and tried it several times... |
Oh, wow. Thanks for the detailed answer, I appreciate it. I'll check tomorrow and report. |
I had myself a lot of issues when I wrote and tested this technique with nginx ;) |
I have DSM 6.2.2-24922 Update 4 and can install the mod successfully. However, when I try to launch it from the application list, an empty window opens and "index.php" is downloaded, instead of being executed. Other Sample MODS show the same behavior. I can't find any issues in the log files.
Ideas?
The text was updated successfully, but these errors were encountered: