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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby nbronsert » 29. January 2007 06:30

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
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 29. January 2007 13:47

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?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 30. January 2007 06:30

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
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 30. January 2007 06:58

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?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 30. January 2007 07:26

<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.
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 30. January 2007 07:31

Wiedmann wrote:How did you open this html page?

:?:
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 30. January 2007 16:07

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
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 30. January 2007 17:28

So I point IE to the file in htdoc

How did you do this exactly?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 31. January 2007 02:04

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
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 31. January 2007 02:09

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)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 31. January 2007 04:47

That is what I'm doing.
Tried Just typing the file name in the address bar and got the same message
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 31. January 2007 09:03

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".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 31. January 2007 16:12

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.
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Postby Wiedmann » 31. January 2007 16:49

Xampp control states that php is running,

Hmm,
AFAIK the XAMPP control panel don't show you the status of PHP?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby nbronsert » 01. February 2007 02:57

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
nbronsert
 
Posts: 9
Joined: 29. January 2007 06:00

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 136 guests