Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Blank Pages


I have a web site that uses session variables and cookies. In-house and at
most clients the web sites functions great, exactly how it should behave.

However, at a few sites, the users will get the login page and as soon as
they submit, they get served a page with just the banner image on top and
blank underneath it. The page is two frames, top and bottom with the banner
image on the top. When viewing the source, the bottom page contains
<html></htmlonly. Looking at my PHP scripts, there are no scripts that
could generate that kind of a blank page, it would at least have a <headin
it.

So far what I've found that's different between the sites that work and the
one that doesn't is as follows.

The machine name is SQL1 with an IP address of 10.1.1.100. On this machine
is a web site set up in IIS with an IP address of 10.1.1.150. All of the
users at this site use a url of http://statuspage.cosite.com to get into the
site.

If you use a URL of http://SQL1/statuspage/userlogin.php - everything works
fine.
If you use a URL of http://10.1.1.100/statuspage/userlogin.php - everything
works fine.
If you use a URL of http://statuspage.cosite.com - They get the blank page
after the login page.

I'm thinking it has something to do with domains and cookies but I'm not
sure.

My cookies are set as:

setcookie("UserKey", $UK,$expiretime);

setcookie("PHPSESSID",$_COOKIE["PHPSESSID"],$expiretime);

$expiretime is a variable containing the expiration time of the cookie




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
PHP 4 W/ IIS 6 = Blank PHP Pages
I've installed PHP4 in isapi mode on Win2k3/IIS6. When I try to access a PHP page, it comes back blank. The odd part is that if I just a test page with phpinfo() in it, I get results.

I've tried everything and spent the last 2 hours googling for a solution. Any ideas on why this would be happening?

Blank Pages Must Die.......
The code below i started working on today after i finished typing it out i tested it and found that i got a blank screen after i pressed Load Alchemy..... All tables and stuff are already set up so that shouldnt be causing an error im just dumbfounded why i keep getting blank pages in everything i do.. Code:

Blank Pages
I have been getting nothing but blank pages for a while now and its not showing me the errors on the page so I was wonding if the blank page its self means something or there is an error i should be looking for. I am using this to show me the errors on the php page :

<?php
ini_set('display_errors', '15');
error_reporting(E_ALL);
?>

Blank Pages
Is there any way to make the page show how far the php file got before it got a syntax error and makes a white page because I have some larger files that do this same thing and I dont know why. I have the code that shows you what is wrong with the web page but it still shows up white here is the code:

Blank Pages When Connecting From NT Network
When browsing to my online PHP pages all PHP content
is gone when connecting to the net from within an
Windows NT network.

White (blank) Web Pages With PHP3
Does anyone know why certain php files that work fine on my local win32 system,
(win98 with Apache, MySQL and PHP3) when uploaded to my ISP's web server running FreeBSD, do not work ? A blank web page is returned, no error msgs)

This particular problem exists with a search engine script downloaded from www.dirtdobber.net. The script works like a charm on my local system. Could it be a memory allocation setup problem with MySQL and PHP3 on my ISP's systems ?

Browser Showing Blank Pages With SSL & PHP4
I have just set up my apache webserver with PHP4, openssl, modssl,
mysql etc. Everything works fine on the non ssl side but when I try to
open a php page on the ssl side the browser displays an empty page. I
have tried both IE 6 and Firefox. I can display HTML pages, images etc
from the SSL side I just cannot display anything with the PHP
extension. I have set a few of these servers up with the same config
but I have never come across this before.

Blank Pages Show Up With Completed Code
I am a Information Technology and I am currently taking PHP as one of my classes. My problem now is that when I create a page and try to view it with Apache, it shows up as a blank page.

Avioding Expired Pages, & Carrying Data Accross Multiple Form Pages
I have a checkout/order form that consists of 6 pages, all PHP. The are linked to one another, like, after the user finishes page 1, they proceed to page 2, etc... The first two pages are submitted by a GET link, so those are not in my question. The next 4 are submitted using a <form>. Throughout all of the pages, i would probably have about 25-30 variables, things that the user has to fill out. I have two questions,

