Krlos Posted January 7, 2018 Share 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 Link to comment Share on other sites More sharing options...
dragan Posted January 8, 2018 Share Posted January 8, 2018 Check your .htaccess file 2 Link to comment Share on other sites More sharing options...
flydev Posted January 8, 2018 Share Posted January 8, 2018 try Duplicator 1 Link to comment Share on other sites More sharing options...
Peter Knight Posted January 8, 2018 Share 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. Link to comment Share on other sites More sharing options...
DaveP Posted January 8, 2018 Share 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? Link to comment Share on other sites More sharing options...
iank Posted January 8, 2018 Share 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 Link to comment Share on other sites More sharing options...
FrancisChung Posted January 8, 2018 Share 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. Link to comment Share on other sites More sharing options...
Krlos Posted January 9, 2018 Author Share 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 Link to comment Share on other sites More sharing options...
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