Jump to content

apache file not found error... not what it seems...


timtekk

Recommended Posts

Hello. I've been running php 5.3.3 and apache 2.2.1.7 for a few weeks now and learning from a book I purchased. I've been writing code for a while now with no problems.

 

Today I created a new directory in my www folder called CH2 (for chapter 2 in my book) and copied the sample code from the CD that came with the book, into this folder. When I execute php files from the browser from this new folder, they do not process. I see in my apache log this error:

 

[Wed Jan 05 11:00:39 2011] [error] [client 127.0.0.1] File does not exist: C:/Dev, referer: http://localhost/ch2

 

I know 'file not found' sounds like a simple issue, but the thing is, I don't know what c:/Dev is... that folder does not exist on my C:\ drive at all. I don't know why it is looking there and what it is looking for.

 

All of my other scripts that I have written in the past weeks work just fine, I have no problems with them.

 

I would appreciate any help with this, thank you.

Hey Jake, yes I did install these items using WAMP.

 

Honestly all of the php files in the ch2 folder are not working, here is an example of one of them:

 

<html>

<head>

<title>Three Plus Five</title>

</head>

<body>

<h1>Three Plus Five</h1>

<h3>Demonstrates use of numeric variables</h3>

 

<?

$x = 3;

$y = 5;

 

print "$x + $y = ";

print $x + $y;

print "<br><br>";

 

print "$x - $y = ";

print $x - $y;

print "<br><br>";

 

print "$x * $y = ";

print $x * $y;

print "<br><br>";

 

print "$x / $y = ";

print $x / $y;

print "<br><br>";

 

?>

 

 

</body>

</html>

 

 

Thanks.

Jake, when I click the php page, it displays all of the code in the browser, basically as though the browser is not processing the code from the php file. I see all of the variables as if I was looking at the code itself. Here is exactly what I see in the browser:

 

Three Plus Five

Demonstrates use of numeric variables

 

"; print "$x - $y = "; print $x - $y; print "

 

"; print "$x * $y = "; print $x * $y; print "

 

"; print "$x / $y = "; print $x / $y; print "

 

"; ?>

 

As far as htdocs, I was under the impression that will WAMP all of my pages should be in \wamp\www folder... ? Could I be wrong?

It's just strange, as I have all my other code in c:\wamp\www\my stuff and those items work. My book examples are in c:\wamp\www\my stuff\ch2 and those items don't work.

 

I even tried putting the ch2 items in c:\wamp\www\ and they still don't work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.