3

What would make a site want me to download the index.php when viewed? I downloaded the database and all files from a staging server where site was fine. When I go to any site URL on local machine it prompts me to save "login". The contents of the saved file are the public index.php. Is there some setting or cache I need to clear? I have 10 other sites working local with no issue.

Running latest version of Craft 2.6.2789 on cPanel EasyApache4 server running the new PHP Handler with PHP7 selected for the site..

It actually is asking me to save the file using whatever the last segment is. Here are contents from my htaccess file:



    RewriteEngine On

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]


# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.

  AddType application/x-httpd-ea-php70 .php .php7 .phtml

# php -- END cPanel-generated handler, do not edit

3

You need to remove this when running local. The following piece of code is added on servers running the EasyApache4 PHP Handler.

# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php70" package as the default "PHP" programming language.

  AddType application/x-httpd-ea-php70 .php .php7 .phtml

# php -- END cPanel-generated handler, do not edit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.