ASPit - Totally ASP
 

Go Back   PHPit Forums > General PHP > Advanced Topics
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-05-2006, 11:28 PM   #1
Craige
Ambitious Member
 
Join Date: Mar 2006
Location: Ont. Canada
Posts: 56
Send a message via AIM to Craige Send a message via MSN to Craige
Default No output.

What would cause a php script not to output? I was working on some code, and it was giving throwing logic errors in my face. Turned out, that I was uploading from the wrong directory. I was uploading old scripts with old include paths, so things just wernt happening.

But now, I got the right files uploaded, and they won't output anything. I mean nothing. I commented out everything but the top line, which I put a echo statement on, and it won't output. Although it seems pointless, I will post the page code here:

PHP Code:

echo "test"/*
$start = microtime();
try  {
  if ( !include $_SERVER['DOCUMENT_ROOT'] . '/../base.php' )  throw new exception ('Unable to load  page class.', 0.1);

  $pageHandle = Page::instalize();
}
catch ( exception $e )  {
  // Log error
  echo 'aoe';
  echo $e->getMessage();
}


if ( !($pageHandle->loadTemplate('pagemain')) )  {
  echo 'error1';
}
$pageHandle->addTempContent('pagemain', 'TITLE', 'Test Page');

$pageHandle->addTempContent('pagemain', 'CONTENT', 'Test Test Test');

echo 'This is a test page for MustyWindows.com. We are testing the new CSS layout. Test! 
 Bold Text Black Text link';

  if ( !($pageHandle->outTemplate('pagemain')) )  {
    echo "error";
  }

$end = microtime();

echo $end - $start; */
?>

This is exrtemly annoying. Got any ideas?
__________________
// MustyWindows - Break Through The Windows!
// AmpFusion <- Coming Soon
// CrystalHosting.net
Craige is offline   Reply With Quote
Old 07-06-2006, 12:35 AM   #2
ironikart
Zealous Member
 
ironikart's Avatar
 
Join Date: Dec 2005
Location: Canberra, Australia
Posts: 103
Default

Sure apache config hasn't changed? if the AddType declaration for .php file extensions doesn't exist, or someones made a change that stops .php files from being processed you'd end up with what you are describing... or php binary has moved?
__________________
MySource Matrix - Open Source CMS
http://matrix.squiz.net
ironikart is offline   Reply With Quote
Old 07-06-2006, 01:05 AM   #3
Craige
Ambitious Member
 
Join Date: Mar 2006
Location: Ont. Canada
Posts: 56
Send a message via AIM to Craige Send a message via MSN to Craige
Default

Quote:
Originally Posted by ironikart
Sure apache config hasn't changed? if the AddType declaration for .php file extensions doesn't exist, or someones made a change that stops .php files from being processed you'd end up with what you are describing... or php binary has moved?

I ran another php script with just one echo in it, and it ran fine.
__________________
// MustyWindows - Break Through The Windows!
// AmpFusion <- Coming Soon
// CrystalHosting.net
Craige is offline   Reply With Quote
Old 07-06-2006, 01:20 AM   #4
ironikart
Zealous Member
 
ironikart's Avatar
 
Join Date: Dec 2005
Location: Canberra, Australia
Posts: 103
Default

weird - no idea... maybe your host has some script caching enabled?
__________________
MySource Matrix - Open Source CMS
http://matrix.squiz.net
ironikart is offline   Reply With Quote
Old 07-06-2006, 11:32 AM   #5
Craige
Ambitious Member
 
Join Date: Mar 2006
Location: Ont. Canada
Posts: 56
Send a message via AIM to Craige Send a message via MSN to Craige
Default

Well, I reverted to the old versions of the scripts, and did my best to edit it back to where I had it. I still have a bit of work to do, but it outputs. Just gotta get rid of a few errors, and add a littel functionality.
__________________
// MustyWindows - Break Through The Windows!
// AmpFusion <- Coming Soon
// CrystalHosting.net
Craige is offline   Reply With Quote
Old 07-06-2006, 02:30 PM   #6
rvdavid
Ambitious Member
 
rvdavid's Avatar
 
Join Date: Jun 2006
Location: Sydney, Australia
Posts: 26
Default

To my experience, blank pages usually mean there's been a Fatal Error.


HTH
__________________
R. Villar David
Web Developer
http://rvdavid.blogspot.com/
rvdavid is offline   Reply With Quote
Old 07-06-2006, 10:00 PM   #7
ironikart
Zealous Member
 
ironikart's Avatar
 
Join Date: Dec 2005
Location: Canberra, Australia
Posts: 103
Default

mmmm.... set:

PHP Code:
error_reportingE_ALL ); 

at the top of the script. Maybe your host has custom set error levels in php.ini
__________________
MySource Matrix - Open Source CMS
http://matrix.squiz.net
ironikart is offline   Reply With Quote
Old 07-07-2006, 01:27 AM   #8
Craige
Ambitious Member
 
Join Date: Mar 2006
Location: Ont. Canada
Posts: 56
Send a message via AIM to Craige Send a message via MSN to Craige
Default

Quote:
Originally Posted by ironikart
mmmm.... set:

PHP Code:
error_reportingE_ALL ); 

at the top of the script. Maybe your host has custom set error levels in php.ini

As I said, it is working now. But I did have that set in my script config file already.
__________________
// MustyWindows - Break Through The Windows!
// AmpFusion <- Coming Soon
// CrystalHosting.net
Craige is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 06:56 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2006, Jelsoft Enterprises Ltd.