The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with installing on a subdomain?
#1
Hi. I installed US into a subdir called "users" which I had previously set up to be a subdomain. No problems.

I then noticed that paths ended up like "users.mydomain.com/users/....." Effectively, I had "mydomain.com/users/users/....." So, I decided to reinstall into the public_html folder on my site with the goal being to get paths like "users.mydomain.com". For some reason, that is producing all manner of issues.

I then tried an experiment. I deleted the subdomain, and reinstalled in public_html. That went fine and I ended up with links like "mydomain.com/users/....". However, when I re-created the subdomain of "users" hoping to get "users.mydomain.com/....", I now get these errors immediately...

Warning: require_once(/MY_ABSOLUTE_PATH/public_html/users/users/helpers/helpers.php): failed to open stream: No such file or directory in /MY_ABSOLUTE_PATH/public_html/users/init.php on line 22

Fatal error: require_once(): Failed opening required '/MY_ABSOLUTE_PATH/public_html/users/users/helpers/helpers.php' (include_path='.:/opt/php70/lib/php') in /MY_ABSOLUTE_PATH/public_html/users/init.php on line 22


Note the "users/users" aspect in the warning. Is there a known issue with installing US on subdomains?
  Reply
#2
Hmmm. I use subdomains all the time. I have one software package that every customer gets their own subdomain...but I have them setup as different "accounts" on my vps.

Do you have a .htaccess file in your root that is doing some rewriting/redirecting?
  Reply
#3
htaccess or a weird server setup, i know 1&1 is a nightmare for subdomains.

ive got installs and a few subs without issue,

think i’ll try a user subdomain ehen i have time
  Reply
#4
I don't know that it's .htaccess doing anything. I'm pretty sure it has to do with $abs_us_root and $us_url_root.


On "users.mydomain.com", I've echoed those out...

$abs_us_root: /ABSOLUTE/PATH/public_html/users

$us_url_root: /


Warning: require_once(/ABSOLUTE/PATH/public_html/users/users/helpers/helpers.php): failed to open stream: No such file or directory in /ABSOLUTE/PATH/public_html/users/init.php on line 25

Fatal error: require_once(): Failed opening required '/ABSOLUTE/PATH/public_html/users/users/helpers/helpers.php' (include_path='.:/opt/php70/lib/php') in /ABSOLUTE/PATH/public_html/users/init.php on line 25
  Reply
#5
Is it possible to end up with file paths like "users.mydomain.com/join.php" instead of "users.mydomain.com/users/join.php"?
  Reply
#6
you would have to do that in htaccess for sure, one for stackexchange i think.

check your php version and maybe use 5.6 or even 7. it maybe your server doesnt like: $_SERVER[‘document_root’]
  Reply
#7
I've got things set up to use PHP 7 for the users folder.

My main question though, is "Can US be installed on a subdomain such that you end up with file paths like users.mydomain.com/join.php instead of users.mydomain.com/users/join.php?"

Thanks.
  Reply
#8
There's no stock way to do what you're trying to do.

What would happen if you just did an include for the few files you need...

like a join.php in the root folder (right next to index.php)
<?php include "users/join.php"; ?>

You could also just copy the few userspice pages you want into the root and then just edit the paths.
  Reply
#9
Also, I'm still concerned about the master_account thing. That's kind of given fits out of nowhere.
  Reply
#10
ive not notice any issue with $master_account myself
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)