Krlos Posted January 7, 2018 Posted January 7, 2018 (edited) Hi, I have a weird problem with this site: I have a working pw 3.0.85 installed on a Cpanel VPS, everything is working fine. Now I need to make some changes, so I compressed the files with cpanel compress tool and downloaded to my local mackbookpro mamp server. Here is the weird thing, when I try to visit the home page for this local installation the browser prompts to dowload the index.php file instead of executing. I can log into Processwire admin backend, and everything is working fine, if I browse a page of the site that is not the home page everything is working fine too. So only the home page is not working What could it be? I'm out of ideas. Thank you Edited January 9, 2018 by Krlos Solved
Peter Knight Posted January 8, 2018 Posted January 8, 2018 What happens if you create your own index.php file. Does that also prompt a download? Will help isolate if this is a server or a htaccess or PW issue.
DaveP Posted January 8, 2018 Posted January 8, 2018 I googled 'cpanel compress tool' and didn't find anything specific. Do you mean you 'zipped' (or otherwise archived) the files? Macs have some odd habits with file extensions - if they were zipped, are you sure you unzipped them after download?
iank Posted January 8, 2018 Posted January 8, 2018 (edited) @dragan's suggestion may be the answer. I've had a similar problem with my cPanel accounts which have a PHP switcher. In my case using the switcher and changing from the default PHP version adds a PHP version handler snippet to the end of the .htaccess, something like: # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php70” package as the default “PHP” programming language. <IfModule mime_module> AddType application/x-httpd-ea-php70 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit ..and of course when you try this locally there is no such handler, so you are prompted with a download. Edit: Actually, re-reading your post, I don't think this could be the answer if other pages are working, sorry! Edited January 8, 2018 by iank amendment 2
FrancisChung Posted January 8, 2018 Posted January 8, 2018 Make a backup of the .htaccess file in your new site and copy across the .htaccess from the source site and see if that works. In my experience, where part of the site is accessible but not others (eg. Homepage vs Other pages) .htaccess has always been the culprit so far.
Krlos Posted January 9, 2018 Author Posted January 9, 2018 Thank you guys, as always It's a pleasure to be part of a wonderful community dragan, iank and FrancisChung were right on the spot, the problem was on my .htaccess file. iank Got the solution, My Cpanel was adding those lines to the end of my .htaccess file, as my server uses multiphp and I have other websites that run on different php versions. Thank you again for your priceless help 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now