PHP/Apache install issue.."blank" browser page dis

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

PHP/Apache install issue.."blank" browser page dis

Post by dgr72371 »

Hello,
I've just started my AMP(Apache/MySQL/PHP) education on a Win XP machine about a week ago, and have run into a roadblock with the PHP/Apache install process that I hope someone can help me resolve ASAP so I can get on to learning PHP, etc. I've tried first installing AMP separately, then, using a couple different free install packages I've found on the net (the current one is Foxserv 3.0 @ http://www.foxserv.net/portal.php). I can get everything supposedly installed correctly, the Apache server & MySQL seem to run fine and I can access my Apache-served website from the internet and local machine, but when I try to open any PHP webpage I've created (just some "hello world"-types at present), in my browser (either IE or Netscape), the page is completely blank, and when I look at the source code, I only see
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2"></HEAD>
<BODY></BODY></HTML>
or if I use Netscape, just something like <html><body></body><html>.
***I don't see any of my .php code when I use View Source in the browser, but it is there when I open the .php file in a text editor.*** I found someome on the 'net that from what they said led me to believe that because I *don't* see my .php code, that means that it's being "passed" to the PHP interpreter, but what it looks like to me is happening is that the resulting output from PHP is not being passed back to the browser for display.
Can anyone help me fix this problem?? I've been dealing with it for days now, and am getting frustrated with PHP!! :( Thanks.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

You shouldnt see your php code when you look at view source. PHP only passes output to the browser. Post your 'hello world' here and we'll see what's up!
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

Post by dgr72371 »

yes, exactly. I guess the PHP code in the HTML is being sent to the PHP interpreter, it's just not coming back to the browser and being displayed. Is it some setting in php.ini or the Apache config file or both that I'm missing?
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

can i see the code?
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

Post by dgr72371 »

Sure, will have to send it this evening when I'm at that computer.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

sounds like you have a parse error or worse... and you turned off display errors... check your error log..
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

Post by dgr72371 »

what file(s) do I need to look at to check all that you mentioned? thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

display errors and it's siblings are in php.ini (c:\windows\php.ini on windows machines, typically) and error.log (windows) or error_log (*nix), located at c:\program files\apache group\apache\logs\error.log, I think, on windows machines by default... don't remember offhand where it'd be on a *nix, other than httpd/logs/error_log or similar...
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

Post by dgr72371 »

http://sardgr.dyndns.org/
I've added to my page a link where you can download the httpd.conf and php.ini files that I'm currently using, so hopefully someone can show me what needs to be changed in them.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

i tlooks like you server is fine, you just have errors in your code. If you could post one of those scripts here, I could probably help. I can't get the scripts from your link because your server is working correctly and parsing the php files.
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

Post by dgr72371 »

Here's the source for some of them:

--phptest.php
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php
echo “If this works, we <i>really</i> did it!”;
?>
</BODY>
</HTML>

--phpinfo.php
<?php
echo phpinfo();
?>

--firstprog.php
<HTML>
<HEAD>
<TITLE>My First PHP Program</TITLE>
</HEAD>
<BODY>
<?php
echo “<h1>I’m a lumberjack.</h1>”;
echo “<h2>And I’m okay.</font>”;
?>
</BODY>
</HTML>

thanks.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

i think you have wierd quotes. what program did you write those in?
dgr72371
Forum Newbie
Posts: 8
Joined: Mon Jun 14, 2004 9:18 am

Post by dgr72371 »

Windows Notepad. BTW, I've had several other people on some other PHP bulletin boards say today that the quotes are what is causing the problem and that the code works for them when you fix that. I'll have to change then when I'm at that PC tonight. Strange thing is that I don't know how I made the "strange" quotes when I was just using Notepad...?
thanks.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Yea i'm not sure either. Maybe you have a funny keyboard?
Post Reply