Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 14th, 2004, 08:57 AM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP/Apache install issue.."blank" browser page

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.

 
Old June 14th, 2004, 08:40 PM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you show us the code for the page you are trying to view? Copy/paste the entire page, including the HTML.

Michael K. Glass
Author, Beginning PHP, Apache, MySQL Web Development
 
Old June 14th, 2004, 09:43 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check this link: http://sardgr.dyndns.org/
I provide links to all the various test PHP files I'm having issues with viewing. The first link, test.php is the only one that successfully displays data.

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.”;
?>
</BODY>
</HTML>

thanks.

 
Old June 14th, 2004, 10:32 PM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by dgr72371
 --phptest.php
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php
echo “If this works, we <i>really</i> did it!”;
?>
</BODY>
</HTML>
There nothing wrong with the programs, with the exception of the open/closing quotes in each one. You should be using standard quotes, not the stylized ones shown. Replace the echo line with:

echo "If this works, we <i>really</i> did it!";

Michael K. Glass
Author, Beginning PHP, Apache, MySQL Web Development
 
Old June 15th, 2004, 08:53 AM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old June 15th, 2004, 09:15 AM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've composed these various .php files in Notepad, so I don't know how I would have typed "stylized" quotes. I think that the reason they're "curved" is just something to do with having cut-n-pasted the text into this bulletin board. And how would I go about typing "stylized quotes" anyway? I used the shift-apostrophe key to make them in Notepad, so should't they be "standard"?
thanks.

 
Old June 15th, 2004, 11:51 AM
Authorized User
 
Join Date: Apr 2004
Location: Cincinnati, OH, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When I test your links, I get this:

test.php gives me your phpinfo fine.

phptest.php: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\FoxServ\www\phptest.php on line 7


firstprog.php: Parse error: parse error, unexpected '>' in C:\FoxServ\www\firstprog.php on line 7


moviesite.php: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\FoxServ\www\moviesite.php on line 8


movie1.php: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\FoxServ\www\movie1.php on line 7

Parse errors basically = typos, so you might want to check your code one more time.. also check in the lines above and below the line identified in the error statement. Are you getting these errors or are you just getting blank pages?







Similar Threads
Thread Thread Starter Forum Replies Last Post
table2.php in chapter 4 - blank page ?? redarrow BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 April 13th, 2009 07:27 PM
Iam not getting Apache home page in browser bvapsridhar Apache Tomcat 0 February 3rd, 2007 07:23 AM
[Php 5 MySQL 5 Apache 2 Win32]Install universalbitmapper PHP Databases 1 February 24th, 2006 04:16 AM
help! Cannot install apache tomcat 5.5.12 batken Apache Tomcat 0 December 23rd, 2005 03:07 AM
Trouble with Apache Install ftmarkle BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 4 July 22nd, 2004 04:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.