1. What would be the best way for me to keep track of all the data moving throughout the pages, like storing it from page 4, and i still need to access it on page 6.
2. I don't know if anyone could help me here, but does anyone know of a way to code around those ugly "page expired" pages, because of a submitted form. If a user needs to go back, which most likely they will, is there some sort of way for me to skip the expired page?

Converting Html Pages Into Dynamic Pages
I built a website in html, using Dreamweaver. I need to have a database built within these pages and the person who is going to do it told me that they will have to convert all my html pages into dynamic pages (php).

Is it complicated to do this or do I just have to save my pages in php instead of html in Dreamweaver ?

Sending People To Specific Pages That Are Coming From Specific Pages...
I want to show some specific pages to people that comes to my site from
specific urls, I know the variable $_SERVER['HTTP_REFERER'] will be
used but how?

For ex if the visitor comes from a site that is like:

I want to send this person a specific.php . I used below code but not
worked:

<?php

if($_SERVER['HTTP_REFERER'] == "www.cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "www2.cominghost.com"){

// Specific page html goes here

}
else
{
header("Location: index.php");
}
?>

This code not worked for some cases like if the visitor comes from
http://www.cominghost.com/account/targeturl.php or
http://cominghost.com/account/targeturl.php Ok I know the if statement
not working but How?

OOP Page = Blank
OOP – page does not display

I need your keen eyes to figure out what is happening here

I have an OOP script that works well on two local test servers
One runs a slightly older PHP, the other one the last PHP just before release of PHP5, in both cases it runs with Reg Glob off, as it should
How is it built:

One) A class that reads a template, sets values, and sends info to a browser.
That class I have used many times and I know it does not cause any trouble

Two) a templates
Using the following
<!--{PROD_1}--> no problems here!

Three) the main page
<<
require_once ("../DB conn etc..."); // Include the configuration file.
require_once ("../classes/the class I mentioned in “One”.class"); // Include the class.
$id=1;
$page = again the “One” class ("../templates/main_template_products.inc.php"); // Create an instance.
$content_1 .= ''
include "../includes/prod_1.inc.php";
$page->SetParameter("PROD_1", $content_1);

and my include file
<?
$conn = db_connect();

$sql= "select prod_1 from XXXXX where id=$id";
$result = mysql_query($sql,$conn);

while ($new_content=mysql_fetch_array($result) ){
$content_1.= $new_content[prod_1];
}
?>

I am pretty sure that the scripts has no fault. It works on another production server.

So what can go wrong. Up to the point of getting a full blank page that in “view source” shows 100% of nothing! I know the DB conn fine since I can edit it via my CMS using the same db conn function.

Will that be a server setting? It runs with reg glob on and safe mode on.

Drawing A Blank...
I was wondering what the most efficient way to extend a session lifetime was? Do I use ini_set() to change the session lifetime or is there a specific session function that handles this... Checked PHP.net and I am drawing a blank..

PHP Blank Page.
I posted earlier about this, a blank php page. I've enabled logging
ALL in the php.ini, but nothing. If I change the name of the db in
the include file, I get an error message, so I guess this means it's
connecting to the mysql db. I've included the first couple lines of
code for this page:

index.php
<?php
session_start();
require_once('inc/db_config.inc.php');
$conn = db_connect();
$sqlsu = "SELECT * FROM subjects ORDER BY ID";
$ressu = mysql_query($sqlsu, $conn);
if (mysql_num_rows($ressu)) {
while ($qry = mysql_fetch_array($ressu)) {
$cat = stripSlashes($qry['cat']);
$resns = mysql_query("SELECT * FROM questions WHERE test LIKE '$cat'",
$conn);
$numcat = mysql_num_rows($resns);

inc/db_config.inc.php

function db_connect()
{
$result = @mysql_pconnect('localhost', 'root', 'password);
if (!$result)
return false;
if (!@mysql_select_db('quiz'))
return false;

return $result;
}
?>

Getting A Blank Page?
When I try to run a PHP script of mine, I get a totally blank page. I've tried to put HTML at the very beginning of it, but even that does not show up. I don't see anything wrong with it either. Basically there are two header requires, and then some code that reads a database, and then a few more requires.

My Website Has Gone Blank ..
I started putting some mysql refrences and then the screen went blank with no source code...

Blank Page?
I hve index.php setting two session variables when you login. But when i put session_start(); on any other page to get the variables, it leaves me with a blank page. What could be causing this?

Blank Page
I tested this php form, and it worked on 2 out of three computers, all of which were on different networks. The one that didn't work stalled after I hit submit . . . all I got was a blank page . . .  no error messages or anything. This happened whether it was on a PC or Mac, in Firefox, or IE. Any ideas what could be causing it? Code:

Blank Table
I ran this code and all I get is 1 row displayed containing the text and checkbox but none of the database data. Code:

Blank Page / Timeout
My website consumes an XML web service using SOAP to handle the requests and responses. If the response is larger than a certain size, i get nothing back and my browser shows a blank page with nothing in the source code. I do get a result if the response is smaller so the request code seems to be working.

My php.ini files includes:

max_execution_time = 300
max_input_time = 300
memory_limit = 128M

Error Reporting is E_ALL - i dont even get any error messages when it does fall over.

Are there any other settings that i should try to let the server handle a larger response?

Deny Content To A Blank UA?
I am curious if there is a way to negate sending clientside code to a request by a user with a blank or dash useragent? Also would there be a way to enact an Apache code such as 403 if the client failed this requirement?

Apache is failing to 403 except on direct requests and there has been no working example of a work around for this. Therefor it is my new goal to use all serverside methods of denying content to spammers. Clientside code is obviously useless as the content is already served.

Prevent Blank Data
How do I prevent blank data from being entered into a table?

For instance, the user fills out a form, but if a field is left blank, then
the entire entry won't be filled in. This isn't necessarily a form
validation thing, just that if all the fields are filled, then proceed to
enter data, if not then don't.

Multiple Blank Entries?
When I go to my secondary page of results after I fill info out on a form on
the first, I get 3 blank entries automatically inserted into the mysql
tables. This second form has these blank entries printing up each time even
if I go in to the second page w/o filling out any info on the first. Is
there a way I could prevent these blank entries from being automatically
entered? Like some code that says that if something is blank then not to
have it entered into the tables? or something easier?

SquirrelMail + Qmail = Blank 'From:'
Whenever anyone sends an email from squirrelmail, the 'From:' field is always blank. This just started happening when I switched from courier to qmail for the SMTP server.

I had a similar issue with a script of mine that I was using to send out an email, and I found that I was able to resolve it by removing extraneous '
' from the headers. (thanks to this forum of course)

I have scoured the squirellmail source for the possible offending '
' but have come up empty as the sendmessge function seems to be hiding from me.

Debugging Blank PHP Page.
How can I debug a blank PHP page? I've turned on all logging in my
php.ini, bu the page just turns blank.

Blank Page Issue
In my website i am facing a issue now . all my forum php pages its showing blank page but other php files its running fine and i am using vb bullitn . do any one have idea why its coming.

Uploads, $_HTTP_POST_FILES Is Blank
I'm trying out a simple file upload at the moment, I have a couple of problems:

1.) I have PHP version 4.1.1, yet it does not seem to recognise the $_FILES, but $HTTP_POST_FILES seems to work partly. The config file is as default so $_FILES should be enabled.

2.) $_HTTP_POST_FILES ['my_input_name']['name']
works OK, I get the directory etc on the local machine OK, but
$HTTP_POST_FILES['my_input_name']['tmp_name']
doesn't work, it's blank.

3.) Can I copy uploaded files to the htdocs/pics directory on my Apache web server running on XP or can I put them anywhere on the machine?

