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

A htaccess file in root directory before Symphony CMS install #2934

Open
jurajkapsz opened this issue May 19, 2021 · 0 comments
Open

A htaccess file in root directory before Symphony CMS install #2934

jurajkapsz opened this issue May 19, 2021 · 0 comments

Comments

@jurajkapsz
Copy link
Contributor

Affected Symphony version(s): 2.7.x, 3.x
PHP version(s): 7.x, 8.x
MySQL version(s): MariaDB 10.3
OS(es): GNU/Linux

When a .htaccess file is present in root directory before Symphony CMS installation, the install process will append Symphony htaccess rules into the existing htaccess file in a way, that can lead to an internal server error.

Example

Existing .htaccess file:

php_flag short_open_tag 0

After installation:

php_flag short_open_tag 0### Symphony 2.7.x ###
Options +SymLinksIfOwnerMatch -Indexes
...

Server error.log:

.../.htaccess: php_flag takes two arguments, PHP Flag Modifier ...

Causing HTTP 500 Internal Server Error.

Proper solution?

  1. Checking and deleting existing htaccess or moving into a .bak file prior the installation?
  2. Append Symphony rules in a proper way to the existing rules, e.g. on a new line?
  3. Commenting out existing htaccess rules and appending Symphony rules?
  4. Just inform user in readme that there must not be a .htaccess in root directory prior installation?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant