-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
Installing Flarum from /index.php causes wrong base url #1861
Comments
Nice catch. Yes, the script name (if present) should be removed from the base URL. If anybody wants to send a PR, these are the relevant lines:
|
The installation process where the base url is involved causes even more problems. I've made some changes and when I test all cases properly, I can create a PR. The issues I've found:
I can think of couple of solutions when the console installer is used:
Excuse me if the issues I've found sounds like they need to be in a different issue thread. I am kind of new to open source contribution. |
- Fix base url when is appended with a script filename - Add default base url http://flarum.local when CLI wizard used - Remove some code duplication - Add minor improvement to the UX when CLI wizard used Fixes flarum#1861
Bug Report
Current Behavior
Installing Flarum from
/index.php
works but causes an invalid url to be used inconfig.php
, thus preventing access to the forum after install.Steps to Reproduce
/index.php
at the end/index.php
which shows "Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error" Accessing/
shows the same error/index.php/assets/forum-575aab17.css
which causes 404 errors/index.php
being used inconfig.php
Expected Behavior
The installation page should either not be available at
/index.php
, or removeindex.php
from the install url automatically.Screenshots
Probably not needed, let me know otherwise.
Environment
It's a blank install.
When enabling debug mode, the assets show the following 500 error:
Possible Solution
Same as expected behavior.
Additional Context
Multiple people seem to have hit issues that could be related to this. Most recently https://discuss.flarum.org/d/21143-fatal-error-please-help but I'm not 100% sure this is the same issue. Other people had managed to get an
index.php
in theirconfig.php
and this is probably one way to inadvertently do it.The text was updated successfully, but these errors were encountered: