Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 14, 20204 yr I must be missing something obvious. With some of my sites, I can create a local version using WAMP, which is handy for testing and trying out upgrades. With other sites, however, the local installation doesn't work. Instead, attempting to access the local version downloads a copy of index.php. I thought the .htaccess file might be the cause, so deleted that but I still have the same problem. I deliberately put incorrect database credentials into conf_global.php to try to get an error message but nothing changed. If I try to access the site by adding /index.php to the address, then it does load if I remove .htaccess... but I can't log in because /login produces a 404. Does anybody have a suggestion as to what the cause is? I don't understand why it seems to be these specific sites. One difference which might help is that these sites come from a VPS; my others are on a separate shared hosting server.
July 20, 20204 yr Author Both the Apache server (2.4.43) and WampServer are using PHP 7.3. That said, I can see that the server has 5.6 as its default PHP setting and I've adjusted it manually for my sites, so I'd better change it. I think I'm going to experiment with using alternatives to WampServer too.
July 20, 20204 yr Removing the .htaccess if it has rewrites will cause a 404 on /login, because the rewrites would rewrite the index.php?/login to just /login (its a friendly url setting). It must be disabled in the ACP, which will generate a new htaccess file. As for why it would download the index.php file instead of opening it for display, that I am unsure of.
July 20, 20204 yr There's only 2 things I can think of. Either a. Youre working outside of the WAMP directories. Or 2, apache config is off. Check your httpd.conf and make sure it has: AddType application/x-httpd-php .php Edit: further, make sure mod_php is enabled. Edited July 20, 20204 yr by AlexWright