Page 1 of 1

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

Posted: Mon Jun 14, 2004 9:18 am
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.

Posted: Mon Jun 14, 2004 9:44 am
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!

Posted: Mon Jun 14, 2004 10:14 am
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?

Posted: Mon Jun 14, 2004 10:33 am
by magicrobotmonkey
can i see the code?

Posted: Mon Jun 14, 2004 10:38 am
by dgr72371
Sure, will have to send it this evening when I'm at that computer.

Posted: Mon Jun 14, 2004 10:56 am
by feyd
sounds like you have a parse error or worse... and you turned off display errors... check your error log..

Posted: Mon Jun 14, 2004 11:28 am
by dgr72371
what file(s) do I need to look at to check all that you mentioned? thanks.

Posted: Mon Jun 14, 2004 11:46 am
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...

Posted: Tue Jun 15, 2004 8:54 am
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.

Posted: Tue Jun 15, 2004 9:42 am
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.

Posted: Tue Jun 15, 2004 11:56 am
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.

Posted: Tue Jun 15, 2004 12:09 pm
by magicrobotmonkey
i think you have wierd quotes. what program did you write those in?

Posted: Tue Jun 15, 2004 12:14 pm
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.

Posted: Tue Jun 15, 2004 12:20 pm
by magicrobotmonkey
Yea i'm not sure either. Maybe you have a funny keyboard?