Jump to content

[SOLVED] Weird problem with copy of production site


Krlos
 Share

Recommended Posts

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 by Krlos
Solved
Link to comment
Share on other sites

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

@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 by iank
amendment
  • Like 2
Link to comment
Share on other sites

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

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

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...