The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Undefined variable: us_url_root but path is showed correctly during installation - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Undefined variable: us_url_root but path is showed correctly during installation (/showthread.php?tid=308) |
Undefined variable: us_url_root but path is showed correctly during installation - HackerWolf - 10-10-2016 Hi! I want to test userspice, but I'm getting the same error with this versione and even with 4.1. I install US into a subidir of my nginx root (html/enl is the subdir). During the installation process the path is correctly showed, but after installation is completed, I get the following error: <pre> Code: Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 22 It's like a missing "/" somewhere not detected from the for loop in users/init.php but I can't figure out how to fix it. Any idea? Thanks in advance. Nginx 1.11.3 w/ PHP 7.0.11 Undefined variable: us_url_root but path is showed correctly during installation - mudmin - 10-10-2016 Ok. So let's walk through this. Judging by your code, you are accessing your site by going to hackerwolf.xyz, right? So try this. Comment out line 12 of users/init.php and put Code: $us_url_root='/html/enl/'; My gut says that will get you close enough to getting the pages loaded enough to know if you either have an extra slash or need one somewhere. If that doesn't work, you can do go on any page and put Code: dump($abs_us_root); Code: dump($us_url_root); and you can figure out what path the system thinks it is seeing. Undefined variable: us_url_root but path is showed correctly during installation - HackerWolf - 10-10-2016 Ok, I'm accessing trough enl.hackerwolf.xyz or hackerwolf.xyz/enl. Tried your suggestion, it doesn't work. Not able to add dump() beacause I always get the above error. Undefined variable: us_url_root but path is showed correctly during installation - mudmin - 10-10-2016 Try doing Code: echo "<pre>"; Code: var_dump($abs_us_root); Code: var_dump($us_url_root); Code: echo "</pre>"; That will accomplish the same thing as my dump function. I would replace line 12 on init.php with Code: $us_url_root='/enl/'; as a starting point. Then you might need to remove a slash from either side to make it all work. Undefined variable: us_url_root but path is showed correctly during installation - HackerWolf - 10-10-2016 <pre> Code: string(41) "/home/webuser/www/hackerwolf.xyz/html/enl" Tried many paths... same dump printed. Undefined variable: us_url_root but path is showed correctly during installation - mudmin - 10-10-2016 Ok. You're getting close. I think the trick is going to be: Line 2 of init.php Code: $abs_us_root='http://hackerwolf.xyz'; Line 12 Code: $us_url_root='/enl/'; Undefined variable: us_url_root but path is showed correctly during installation - mudmin - 10-10-2016 Although you might need to make line 2 Code: $abs_us_root='http://hackerwolf.xyz/'; Undefined variable: us_url_root but path is showed correctly during installation - HackerWolf - 10-10-2016 Nothing. Putting $abs_us_root='/home/webuser/www/hackerwolf.xyz/html/enl/'; I get string(42) "/home/webuser/www/hackerwolf.xyz/html/enl/" Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 26 NULL Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 29 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 63 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 64 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 65 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 66 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 67 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 68 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 69 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 70 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 71 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 72 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/init.php on line 73 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/index.php on line 10 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/includes/header.php on line 22 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/includes/header.php on line 23 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/includes/header.php on line 27 Notice: Undefined offset: -1 in /home/webuser/www/hackerwolf.xyz/html/enl/users/helpers/helpers.php on line 43 Notice: Undefined variable: us_url_root in /home/webuser/www/hackerwolf.xyz/html/enl/users/includes/header.php on line 29 But only if I hit by hackerwolf.xyz/enl. Done via enl.hackerwolf.xyz it redirects to https://enl.hackerwolf.xyz/usersc/ with a blank page, after displaying the above errors for a moment. Undefined variable: us_url_root but path is showed correctly during installation - mudmin - 10-10-2016 I'm going to send you an email from my gmail account. |