Blank Page Is Coming..
I have a problem installing php5 in windows xp. I am getting a blank
page while i process the file.
if i type localhost the iis page is loading. i created a virtual
directory 'php' if i type http://localhost/php means it is showing all
the files in the directory but if i click the file a blank page is
coming.

can anybody give me a solution to resolve this.

Database Blank Rows
i made the following script and all the conditions and structure is right, i do no get errors either. but when you enter a category name andm press enter it says it added it but the database only has an extra blank row in it rather than what you entered? PHP Code:

Finding A Blank Line
I need to be able to parse through a file line by line and find a blank line. In my loop that goes through the file line by line I've tried:

if (preg_match ("", $line)){
echo "this is a blank line ";}

but it doesnt seem to work. Any ideas?

PHP Page Is Blank For Newbie
phpinfo.php works just fine . php intro pages work just fine too
When the code below is posted the page appears blank does some one
have any ideas why a page will appear blank.

Random Blank Submissions?
I wanted to know if anyone else gets random blank submissions every now and then from forms or shopping cart systems or anything like that? I have encountered this a few times. It is especially troubling when it shouldn't be possible. For example on a shopping cart i built it requires the user to login before checkout.

I have only recieved 1 blank order from that system, but it still troubles me to see its possible. Usually the system will tell the person's name in the email that is sent to me, and that requires a login. So i don't see how i could get a blank email.
I was thinking it may be a random search engine crawler going through the pages...

Using File() With Blank Lines
Let me admit right up front this is my first foray into php. I'm trying
to simply use a small data file to populate a page. I'm using the
file() function but I want my "data records" to be seperated by a double

My problem is I can't seem to compare a line to anything. My first
problem was determining the end of a data block, finding the double
newline. But in frustration, I just tried to compare a line to a known
value and I still can't compare strings correctly.

Here's a sample data file:

Blank Lines In Files
I am using PHP to read a file and I was just using fgets to get my line and using a for-loop until the line was EOF, then I would break out of my loop. I noticed this has a problem when the file I read from has blank lines at the end. I have tried to ignore these blank lines at the end of the file but I cannot get them to be ignored. My code looks like: Code:

Need To Flush Before Sleep But I'm Blank.
I'm new to php and am converting a bunch of asp pages to php.

Current problem :

I am using a Submit button on a form to POST ( send the database variables )
to a php page that will send a personalised e-mail to each client.

On the php page,
I am looping through a database,
compiling a message ( html format ),
and mailing the message to my client.

After the mail has been sent, I need to wait for 4 seconds before continuing
with the next database record.

I am using this code after the mail has been sent :

echo "Mail Sent to : " . $row['CliName'];
ob_flush();
flush();
sleep(4);

Problem is, that nothing appears after I click on the Submit button on the
first page's form ( the first page just remains on the screen ). Once the
database has been looped, the entire (correct) output appears on my screen -
but I need to see some sort of progress as it works it's way through the
database.



Blank Submission Code
on my site i allow multiple files to be uploaded at once , but was wanting to put in some code so that if a black submission (no photos selected) was submitted the code would spit an error and exit Code:

Displaying Just A Blank Page??
I have commented out a lot of my code and have realised that the code below is what the problem is. I have placed ini_set('display_errors', 'on');
error_reporting(E_ALL);  at the very top of the page. No errors are displaying. However I can't see what the problem could be. Code:

When I Run My Code-output Is Blank?
i have written this code where i get teh xml file from ups servers,parse it and then insert the values in Database from the xml array which i get along the way.But when i run the code... i get a blank screen...it doesnt attempt to contact server...dont know what is must be wrong.looks like its not initiating the init fucntion.any ideas?
here is the code:

Deleting Blank Rows
I have some rows in my mysql table that have blank fields as part numbers. I want to delete all of the rows that have blank part numbers.

would it be like:

delete from table where partnumber = '0';

