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

Fix php not executing in rutorrent folder #5375

Merged
merged 3 commits into from
Mar 25, 2022

Conversation

vinhtq115
Copy link
Contributor

Issue on forum: https://dietpi.com/phpbb/viewtopic.php?p=44679#p44679

When installing rTorrent, I met this error when opening http://<dietpi IP>/rutorrent:

[25.03.2022 11:48:40] WebUI started.
[25.03.2022 11:48:40] Bad response from server: (200 [parsererror,getplugins]) SyntaxError: expected expression, got '<'

I also created a phpinfo.php file at /var/www/rutorrent/phpinfo.php and PHP didn't execute it (tested on browser with URL http://<dietpi IP>/rutorrent/phpinfo.php). However, the one outside rutorrent at /var/www/phpinfo.php (http://<dietpi IP>/phpinfo.php) worked fine.

It seemed that in rutorrent of /etc/nginx/sites-dietpi/dietpi-rutorrent.conf lacked PHP so it didn't work. Adding these lines fixed it for me.

@MichaIng MichaIng added this to the v8.3 milestone Mar 25, 2022
@MichaIng
Copy link
Owner

Many thanks for your report.

Interesting is that we never had this added but never got a report until now. I checked back until v6.2x something and we always used a location block for Nginx HTTP authentication, i.e. PHP never worked. Good to have this solved 😄.

@vinhtq115
Copy link
Contributor Author

Many thanks for your report.

Interesting is that we never had this added but never got a report until now. I checked back until v6.2x something and we always used a location block for Nginx HTTP authentication, i.e. PHP never worked. Good to have this solved 😄.

Maybe no one used rTorrent with nginx so they never had it in the first place? I couldn't find any posts about this on the forum and github issues so it took me a while to find out.

dietpi/dietpi-software Outdated Show resolved Hide resolved
Co-authored-by: MichaIng <micha@dietpi.com>
@MichaIng
Copy link
Owner

Let me add a changelog entry, then I'll merge. Tested already and works very well on Buster, Bullseye and Bookworm now 👍.

- CHANGELOG |  rTorrent: Resolved an issue where the web interface didn't work with Nginx because the PHP handler wasn't set. Many thanks to @vinhtq115 for providing the solution: MichaIng#5375
@MichaIng MichaIng merged commit 4337d08 into MichaIng:dev Mar 25, 2022
@vinhtq115 vinhtq115 deleted the rtorrent-nginx-php-fix branch March 25, 2022 16:22
@vinhtq115 vinhtq115 restored the rtorrent-nginx-php-fix branch March 25, 2022 16:36
This was referenced Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants