Solved

Apache Error when using AllowOverride All

Posted on 2009-03-31
3
546 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
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simplest php form 3 63
Change text to radio button and calendar form 2 36
PHP warning 4 30
How to loop bootstrap columns which contain database records 9 23
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now