PHP Forms Completely Blank
I wonder if anyone can help me out. I am a newby and have bought "PHP5
in easy steps" to work through. One project is to have an email form and
responder built into one page. The form simply asks for a username,
email address and comment. It validates to make sure all fields are
filled in, checks the integrity of the email address and then posts it...

Blank Page With [object] On It
I'm using a popup window to INSERT data into a dbase. I pass two variables to the popup, the problem the I'm having is the when I pass the two variable the opener turns blank with an [object] on it with one of the variables on the address bar and the popup with the other. What I want is the the opener not to go blank and the two variable pass to the popup. The code work perfect in macs safari but not in microsoft explorer. Here's the code:

Included Variables Are All Blank.
This is the first part of myblog.php, which is the page you see in the browser.

<?php 
require("/home/www/htdocs/master.php"); //functions are in here

$u = "test"; //username
$htitle = "Test blog!"; //for <title>

//includes
dbcon(); //connect to database
blog($u);

// START PAGE
echo $welcomemessage;Functions are in master.php.
It calls function dbcon, which logs me into MySQL and selects the database.
It calls function blog:
function blog($u) {
//not using $u for anything yet.
require($path."blog/vars.php");
require($path."blog/head.php");
}Vars defines stuff needed for the blog, Head is the header, with <html>, <head>, etc.

$welcomemessage is defined in vars.php, but it doesn't show anything when I echo it in myblog.php. I went into vars.php and made it echo in there, and it worked, so it is defined correctly and the file is included, but for some reason the variable goes blank by the time I get back to myblog.php. It's the same with all the arrays I defined in there too.

Deleting Blank Lines
Does anybody know of a script that will delete all the line breaks/blank lines in all my PHP scripts automatically... or how i could go about making one / easily

Fwrite Txt File Blank.
When you do this:

$file = fopen("board.txt", "w");
$write = fwrite($file, "");
fclose($file);
if ($write == true) {echo "true";}

if what you write into the txt file is blank, it will return false despite the txt file has been cleared. Is there anyways to make this return true?

Blank Emails Using Mail()
I've made an newsletter mailing system which should sent newsletters to my website's members using php mail function. It gets the mail data from an html file, the html file is generated using MS word(save as html). The mail is sent in Japanese Language(Shift_Jis). The html file is HUGE! 150 kb each, there are 5 such html files,
the script gets email from database and sends data to the users.

Problem is when the cron is executed i'm getting complains of blank mails the subject is okay but the body is blank. I tested the same function using a for loop sending me 25 mails, all mails were fine but the next day when cron was executed i also recieved a blank mail. i checked the message source in outlook express the last line is:

Content-Type: text/html; charset=shift_jis

which is of the header.

Every time it sends a mail, i use a function to read the html file and return the data, is this slowing down the script and causing problems?

The word generated html files have some headers of their own and i get an error saying "security settings may prohibit active x to run on this page , this page may not be displayed correctly":

Whenever i test the same function it works fine but in actual execution blank mails are sent!

Validation - Checking For Blank Spaces
I want to check for blank spaces in an input box. Here is the code I'm working with but I'm not sure of the correct syntax:

<?
if ($Location == " ")
{
echo "<p>The filename contains invalid characters (blank spaces)</p>";
die;}
?>

I think I need to replace == (equals) with contains.. but I don't know the syntax for that.

Deleting A Blank At The Beginning Of The Value Of A Parameter
I've got a parameter with a value which sometimes starts with a blank. How can I delete this blank in the value?

Some Receiving Blank Emails With Php Mail()
When sending a e-mailing with php's mail() function some receive my mail well, while others just get a blank email.

I've noticed in my outlook that in the properties of that mail there's the following line:

Received: (from nobody@localhost)

Could this be the problem? I think it's possible that some mailservers see this as spam. But where do I change this settings. Because in the mailfunction I've put a real emailadress.

Deleting Blank Entries From Array?
The resulting arrays that i get from my select statements always seem to have some blank entries, in addition to the correct ones. It is rather odd, is there any way i can scan through it and delete these blank entries? Here is the print_r of the arrays. PHP Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved