Jump to content

"unexplained" errors in apache error_log


andynic

Recommended Posts

Hi,
Would anyone have an idea why this code should cause errors to appear in the apache error_log file?

 

 

echo <<<REMAINING_FIELDS2
<table style="$tblBkgrnd height:10px;
border-left-style:solid;
border-right-style:none;    
border-bottom-style:none;    
border-top-style:none;    
border-color:gray;
border-width:1px;"
cellspacing="5px">
REMAINING_FIELDS2;

 

The actual echo is very long but I have isolated the problem to this section of code.

$tblBkgrnd is defined earlier in the function as: 
$tblBkgrnd = "background:url() repeat-y;";

 

Even if I change the above to <table style="background:url() repeat-y;10px; etc

I still get the errors.

 

I have discovered that by changing $tblBkgrnd to "background: repeat-y;";

i.e. omittiing url((), the errors go away.

 

1. I don't understand why?

2. And why don't the errors show up in the browser page?

(I  have set_error_handler("phpErrorHandler", E_ALL); enabled at the startup of the php script.)

 

phpErrorHandler code appears at the end of the post and works in many other contexts which has been invaluable in debugging.

 

Thanks for any insights you can give.

Andynic

 
function phpErrorHandler($errLvl, $errMsg, $errFlNm, $errLnNr, $errCntxt)
{
  $fctNm = "phpErrorHandler";
 
  htmlInitSimpleHead($fctNm, "noname");
  htmlInitBodyTvStandard($fctNm, "noname",  "", "FOUTMELDING", "");
  
 
  echo <<<RPT_ERR
  ===============================================================================<br />
  <font style="font-family:courier; font-size:16px; font-weight:bold; color:red">
  PHP ERROR:<br />
  </font>
  <font style="font-family:courier; font-size:10px; color:black">
  Message..........: [$errLvl] $errMsg<br />
  Raised in file...: $errFlNm <br /> 
  At line..........: $errLnNr <br /> 
  Context..........: $errCntxt<br />
  Aborting script............<br />
  </font>
  ===============================================================================<br />
RPT_ERR;
 
  htmlEndTvStandard($fctNm);
  die();
} // End phpErrorHandler

 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.