Page 1 of 1

Help - blank PHP

PostPosted: 02. April 2012 15:33
by .chester
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.

Re: Help - blank PHP

PostPosted: 02. April 2012 18:10
by Altrea
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

Re: Help - blank PHP

PostPosted: 02. April 2012 18:56
by .chester
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!