Page 1 of 2

On XP, php get message "Windows cannot open is file&quo

PostPosted: 29. January 2007 06:30
by nbronsert
I have tried to install apache, mysql and php on my XP box.
I have tried installing them separately, I have also tried installing xampp and wamp. Have text books that tell how to set them up, have spend days looking in news groups but can't find my problem.
I have tried turning off XP's firewall, I have put apache http server, mysql and their ports into the exceptions on the fire wall.
Apache will display html pages but anything with a php extentsion I get "Windows cannot open this file". I get this message in both firefox and IE.
There must be some simple answer for this problem.
Thanks

PostPosted: 29. January 2007 13:47
by Wiedmann
Apache will display html pages but anything with a php extentsion I get "Windows cannot open this file".

You make a doubleclick on PHP files in the Windows explorer or open these files with the file open dialoge in your browser?

On XP, php files get message "Windows cannot open this

PostPosted: 30. January 2007 06:30
by nbronsert
I have put a link on a html page to a php page, and when you click the link to the php page, you get the little box with the message "Windows cannot open this file".
Thanks for your time

PostPosted: 30. January 2007 06:58
by Wiedmann
I have put a link ... to a php page,

What's the source code of this link?

on a html page

How did you open this html page?

On XP, php files get message "Windows cannot open this

PostPosted: 30. January 2007 07:26
by nbronsert
<html>
<head>
<title></title>
</head>
<body>
<form method="post" action="calculate.php">
<p>
value 1: <input type="text" name="val1" size=10></p>
value 2: <input type="text" name="val2" size=10></p>
<p>Calculation:<br>
<input type="radio" name="calc" value="add"> ADD<br>
<input type="radio" name="calc" value="subtract"> SUBTRACT <br>
<input type="radio" name="calc" value="multiply"> MULTIPLY <br>
<input type="radio" name="calc" value="divide"> DIVIDE </p>
<p>
<input type="submit" name="submit" value="calculate"></p>
</form>
</body>
</html>

This is a simple little form which calls a php page.

I also get the same message with the php info page.

<?php phpinfo(); ?>

File saved as "phpinfo.php"

Both file get the same message.

PostPosted: 30. January 2007 07:31
by Wiedmann
Wiedmann wrote:How did you open this html page?

:?:

On XP, php files get message "Windows cannot open this

PostPosted: 30. January 2007 16:07
by nbronsert
I have apache 2.2 running on my computer. So I point IE to the file in htdoc and it comes up in the web browser

PostPosted: 30. January 2007 17:28
by Wiedmann
So I point IE to the file in htdoc

How did you do this exactly?

On XP, php files get message "Windows cannot open this

PostPosted: 31. January 2007 02:04
by nbronsert
In my browser IE or firefox, I go to "file" then "open file", then find a file in apache's htdoc's folder. I click on the file which puts it into the address bar in the web browesr, then press enter on my key board.
Thanks

PostPosted: 31. January 2007 02:09
by Wiedmann
In my browser IE or firefox, I go to "file" then "open file", then find a file in apache's htdoc's folder.

Well, you can't open a PHP file (or a HTML file which call a PHP file) with "file open" (direct filesystem access) in your browser.

You must load this file throught the server: "http://..." (in address bar)

(Read the first steps in the "readme_en.txt" from XAMPP)

On XP, php files get message "Windows cannot open this

PostPosted: 31. January 2007 04:47
by nbronsert
That is what I'm doing.
Tried Just typing the file name in the address bar and got the same message

PostPosted: 31. January 2007 09:03
by Wiedmann
That is what I'm doing.

No, you are doing:
nbronsert wrote:I go to "file" then "open file", then find a file in apache's htdoc's folder.



And I told you:
Wiedmann wrote:you can't open a PHP file with "file open"



Tried Just typing the file name in the address bar

Well, what did you typing in the address bar?

Wiedmann wrote:You must load this file throught the server: "http://..." (in address bar)

I guess it's not: "http://localhost/filename.php".

On XP, php files get message "Windows cannot open this

PostPosted: 31. January 2007 16:12
by nbronsert
No it's not
It's
http://127.0.0.1/phpinfo.php
I uninstalled xampp and reinstalled it (a couple of times)
and now I don't get that message, instead the browser just displays the unparsed code from the php page.
Now I can start looking for the answer to why php is not parsing. Xampp control states that php is running, so it must be something in the ini file.
Thanks for your time.

PostPosted: 31. January 2007 16:49
by Wiedmann
Xampp control states that php is running,

Hmm,
AFAIK the XAMPP control panel don't show you the status of PHP?

On XP, php files get message "Windows cannot open this

PostPosted: 01. February 2007 02:57
by nbronsert
Yes, the control panel shows php as running and when you click on phpinfo from the control panel, it does come up.
I am using long tags for php (<?php ?>).
I must still have some little thing wrong.
Thanks for your help