When I make a .php file, it comes up as an image file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johnpaine
Forum Newbie
Posts: 5
Joined: Sun Mar 28, 2004 9:33 am

When I make a .php file, it comes up as an image file

Post by johnpaine »

I have installed php using a php installer, to install with Apache 2, but when I go to make a php file and save it as name.php it comes up as being a Microsoft Picture it file insted. I am currently running windowsXp, and apache 2 server.

Do I need to delete the file extention for that specific image file, in order to have a .php extention?


Thank you very much!
darkforcesjedi
Forum Newbie
Posts: 5
Joined: Sat Mar 27, 2004 1:33 pm

Post by darkforcesjedi »

The PHP file should work fine with Apache, no matter what program its associated with. Try accessing it like this:

http://localhost/folder/name.php
johnpaine
Forum Newbie
Posts: 5
Joined: Sun Mar 28, 2004 9:33 am

Post by johnpaine »

didnt work, maybe I didnt fully install PHP,

When i was first installing it php.exe didnt open, how should I go about installing this fully on my computer, its just not seeming to work :(
User avatar
werlop
Forum Commoner
Posts: 68
Joined: Sat Mar 22, 2003 2:50 am
Location: /dev/null

Post by werlop »

Does apache serve normal html pages? if not, then you will need that installed properly first.

See http://www.php.net/manual/en/install.apache2.php for php installation instructions with apache 2. Scroll down to get to the Windows section.

You can remove the file association in folder options, but as already mentioned, that shouldn't make a difference to the serving of php files.
Post Reply