![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2008
Posts: 2
Rep Power: 0
![]() |
installing php (beginners question)
i've been trying to get PHP to work with apache for the last few hours and I'm having a terrible time. I was hoping I could get some help here.
Anyway, i've went over some online guides and i've got apache to work which was pretty easy, and i went through all the steps to set up PHP. at first when i would do that localhost/test.php (test.php being the page i made and was trying to view) i wouldn't get anything at all till eventually i did it and it would ask me if i wanted to download the file (test.php). i'm guessing i did something wrong along the way, and somehow i got it to where it keeps opening the file automatically now, instead of asking me if i want to save / open. I'm using Firefox and I think i accidently clicked the one option that asks if you want to use the same program to open the file everytime which in my case i think is notepad. so now when i run localhost/test.php my file just automatically opens and i see "<? phpphpinfo(); ?>" in notepad. i've changed some things since then and tried IE instead of firefox, but still asks me to open/save to file, isntead of actually displaying the page. well, that's where i'm at so far. if anybody has an idea of what i'm missing/doing wrong i'd appreciate any input. edit: btw i'm using apache 2.2.6 and the windows binaries php 5.2.5 Last edited by spekkio7; Jan 10th, 2008 at 8:30 AM. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
Re: installing php (beginners question)
I can't give you the exact fix to your problem, but what you're experiencing means Apache doesn't know to associate the PHP interpreter with the .php extention. This is a specification in the httpd.conf file, that either you're missing, or your PHP interpreter is being linked incorrectly.
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Feb 2006
Location: Ohio
Posts: 93
Rep Power: 3
![]() |
Re: installing php (beginners question)
There should be a mime-type specification in one of your apache config files for php file. Check your configuration files for "AddType application/x-httpd-php .php" Sounds like that's not in there, and you need to add it if it isn't. Once you add that and restart the web server, your browsers will stop asking you to open/save.
__________________
Neeley.org |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jan 2008
Posts: 2
Rep Power: 0
![]() |
Re: installing php (beginners question)
well, in response to the above posts... I do have that line of code, "AddType application/x-httpd-php .php" in my .conf file. it's in the "<IfModule mime_module>" tag. thanks though. i'm still getting the "Do you want to open or save this file?". i guess it would be hard for somebody else to come up with a solution that can't actually see what i've done. i'm still new to this and it seems like there's a lot of room for error. i'll probably start over from the beginning. thanks
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() |
Re: installing php (beginners question)
You could also post the httpd.conf file, and see if anyone finds a problem. If not, that will at least isolate the issue.
(Remember to post using [code][/code] tags or as a file attachment) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question regarding data input into PHP/Mysql using something other than GET | davil | PHP | 6 | Nov 20th, 2007 9:06 AM |
| Linux - Installing PHP | Booooze | Coder's Corner Lounge | 2 | Jul 30th, 2007 1:40 AM |
| Slackware installation guide for Linux beginners | coldDeath | Coder's Corner Lounge | 104 | Jul 29th, 2007 5:40 AM |
| Php Tutorial 3 | bulio | PHP | 4 | Jul 16th, 2006 5:00 AM |
| Php Tutorial 1 | bulio | PHP | 17 | May 29th, 2006 5:54 AM |