Problem with Xampp and a specific PHP function

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

Problem with Xampp and a specific PHP function

Postby omnia » 11. July 2009 10:01

Hello people

I am a begginner in PHP, so these days I'm trying and modifying some examples from w3schools.com.
I installed XAMPP, and all the .php examples I used ,ran in my browser with no problems at all.

But NOW I do have a problem.

The example that causes the problem is the following:

form1.php
Code: Select all
<html>
<body>

<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

</body>
</html>



welcome.php
Code: Select all
<html>
<body>

Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.

</body>
</html>



The forst code runs OK, but when it calls the file "welcome.php" a login is asked for DAV-upload to http://localhost.
I use username wampp and password xampp and it brings me error 500.

In the error log I can see the following:
The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav

So, does anyone know what causes this, or how can I fix it?

PS: Oh I forgot. I tried the previous examples with $_GET and I had no problems at all!
Time waits for no man
User avatar
omnia
 
Posts: 2
Joined: 11. July 2009 09:50
Location: Greece

Re: Problem with Xampp and a specific PHP function

Postby Wiedmann » 11. July 2009 10:14

I am a begginner in PHP, so these days I'm trying and modifying some examples from w3schools.com. ... a login is asked for DAV-upload

Why did you have your files in the webdav directory and not in htdocs?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Problem with Xampp and a specific PHP function

Postby omnia » 11. July 2009 10:19

Oh my god I feel so dumb.... :P

THANKS A LOT! :mrgreen: It works!
Time waits for no man
User avatar
omnia
 
Posts: 2
Joined: 11. July 2009 09:50
Location: Greece


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 63 guests