php pages not loading

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

php pages not loading

Postby stef25 » 22. June 2006 21:59

i installed xampp which seems to be working since localhost loads fine and all the demos do too

when i add my own hello world php page in the htdocs directory and try to open that in FF, i just get a blank page

anyone know what causes this, did i forget to config something?
stef25
 
Posts: 11
Joined: 13. January 2006 11:00

Me too

Postby Craigypoos » 24. June 2006 12:14

I think I am having the same problem. I even tried encasing my php inside some html like this:

<html>
<head>
</head>
<body>
<p>This is above the php</p>
<?php
$name = "Craig";
echo "Hello, $name!\n";
?>
<p>This is below the php</p>
</body>
</html>

... and I can see the two <p> tags but blank inbetween.

Any help would be gratefully rec'd.

Craig
Craigypoos
 
Posts: 5
Joined: 24. June 2006 12:02

Postby Wiedmann » 24. June 2006 12:18

The file extension is ".php" and you open this file via "http://..."?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Craigypoos » 24. June 2006 14:38

I tried both test.php and test.html file extensions with exactly the same bit of code and both yeilded excatly the same result when I try opening the file...

This is aove the php
<<blank space>>
This is below the php

...except with IE which wouldn't open the file test.php at all but would open test.html. However, same result with test.html as with netscape.

I've got a sneaky feeling that something is missing or wrong in my httpd.conf file maybe? (I spent days trying to install apache and php on my pc separately before stumbling across xampp!)

Craig
Craigypoos
 
Posts: 5
Joined: 24. June 2006 12:02

Postby Wiedmann » 24. June 2006 14:41

...except with IE which wouldn't open the file test.php at all

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

Postby Craigypoos » 24. June 2006 15:22

Wiedmann wrote:
...except with IE which wouldn't open the file test.php at all

:?:


I think this may be a problem unrelated to php or apache. What happens is it kickstarts dreamweaver which I think must be set as the default editor for php files. I'm not so worried about this, but more about the blank space when viewing the files through other browsers.

Thanks for the help so far. I hope someone out there can help get this problem resolved.

Craig
Craigypoos
 
Posts: 5
Joined: 24. June 2006 12:02

Postby Wiedmann » 24. June 2006 15:52

What happens is it kickstarts dreamweaver which I think must be set as the default editor for php files.

Sorry, but you read my question completely?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Craigypoos » 25. June 2006 09:58

Wiedmann wrote:
What happens is it kickstarts dreamweaver which I think must be set as the default editor for php files.

Sorry, but you read my question completely?


Well there wasn't really a question! Just a yellow disc with a question mark inside. So I took it to mean that you didn't understand what I meant.

Anyway, back on topic...

I'm having trouble with getting php to work. When I make a simple "hello World" kind of script and then view it through my browser, all I see is blank space where the php bit should be. When I try opening the file in nestcape it opens but I get blank space. When I try opening the file using Internet Explorer, it fails to open but instead opens itself in Dreamweaver. (I think this problem may be something else but I'm not sure.) But there is most definitely a problem with the actual running of the php scripting.

History: Tried for days to install Apache 2.2 and PHP (5.14 and then 5.0.58 when I learnt that 5.14 doesn't work with Apache 2.2!) as separate entities and get them to work together. The I stumbled across advice saying it was much easier to install XAMPP. Got it downloaded and installed in 20 minutes and everything seemed to be okay. I can view all the XAMPP pages including the biorhythm graphs and stuff. But when I write my own test script and place it in htdocs folder it just doesn't work.

Please help! Pretty please!

Craig
Craigypoos
 
Posts: 5
Joined: 24. June 2006 12:02

Postby Wiedmann » 25. June 2006 12:07

Well there wasn't really a question!

Wiedmann wrote:The file extension is ".php" and you open this file via "http://..."?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Craigypoos » 25. June 2006 15:42

Wiedmann wrote:
Well there wasn't really a question!

Wiedmann wrote:The file extension is ".php" and you open this file via "http://..."?


Aaaah! Please excuse my previous stupidity. I understand what you mean now. I typed "http://localhost/test.php" into the URL bar on my browser and it works a treat! Yay. (Previously I had been clicking "open file" in my browser and then browsing to the file location.) Many thanks again for you perseverance!

Don't suppose you fancy telling me (in relative laymans terms) why this works...

Craig
Craigypoos
 
Posts: 5
Joined: 24. June 2006 12:02

Postby stef25 » 28. June 2006 09:35

when i enter the url it works. drag and drop doesnt. same problem on IIS with internet explorer

it could be a good idea to somehow mention this in the readme file cause i spent hours trying to figure this out

anyway, xampp is running and its great!
stef25
 
Posts: 11
Joined: 13. January 2006 11:00


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests