Skip to content
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

Empty files #27

Closed
j1pe opened this issue Apr 15, 2020 · 8 comments
Closed

Empty files #27

j1pe opened this issue Apr 15, 2020 · 8 comments

Comments

@j1pe
Copy link
Contributor

j1pe commented Apr 15, 2020

Hi,
I'm having the same problem with the #27 issue

I'm with a syno NAS DSM 6.2,
The site works fine, the link to the database is correct however, when I download a file, it's 3 bytes.

Here is my file:

/volume1/@appstore/Apache2.4/usr/local/etc/apache24/conf/extra/mod_xsendfile.conf

LoadModule xsendfile_module modules/mod_xsendfile.so

XSendFile on
XSendFilePath /volume1/download
SetEnv MOD_X_SENDFILE_ENABLED yes

I rebooted the NAS and the Web station package several times.

Thanks in advance for the help and congratulations for the good job.

Originally posted by @j1pe in #3 (comment)

@yanncam
Copy link
Owner

yanncam commented Apr 15, 2020

Hello @j1pe

Can you check which Apache version that you use with your Synology ? Apache 2.2 or 2.4 ?
(You can check this by adding a file phpinfo.php with the content <?php phpinfo(); ?> at the root of your web-server),

Search for the string _SERVER["SERVER_SOFTWARE"] in the results to see the version of Apache currently used.

When you have found the right Apache 2.2 or 2.4 used by your Synology, check the xsendfile file associated.

vi /etc/httpd/conf/extra/mod_xsendfile.conf-user # Synology DSM5
vi /volume1/@appstore/WebStation/usr/local/etc/httpd/conf/extra/mod_xsendfile.conf-user # Synology DSM6
vi /volume1/@appstore/Apache2.2/usr/local/etc/apache22/conf/extra/mod_xsendfile.conf # Synology DSM6 for package Apache 2.2
vi /volume1/.4/usr/local/etc/apache24/conf/extra/mod_xsendfile.conf # Synology DSM6 for package Apache 2.4
For the next updates and evolution of DSM version and package version, it's possible to use the following command to find the right mod_xsendfile.conf via SSH : find / -name "*xsendfile*conf*"

Try the latest SSH command to find all xsendfile on your Synology if needed.

I have realised a Bash script to maintain the xsendfile for your KodiWebPortal even if the NAS reboots or if the package is reset (see here : https://github.com/yanncam/KodiWebPortal/blob/master/enableDownload.sh). You can put this script in a cronjob on your DSM.

Please check this again to be sure that the edited xsendfile is correctly used by the loaded version of PHP/Apache on your NAS.

Sincerely,

`

@j1pe
Copy link
Contributor Author

j1pe commented Apr 15, 2020

Thank you for your quick response.
I'm in version 2.4. The modified file is the right one.
image

I found an error in the file path on KodiWebPortal
image
Entre le chemin et le nom du fichier, il manque un /
Dans ma base de donnée, le chemin est bon (et fonctionne bien avec Kodi)

I don't know what the problem is, but I think it's the cause.

Thank you for your help.

@yanncam
Copy link
Owner

yanncam commented Apr 15, 2020

Hum, ok, I see.

Can you double-check your config.php file of KodiWebPortal ? To be sure that these directives contain a trailing slash ?

define("NAX_MOVIES_LOCAL_PATH", "/volume1/MEDIATHEQUE/");	// Local path where are movies
define("NAX_MOVIES_REMOTE_PATH", "smb://NAX/MEDIATHEQUE/");	// Location of movies in Kodi DB
define("NAX_TVSHOW_LOCAL_PATH", "/volume1/MEDIATHEQUE/");	// Local path where are TVshow
define("NAX_TVSHOW_REMOTE_PATH", "smb://NAX/MEDIATHEQUE/");	// Location of TVshow in Kodi DB

You have to set the trailing slash like /volume1/MEDIATHEQUE/, not /volume1/MEDIATHEQUE, can you check this ? :)

@j1pe
Copy link
Contributor Author

j1pe commented Apr 15, 2020

I forgot all about the "/.
Thanks

However that does not solve my problem of downloading at 3 bytes

@yanncam
Copy link
Owner

yanncam commented Apr 15, 2020

Can you check the Apache / PHP log file on your NAS when you try to download a file ?

@j1pe
Copy link
Contributor Author

j1pe commented Apr 15, 2020

I find my F***** problem.

It's Virtual Host, I configured this with my foot.

I'm sorry and thank you for your help and yourgreat job !!!

@j1pe j1pe closed this as completed Apr 15, 2020
@yanncam
Copy link
Owner

yanncam commented Apr 15, 2020

No problem, glad to see that it's fix :) !

Have a nice confined day ! :)

@j1pe
Copy link
Contributor Author

j1pe commented Apr 15, 2020

Have a nice confined day ! :)

Thanks you too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants