Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 10th, 2008, 8:07 AM   #1
spekkio7
Newbie
 
Join Date: Jan 2008
Posts: 2
Rep Power: 0 spekkio7 is on a distinguished road
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.
spekkio7 is offline   Reply With Quote
Old Jan 10th, 2008, 8:45 AM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,200
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
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.
Sane is online now   Reply With Quote
Old Jan 10th, 2008, 10:12 AM   #3
dr.p
Programmer
 
dr.p's Avatar
 
Join Date: Feb 2006
Location: Ohio
Posts: 93
Rep Power: 3 dr.p is on a distinguished road
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
dr.p is offline   Reply With Quote
Old Jan 11th, 2008, 1:15 AM   #4
spekkio7
Newbie
 
Join Date: Jan 2008
Posts: 2
Rep Power: 0 spekkio7 is on a distinguished road
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
spekkio7 is offline   Reply With Quote
Old Jan 11th, 2008, 11:06 AM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,200
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
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)
Sane is online now   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC