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

$profilePath has no effects #2706

Open
2 tasks done
SSoft7 opened this issue Aug 13, 2024 · 3 comments
Open
2 tasks done

$profilePath has no effects #2706

SSoft7 opened this issue Aug 13, 2024 · 3 comments
Labels

Comments

@SSoft7
Copy link

SSoft7 commented Aug 13, 2024

Please complete the following tasks.

  • Web browser cache cleared
  • Web browser, ruTorrent and PHP version provided

Tell us about your environment

Web Browser: 127.0.2651.98 (Official build) (64-bit)
ruTorrent: v4.3.9
PHP: PHP 8.1

Give us detailed steps to reproduce the error

I'm not sure how to reproduce it. I just noticed it all of a sudden when trying to fix an UI issue.
I have a multi user setup.
The top conf file /rutorrent/conf/conf.php has $profilePath = '../../share';
But the user conf file /rutorrent/conf/users/USERNAME/conf.php has $profilePath = '/another/directory/';

If I remove user configuration under the /share folder it will get auto created each time I load ruTorrent. So, $profilePath = '/another/directory/'; has no effect.

I'm not sure what's happening here. the /tmp/errors.log does not show anything. There is also not much info on the error log.

This seems similar to #544 which was resolved by reinstalling the ruTorrent files and I did the same but not resolved till now.

Any guide to debug this?

Tell us the error message

None

Provide the php error log contents (if applicable)

No response

@stickz
Copy link
Collaborator

stickz commented Aug 20, 2024

@SSoft7 Which version of ruTorrent are you running? The latest version is v4.3.6.

$profilePath = '../../share will bring you to the share folder.

From there you can do:
$profilePath = '../../share/users/username

This is the recommended way to store configurations for different users.

@SSoft7
Copy link
Author

SSoft7 commented Aug 23, 2024

@SSoft7 Which version of ruTorrent are you running? The latest version is v4.3.6.

$profilePath = '../../share will bring you to the share folder.

From there you can do: $profilePath = '../../share/users/username

This is the recommended way to store configurations for different users.

Yes, I am using 4.3.6.

I want to put a custom absolute path in $profilePath and make $profilePath variable based on $username...Don't want to use relative paths.

It is used to work fine.

If you can reference the code lines, I can try to debug it on my own setup environment and post the findings here.

@SSoft7
Copy link
Author

SSoft7 commented Nov 14, 2024

@stickz Just checking in. Is there any update regarding this issue?

I have checked this myself and found that moving line 59 to line 63 fixes this issue, because the user specific configuration file is not loaded when getProfilePath() is called on line 59, so the $profilePath variable is the default one, not the custom one specified within user's config.php

FileUtil::getProfilePath(); // for creation profile, if it is absent

However, since I'm not aware of this codebase, I'm not sure what will be side effect of making this change.

Can you kindly comment on this?

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

No branches or pull requests

2 participants