Can no longer symlink to shared code
Brought to you by:
jberanek
Up through MRBS 1.7.5 I was able to use symbolic links in /home/$user/web/mrbs to the files in /usr/local/share/mrbs/web but when upgrading to 1.9.2 that was no longer possible; I started getting 500 errors from the files in the css directory even though in the Apache configuration I had
AllowOverride all
Options +FollowSymLinks
This occurred in two test environments: {CentOS 6, Apache 2.,2, PHP-FPM 7.3} and { CentOS 8, Apache 2.4, PHP-FPM 7.4}. I finally just copied the code into the user directory and was able to see the CSS (and stop getting unsupported browser warnings). I'm not sure why this is the case, but it looks like we may need to change our entire workflow unless you have some advice.
What were the errors that you were getting (have a look in your PHP error log)?
If I try touching an empty /usr/local/share/applications/mrbs-1.9.2/web/config.inc.php file, I get
Note that I'm authenticating users with Shibboleth and have the following in config.inc.php in the user directory:
I haven't started adding user permissions yet on the new server, but I'm hoping that the same
pattern we had before will still work with type=none.
I'm moving ten calendars to this new server, and don't want to duplicate code; the symlink method was working for us with the application path "/user/secure/mrbs" -- if I try the multisite method, which needs docs, it looks like the path will have to change to "/mrbs/sites/user"?
I'll need to investigate why the symlinks aren't working.
However multisite mode would probably solve your problem. It was specifically designed to avoid duplicating code. You have a single instance of MRBS, but each site is referenced by an additional parameter in the query string, eg index.php?site=5, or index.php?site=mars. Then in the sites directory you have subdirectories, eg 5 and mars, and each subdirectory contains its own config file which overrides the global config file (which overrides systemdefaults.inc.php). At the very minimum the config file probably has a table prefix specific to the site.
We need to do remote_user based access control on each calendar in Apache, as well as the user/admin permissions in MRBS, and would like to keep the URL paths as they were on the old server, rather than having the calendar selection be in a field.
Are you just seeing the problem on the new server or do you also see it on the old server?
I saw it on the old server but attributed it to it being an old system, so when I saw it again on the new, I realized it was a new issue in the code, not just an Apache/PHP config problem.
I tried setting MRBS_ROOT via .htaccess and config.inc.php , but the declaration in defaultincludes.inc overwrites it; dumping all vars with
produces
[MRBS_ROOT] => /usr/local/share/applications/mrbs-1.9.2/web
Perhaps change that section of defaultincludes.inc to:
Last edit: John Beranek 2021-06-07