Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

.php files downloading, not opening on local testserver

The headline says it all, I think... I tried to setup a local testserver using xampp, but after I set up everything there, it still didn't process .php files right. So I figured I might need to install actual PHP itself seperately, which i did. Now while that proved to be not the smartest thing to do because xampp includes it already, of course, it also messed up my php file display in my browser. What happens is that whenever I try to open a php file in my browser (tested with Firefox, IE7 and Chrome), it tries to download the file instead of displaying it, even after uninstalling PHP5 and running solely on xampp (I think).
Now what I tried to do is setting the application localhost should try to run php fiith, as well as set which files to process with httpd, aka adding those lines in my xampp's httpd.conf file:
Code:
Action application/x-httpd-php C:/xampp/php/php.exe

AddType application/x-httpd-php .php .php3 .phtml .php4

Well, since that didn't do anything, I suspect that therE's something left of the PHP5 installation that overwrites xampp's settings there. Now I think I uninstalled it properly (installed it with the installer, and uninstalled it from the system control panel), so yeah... if anyone knows anything about what I can do to fix this, any help would be greatly apprechiated.

EDIT: One thing I just noticed is that my localhost/xampp tells me that I'm using 'C:\xampp\apache\bin\php.ini' as the php configuration file, while it should be 'C:\xampp\php\php.ini' to my understanding... something up with that?
 
It's always been working for me- Try uninstalling PHP, AND xampp. Then install xampp with the installer.

xampp/apache/bin/php.ini should be alright. But then again, the way that xampp handles things is weird.
 
I did that probably like 5000 times by now... that's why I suspect something being left from the PHP installation after uninstall, because after the point where it didn't display phps anymore, I never got it to work no matter what.

EDIT: A little update on that... etheon pointed me towards that I should run files from my htdocs directory (duh!), and it works now... so yeah, thanks for your help, folks... all working now! :biggrin:
 
I'm guessing you got stuck with some remnants of the PHP installation. Reinstall it, then use something called Revo Uninstaller to get rid of it. That searches for leftover bits on the computer as well as in the registry, and allows you to delete them. (You can even choose to leave some behind) Also, it does look like you might have installed something incorrectly in the first place.

Edit: Oops! Looks like you already found a solution. Still, revo uninstaller is always a good idea when you need to uninstall something. (They even have a standalone version, so that you never have to bother with installing or uninstalling it)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top