Solved

Apache Error when using AllowOverride All

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apache error.log 19 43
Exporting image to excel from php document 10 28
Checking CSRF token within a function 36 76
Add email address from a web page to outlook 2010 contacts ? 8 28
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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

831 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