Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Apache Error when using AllowOverride All

Posted on 2009-03-31
3
Medium Priority
?
556 Views
Last Modified: 2013-12-13
Hi,

I am trying to get CakePHP on subdomains working on Aptana Cloud.

I have edited httpd.conf and added a VirtualHost (see code below). This all seems to work but I am getting an error when accessing php. From searching I have found that the solution is to change AllowOverride from None to All, I have done this but now every time I visit the site I get a dialog asking me if I want to download the php file. If I change it back to None then the files load but with a php error.

Any ideas what is wrong with it?

Thanks

Mike
<VirtualHost *:80>
DocumentRoot /path/to/files
ServerName subdomain.mydomain.com
<Directory /path/to/files>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

Open in new window

0
Comment
Question by:learnitlists
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
learnitlists earned 0 total points
ID: 24034174
Ok I solved it finally, I had a legacy AddHandler in one of my .htaccess files which was causing the problem.
0
 
LVL 6

Expert Comment

by:karlwilbur
ID: 24173386
Awesome that you solved the problem. You might want to post a little more detail as to exactly how the legacy AddHandler directive was triping you up. This will help others that may have a similar issue.

Also, FWIW, I try to avoid "AllowOverride All" if at all possible. I explicitly allow only what is needed in the htaccess file.
E.G.
For ModRewrite:
    AllowOverride FileInfo

For Basic Authentication:
    AllowOverride AuthConfig

For Throttling:
    AllowOverride Limit
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question