Personal Development for Smart People Forums

Personal Development for Smart PeopleTM Forums

 

Go Back   Personal Development for Smart People Forums > Personal Development > Technology & Technical Skills

Notices

Technology & Technical Skills Computer skills, hardware, software, internet topics, gadgets, programming

Reply
 
Thread Tools Display Modes
Old 02-28-2007, 09:58 PM   #1 (permalink)
Senior Member
 
Join Date: Nov 2006
Posts: 156
trekr5 is on a distinguished road
Default Help php is driving me mad!

Calling all php gurus

I'm running the XAMPP combo on my machine and everything appears to be running fine until.(PHP is showing green and enabled in the Status area)

I have put together a very simple .html file with a form and a button. The button calls a php script. However instead of the browser running it, it asks me what application I would like to use to open the php script!

I'm sure the solution is something very simple that I have overlooked. It used to work before but now it doesn't. The php script is in the same directory as the file (.html) that calls it.

Help!

Last edited by trekr5; 02-28-2007 at 10:03 PM.
trekr5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2007, 10:35 PM   #2 (permalink)
Senior Member
 
Join Date: Nov 2006
Location: Melbourne, Australia
Posts: 182
tobyhede is on a distinguished road
Default

This may mean the mime type is not set in Apache correctly. Or that there is an issue with the directory you are running your php from.

Can you access the default XAMPP panel? This has some test code that you can use to see if PHP is installed correctly.

There should be a file called mime.types in {XAMPP_INSTALL}/apache/config. You can add mime types to this file.
tobyhede is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2007, 10:53 PM   #3 (permalink)
Senior Member
 
Join Date: Nov 2006
Posts: 156
trekr5 is on a distinguished road
Default

the phpinfo.php file within browser displays details of php but I stil can't run a php script

The mime.type file is in the said directory

Do I need to reinstall xampplite?
trekr5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2007, 11:07 PM   #4 (permalink)
Senior Member
 
Join Date: Nov 2006
Location: California, USA
Posts: 593
andrew is a jewel in the roughandrew is a jewel in the roughandrew is a jewel in the rough
Default

Ah, it could be not thinking it's an html page and instead a downloadable extension. Try in a different browser and take a look at the mime types as suggested to see what kind it is.

Also, how are you calling the php script?

Oh, and make sure you're accessing the page via http://localhost/ in your browser, not just c:\www\filename.html

Last edited by andrew; 02-28-2007 at 11:14 PM. Reason: rephrased
andrew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2007, 11:10 PM   #5 (permalink)
Senior Member
 
Join Date: Nov 2006
Posts: 156
trekr5 is on a distinguished road
Default

?

My XAMP LITE installation is not running any php files at all. Instead of running the file in the browser, it asks me whether I want to save it .And yes I did save the script with a .php extension
trekr5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-01-2007, 12:12 AM   #6 (permalink)
Senior Member
 
Join Date: Nov 2006
Location: Melbourne, Australia
Posts: 182
tobyhede is on a distinguished road
Default

OK, if NO php files are running, it's some sort of configuration issue.

I'd try reinstalling as a first stop. And then I guess you need to start working with the apache config. Google will help there. But hopefully a resintall will work.
tobyhede is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-01-2007, 02:51 AM   #7 (permalink)
Senior Member
 
Join Date: Nov 2006
Posts: 156
trekr5 is on a distinguished road
Default

sorted it

I had used file:///c:/... as the address instead of http://localhost/"filename" and was missing a very important ?> in the .php file

Thanks everyone
trekr5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-01-2007, 03:57 AM   #8 (permalink)
Senior Member
 
Join Date: Nov 2006
Location: California, USA
Posts: 593
andrew is a jewel in the roughandrew is a jewel in the roughandrew is a jewel in the rough
Default

Yeah I've done the same thing that's why I kind of had the feeling that's what it was.

I hate when you go through crazy things just to realize it was something stupid like that.
andrew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-01-2007, 03:58 AM   #9 (permalink)
Senior Member
 
Join Date: Nov 2006
Posts: 156
trekr5 is on a distinguished road
Default

It's always easy when you know how isn't it!

trekr5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Marijuana effect placebo Spirituality, Consciousness, & Awareness 84 09-17-2010 01:58 PM
Driving Blog Traffic tommy Technology & Technical Skills 30 12-03-2007 06:43 PM
Driving traffic to your website Tom_Chambers Technology & Technical Skills 5 01-13-2007 12:54 AM
Any PhP/mySQL gurus out there? trekr5 Technology & Technical Skills 20 01-10-2007 11:05 PM
People with HTML or PHP skills Dave Kaminski Technology & Technical Skills 5 11-14-2006 01:51 AM


All times are GMT. The time now is 08:46 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2010 by Pavlina LLC