Home > Archive > PHP Language > July 2004 > Page doesn't load first time
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Page doesn't load first time
|
|
|
| Hello all. I am having a problem with my PHP page. The first time you
start the browser and try to load the page, all that comes back is a
blank page. In Opera when I view the source I get nothing and in IE I
get
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
Then, if you hit the refresh button on the browser the pages with load
and everything will work fine as lonog as you leave the browser up.
Anyone have any idea why this is happening?
Here is the first page.....
<?php
session_start();
global $logged_in;
$logged_in = false;
include("login.php");
include ('meta.html');
include ('header.html');
displayLogin();
include ('footer.html');
flush();
?>
| |
| Michael Vilain 2004-07-22, 8:55 pm |
| In article <b79945b7.0407220743.3bc85222@posting.google.com>,
bobif@adelphia.net (Bob) wrote:
> Hello all. I am having a problem with my PHP page. The first time you
> start the browser and try to load the page, all that comes back is a
> blank page. In Opera when I view the source I get nothing and in IE I
> get
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>
>
> Then, if you hit the refresh button on the browser the pages with load
> and everything will work fine as lonog as you leave the browser up.
>
> Anyone have any idea why this is happening?
>
>
> Here is the first page.....
>
> <?php
> session_start();
> global $logged_in;
> $logged_in = false;
> include("login.php");
>
> include ('meta.html');
> include ('header.html');
>
> displayLogin();
>
> include ('footer.html');
> flush();
> ?>
what does the web server's logs show? any errors in the error_log file?
What is the server actually sending to your browser? Any strange result
codes?
--
DeeDee, don't press that button! DeeDee! NO! Dee...
| |
| Colin McKinnon 2004-07-23, 8:56 am |
| Bob wrote:
> Hello all. I am having a problem with my PHP page. The first time you
> start the browser and try to load the page, all that comes back is a
> blank page.
>
<snip>
> Anyone have any idea why this is happening?
>
Use a command line tool to get the page - that way you'll get a better
picture of any redirections - e.g. curl.
Why not try:
<?php
$log="started\n";
session_start();
print $log."session started\n";
// if you've got more header directives you want to test,
// keep appending to $log instead of printing immediately
global $logged_in;
$logged_in = false;
print $log;
include("login.php");
print "included login.php";
include ('meta.html');
include ('header.html');
print "included meta & header...\n";
....
HTH
C.
| |
|
| if I use the command line PHP this is what I get back
X-Powered-By: PHP/4.2.2
Set-Cookie: PHPSESSID=6e104abfd7b17920ad14c9965c69bd
41; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html
and then the command prompt......
Colin McKinnon <colin.deletethis@andthis.mms3.com> wrote in message news:<cdqrpf$oo9$1$830fa795@news.demon.co.uk>...
> Use a command line tool to get the page - that way you'll get a better
> picture of any redirections - e.g. curl.
| |
|
|
There is nothing in any of the logs pertaining to HTTPD and I forced a
PHP log but it also has nothing. In Opera when I view the soure I get
nothing in IE, the view source is nothing.
The only interesting thing is that the first time I view index.php the
access_log file puts this line in
192.168.0.1 - - [23/Jul/2004:17:47:18 -0400] "GET /index.php
HTTP/1.1" 200 5
which leads me to believe that httpd send 5 bytes back cuase after the
refresh is hit the log shows
192.168.0.1 - - [23/Jul/2004:17:48:06 -0400] "GET / HTTP/1.1" 304 -
On Thu, 22 Jul 2004 13:53:54 -0700, "Michael Vilain
<vilain@spamcop.net>" wrote:
>what does the web server's logs show? any errors in the error_log file?
>What is the server actually sending to your browser? Any strange result
>codes?
| |
|
|
There is nothing in any of the logs pertaining to HTTPD and I forced a
PHP log but it also has nothing. In Opera when I view the soure I get
nothing in IE, the view source is nothing.
The only interesting thing is that the first time I view index.php the
access_log file puts this line in
192.168.0.1 - - [23/Jul/2004:17:47:18 -0400] "GET /index.php
HTTP/1.1" 200 5
which leads me to believe that httpd send 5 bytes back cuase after the
refresh is hit the log shows
192.168.0.1 - - [23/Jul/2004:17:48:06 -0400] "GET / HTTP/1.1" 304 -
On Thu, 22 Jul 2004 13:53:54 -0700, "Michael Vilain
<vilain@spamcop.net>" wrote:
>what does the web server's logs show? any errors in the error_log file?
>What is the server actually sending to your browser? Any strange result
>codes?
| |
|
| I tried something liek you suggested. I opened a log file and wrote
each debug line into the file and then closed it at the end. EVERY
debug line appeared in the file and I still got the blank screen and
blank command line display. Here is the new page:
<?php
$riffd = fopen("/tmp/RIF.log", "w");
fputs ($riffd, "starting.....\n");
session_start();
fputs ($riffd, "after session_start.....\n");
$_SESSION['logged_in'] = false;
global $logged_in;
$logged_in = false;
include("login.php");
include ('meta.html');
include ('header.html');
displayLogin();
include ('footer.html');
flush();
fputs ($riffd, "done.....\n");
fclose (logfd);
?>
and after the run, here is the log
starting.....
after session_start.....
done.....
Colin McKinnon <colin.deletethis@andthis.mms3.com> wrote in message news:<cdqrpf$oo9$1$830fa795@news.demon.co.uk>...
> Why not try:
> <?php
> $log="started\n";
> session_start();
> print $log."session started\n";
> // if you've got more header directives you want to test,
> // keep appending to $log instead of printing immediately
> global $logged_in;
> $logged_in = false;
> print $log;
> include("login.php");
>
> print "included login.php";
> include ('meta.html');
> include ('header.html');
> print "included meta & header...\n";
|
|
|
|
|