Page 1 of 1

php pages not loading

PostPosted: 22. June 2006 21:59
by stef25
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?

Me too

PostPosted: 24. June 2006 12:14
by Craigypoos
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

PostPosted: 24. June 2006 12:18
by Wiedmann
The file extension is ".php" and you open this file via "http://..."?

PostPosted: 24. June 2006 14:38
by Craigypoos
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

PostPosted: 24. June 2006 14:41
by Wiedmann
...except with IE which wouldn't open the file test.php at all

:?:

PostPosted: 24. June 2006 15:22
by Craigypoos
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

PostPosted: 24. June 2006 15:52
by Wiedmann
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?

PostPosted: 25. June 2006 09:58
by Craigypoos
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

PostPosted: 25. June 2006 12:07
by Wiedmann
Well there wasn't really a question!

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

PostPosted: 25. June 2006 15:42
by Craigypoos
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

PostPosted: 28. June 2006 09:35
by stef25
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!