brain fried
Moderator: General Moderators
-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
brain fried
How do you fix a php script when you load the file on the web browser and you can a blank page? 
First try a "view/show" source in the browser (normally part of the View menu in IE/Moz/Netscape ... See if anything's there, maybe you just have a some funny html element that's not ending, or a endless quote. If the view/show source is blank, too then you have to check into your script to make sure its producing output.
You can always use the inefficient, but ever-popular echo "i'm here!"; method of debugging by placing that line at various places in your code and seeing if it gets outputed, etc
You can always use the inefficient, but ever-popular echo "i'm here!"; method of debugging by placing that line at various places in your code and seeing if it gets outputed, etc
-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
I look at the source before posting on here........it just contains
Code: Select all
<html><body></body></html>-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
OK, that probably means that PHP is executing, so that's a start. And it means the the short-tags thing probably isn't the problem.matthiasone wrote:I look at the source before posting on here........it just containsCode: Select all
<html><body></body></html>
It normally means that your script is executing, but not producing any output. Did you rely on register globals before?
Try adding
Code: Select all
error_reporting(E_ALL);-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
ok did that on one the scripts......got......
which I believe are referring global variable.........variable from the URL
but one of my script that works or appears to...
I have looked at the phpinfo.php.....but couldn't find globals settings to see what they are set too.
Code: Select all
Notice: Undefined variable: page in /usr/web/domains/christs-church/www/cm/prayer.php on line 4
Notice: Undefined variable: page in /usr/web/domains/christs-church/www/cm/prayer.php on line 6
Notice: Undefined variable: page in /usr/web/domains/christs-church/www/cm/prayer.php on line 8
Notice: Undefined variable: page in /usr/web/domains/christs-church/www/cm/prayer.php on line 10
Notice: Undefined variable: page in /usr/web/domains/christs-church/www/cm/prayer.php on line 12but one of my script that works or appears to...
I have looked at the phpinfo.php.....but couldn't find globals settings to see what they are set too.
-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
here is the first 13 lines of the script
Code: Select all
error_reporting(E_ALL);
require_once('db_fns.php');
if($page == "new")
prayer_new();
elseif($page == "add")
prayer_db($HTTP_POST_VARS,'n');
elseif($page == "upd")
prayer_db($HTTP_POST_VARS,'u');
elseif($page == "list")
prayer_list();
elseif($page == "edit")
prayer_edit($id);-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
OK this is the common register_globals problem. as to be expected when the 4.2.0 line is crossed.
Try adding
(I'm assuming you're using GET....)
Try adding
Code: Select all
$page = $_GET["page"];