Bug #3092

Installation problem, "Options not allowed in .htaccess file"

Added by Jesús García Crespo over 12 years ago. Updated about 9 years ago.

Status:VerifiedStart date:
Priority:LowDue date:
Assignee:Jesús García Crespo% Done:

0%

Category:Installation
Target version:Release 1.4.0
Google Code Legacy ID:atom-1142 Tested version:
Sponsored:No Requires documentation:

Description

At installation process, "Options not allowed in .htaccess file" message is shown even when all
Options directives are allowed.

Trying to discover why this is happening, I saw that
sfInstallPlugin/modules/sfInstallPlugin/actions/callbackAction.class.php was returning error
code 500 to browser because a PropelException. Something about q_object table wasn't available
at the database. At this level of the installation, of course not!

The problem seems to be when checking credentials in
"plugins/sfInstallPlugin/config/sfInstallPluginConfiguration.class.php". At this early installation
point, when callback action is called in a fresh install, sfDatabaseManager object is created (line
24) successfully and hasCredential (line 33) returns false, so we go to line 38, where a new db
query is created against QubitAcl***. This is not possible here because the database wan't loaded
yet. Then, a PropelException is thrown.

[g] Legacy categories: Installation

atom-3092-check_http_loopback_errors.patch Magnifier (5.01 KB) F.L. Jonathan Araña Cruz, 01/03/2013 03:52 AM

History

#2 Updated by Anonymous almost 12 years ago

  • Priority set to Low

[g] Labels added: Priority-Low

#3 Updated by Evelyn McLellan over 11 years ago

  • Target version set to Release 1.2

Moved to 1.2.

[g] Labels added: Milestone-Release-1.2

#4 Updated by David Juhasz over 10 years ago

  • Target version set to Release 1.3

Roll over to Release 1.3

[g] Labels added: Milestone-Release-1.3

#5 Updated by F.L. Jonathan Araña Cruz over 9 years ago

A scenario for this to happen is using a custom domain (/etc/hosts) and installing atom in a VM. If the custom domain is not set in the VM's hosts file, symfony is unable to connect to itself and the "Options not allowed in .htaccess file" is shown.

#6 Updated by F.L. Jonathan Araña Cruz over 9 years ago

Here's a tentative fix. I can provide a pull request if preferred.

With this patch the user obtains the error message from sfWebBrowser, so it has a chance to know what's going on and fix it. In my case, instead of "Options not allowed in .htaccess file" I get

HTTP exception: Warning : "fopen(http://atom/index.php/;sfInstallPlugin/callback):
failed to open stream: php_network_getaddresses: getaddrinfo failed:
Name or service not known" occured in /var/www/atom/htdocs/plugins/sfWebBrowserPlugin/lib/sfFopenAdapter.class.php on line 60

#7 Updated by F.L. Jonathan Araña Cruz over 9 years ago

For the record, with php5-curl installed the error is nicer:

HTTP exception: Couldn't resolve host 'atom'

#8 Updated by Jesús García Crespo over 9 years ago

  • Sponsored set to No

Thanks, Jonathan! I'll take a look to your patch as soon as I can!

#9 Updated by Jesús García Crespo over 9 years ago

Hi Jonathan. Thanks for looking at this issue.

I've been thinking about it and I believe now that we should stop dealing with the .htaccess file. Some reasons:

  • It targets Apache users only, other httpd implementations like Nginx doesn't support per directory configuration files.
  • It's slow. For every request, Apache has to (1) check if the file exists, (2) read it and (3) parse it per request for every directory in the path.
  • Also, not considered a good practice in terms of security.

This is also very interesting:
http://httpd.apache.org/docs/2.2/howto/htaccess.html#when

F.L. Jonathan Araña Cruz wrote:

Here's a tentative fix. I can provide a pull request if preferred.

With this patch the user obtains the error message from sfWebBrowser, so it has a chance to know what's going on and fix it. In my case, instead of "Options not allowed in .htaccess file" I get

[...]

#10 Updated by Jesús García Crespo over 9 years ago

  • Status changed from New to QA/Review

I've removed the code related to .haccess from the installer in commit:8bd1172a.

#11 Updated by Jesús García Crespo over 9 years ago

  • Category set to Installation
  • Target version set to Release 1.4.0

#12 Updated by Dan Gillean over 9 years ago

Developers, is there a way that you would like us to test this issue, now that it has been marked for QA/Review? If so, please include instructions to verify the issue is resolved and I will test further. Thanks.

#13 Updated by Jesús García Crespo over 9 years ago

I'm afraid this has to be tested by a developer. Maybe we should have a specific QA/Review status for us?

#14 Updated by Dan Gillean about 9 years ago

  • Status changed from QA/Review to Verified

#15 Updated by Dan Gillean about 9 years ago

  • Status changed from Verified to Feedback

#16 Updated by Dan Gillean about 9 years ago

  • Status changed from Feedback to QA/Review

#17 Updated by Jesús García Crespo about 9 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF