Help - blank PHP

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

Help - blank PHP

Postby .chester » 02. April 2012 15:33

Hello everyone, I'm a new XAMPP user (I need to create an online store for my graduation thesis) and I can't get any PHP working for the life of me.

I'm using XAMPP 1.7.7 with Windows 7.

So I've just installed XAMPP and I tried testing it with a simple "Hello World" PHP script like the one below:

Code: Select all
<?php
 Echo "Hello, World!";
 ?>


I've saved the file as test.php, then entered http://localhost/test.php into Google Chrome and I get a blank page. When I click "View Source" I can see the PHP code.

Were there any additional settings I should have made? I've only installed XAMPP and dove straight in as I didn't see any configuration messages. The Status bit on the localhost page shows everything working in order (Apache, MySQL, PHP).

I'm really at a loss, especially since this is the first time I've tried monkeying around with PHP (well, the second time, actually, since I couldn't get it to work when I had installed Apache and PHP separately - I had the same blank screen issue). Anyone have any idea what's going on? I'm 99% sure that it's something trivial that I'm overlooking and I'm a dum-dum.
.chester
 
Posts: 2
Joined: 02. April 2012 15:24
Operating System: Windows 7

Re: Help - blank PHP

Postby Altrea » 02. April 2012 18:10

Hi chester,

if the orange XAMPP Administration page ( http://localhost/xampp/ ) is displaying it's content we can assume that Apache and PHP are running well and that the issue is somewhere related to your code.

Which editor do you use to create your .php files?
Can you see some information about the encoding of the file in your editor?
Where do you save your .php file?

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Help - blank PHP

Postby .chester » 02. April 2012 18:56

Obviously, the thing that solved it is the one I never tried, that is using another PHP editor. I was using EngInSite 3.4.2 so I switched to Bluefish 2.2. which is the latest version and lo and behold!, my PHP scripts have shown up in all their rudimentary glory.

Thanks for taking the time to help me, though, your question about which PHP editor I was using made me try a different one. Cheers!
.chester
 
Posts: 2
Joined: 02. April 2012 15:24
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 157 guests