Jump to content

[SOLVED] Rather Unusual error on Header of page


BREZ

Recommended Posts

Installed a PHP written agency management script and has been running well for past week.

Today i have errors on every page similar to this where the Header was.

<++include function="title_bit"++>

 

Never saw any errors like that before!!

Link to comment
Share on other sites

i would guess that there's some sort of template system that should be processing that code, but isn't. we'll need more details - for example, have you changed anything in the last week? moved files, deleted files, added files? are there any other sections of the site that use the <++ syntax?

Link to comment
Share on other sites

The ONLY files i have changed are .txt ones as i am too raw to alter the PHP ones unless it gives instructions in install.txt

 

There seems to be a few templates that run on this, the install.txt states...

2.2 BIT FUNCTIONS

 

In the templates we used in some places markings like <++include function="function_name"++>

These markings are replaced at runtime with pieces of html (usualy html tables containing some info)

For example <++include function="scoutsearch_bit"++> includes the simple scout search shown on the main

index. You could put this code in any page where you want to add the quick search.

 

 

To change the way these bit functions look, you should have a look in the templates/bits dir.

It's where all bit function templates are.

 

Note1: The bit functions usualy don't need customizing.

Note2: ALLWAYS MAKE BACKUPS OF THE FILES YOU CHANGE!! IF SOMETHING GOES WRONG JUST REVERT TO THE

OLD VERSION

Link to comment
Share on other sites

I'm going to guess the the web host changed the configuration of the server and short open tags or register_globals got turned off and the code was relying on one or both of those settings and the code is no longer working as expected.

 

Posting the code for an actual page the is experiencing the error would help someone to see what it might be doing that could have suddenly caused the problem.

Link to comment
Share on other sites

The install.txt

2.1.3 The menus at the top of the page are handled by bits/outmenu.html and bits/outmenu_in.html

 

2.1.5 As top content zone, the template extra.html is included.

 

Here is bits/outmenu.html

<table width="100%" cellpadding="1" cellspacing="1" border="0">

<tr>

<td class="menus" valign="middle" align="center"><table><tr><td><img src="{relative_path}images/bullet_sq.gif" border="0" alt="Browse Profiles"></td><td><a class="menulinks" href="{relative_path}search_process.php?searchtype=bymodels">Models</a></td></tr></table></td>

<td class="menus" valign="middle" align="center"><table><tr><td><img src="{relative_path}images/bullet_sq.gif" border="0" alt="Photographers"></td><td><a class="menulinks" href="{relative_path}search_process.php?searchtype=photographer">Photographers</a></td></tr></table></td>

<td class="menus" valign="middle" align="center"><table><tr><td><img src="{relative_path}images/bullet_sq.gif" border="0" alt="Job Leads"></td><td><a class="menulinks" href="{relative_path}jobbank.php?new=1">Job Leads</a></td></tr></table></td>

<td class="menus" valign="middle" align="center"><table><tr><td><img src="{relative_path}images/bullet_sq.gif" border="0" alt="About Us"></td><td><a class="menulinks" href="{relative_path}about.php">About Us</a></td></tr></table></td>

<td class="menus" valign="middle" align="center"><table><tr><td><img src="{relative_path}images/bullet_sq.gif" border="0" alt="Contact Us"></td><td><a class="menulinks" href="{relative_path}contact_form.php">Contact Us</a></td></tr></table></td>

<td class="menus" valign="middle" align="center"><table><tr><td><img src="{relative_path}images/bullet_sq.gif" border="0" alt="Terms of Service"></td><td><a class="menulinks" href="{relative_path}tos.php">Terms of Service</a></td></tr></table></td></tr>

</table>

 

 

Here is bits/outmenu_in.html

<table width="100%" cellpadding="1" cellspacing="1" border="0">

<tr>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}members.php">Control center</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}mailbox.php?mailbox=inbox">Mail</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}accountinfo.php">Account</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}jobbank.php?new=1">Job Leads</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}search_process.php?searchtype=photographer">Photographers</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}search_process.php?searchtype=bymodels">Models</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}contact_form.php">Contact</a></td>

<td class="menus" align="center" valign="middle"><a class="menulinks"  href="{relative_path}faqs.php">FAQS</a></td>

</tr>

</table>

 

 

and extra.html

<table cellspacing="1" cellpadding="0" width="100%" border="0" class="statusmenu">

<tr>

<td><font class="font-statusmenu">Hello <b>{name}</b></font></td>

{membersonline}

<td><table cellspacing="0" cellpadding="0" width="100%" border="0"><td><a href="{relative_path}inbox.php">{nmico}</a></td><td><font class="font-statusmenu">[ {new_mail} ] new messages</font></td></tr></table></td>

<td><font class="font-statusmenu">Views [<font class="alert">{views}</font>]</font></td>

{acpoints}

<td><table><tr><td><img src="{relative_path}images/bullet_home.gif" border="0" alt="Home"></td><td><a class="homelink" href="{relative_path}index.php">Home</a></td></tr></table></td>

<td><table><tr><td><img src="{relative_path}images/ico_logout.gif" border="0" alt="Logout"></td><td>{logout}</td></tr></table></td>

</tr>

</table>

 

PFMaBiSmAd

 

The host informs me he has not changed anything in 3 wks.

I have been using a php.ini with RG globaks set to ON.

"Posting the code" Do you mean the page source code or another?

Link to comment
Share on other sites

I was referring to the php source code of a page that is showing the <++include function="title_bit"++> output.

 

Either the php framework responsible for parsing the template is not working or the template contains an error that is preventing it from being parsed correctly.

 

Does the rest of the page work correctly? If so, seeing the file where the <++include function="title_bit"++> exists in the source code would help (I don't see anything like that in the files you just posted above.)

 

 

Link to comment
Share on other sites

The errors are on header and footer of every page

The frame.html is responsible for every page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>{title}</title>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />

{metacontent}

<link href="{baseurl}/mam.css" rel="stylesheet" type="text/css">

<script type="text/javascript">

function popWin(script,winname) {

newPopup = window.open(script,winname,"width=550,height=400,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=no,location=no");

}

</script>

<script language="JavaScript">

      <!--

      var reg1=new Image();

      reg1.src="images/cpo_1.gif";

      var reg2=new Image();

      reg2.src="images/cpo_2.gif";

 

//-->

</script>

</head>

<body>

<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<tbody>

<tr>

<td valign="top"><!--header content starts-->

<table class="headercell" border="0" cellpadding="0" cellspacing="0" width="100%">

<tbody>

<tr>

<td align="center" valign="center"><font class="title"><++include function="title_bit"++></font></td>

<td><font class="slogan"><++include function="slogan_bit"++></font></td>

{cpanel}

{admin}</tr></tbody></table><!--header content ends-->

<table border="0" cellpadding="0" cellspacing="1" width="100%">

<tbody>

<tr>

<td valign="top">{top_content}</td></tr></tbody></table>

 

{outmenu}

<table border="0" cellpadding="2" cellspacing="0" width="100%">

<tbody>

<tr>

<td align="left" valign="top">{left_content}</td>

<td align="center" valign="top" width="100%">{middle_content}</td></tr></tbody></table>

<div align="center"><!--start content at bottom of page-->

 

{menu_standard}

<table class="headercell" border="0" cellpadding="5" cellspacing="0" width="100%">

<tbody>

<tr>

<td>

<++include function="tspace4_bit"++></td></tr></tbody></table>

<table class="headercell" border="0" cellpadding="5" cellspacing="0" width="100%">

<tbody>

<tr>

<td>

<++include function="tspace5_bit"++></td></tr></tbody></table>

<table border="0" cellpadding="5" cellspacing="0" width="100%">

<tbody>

<tr>

<td align="center" valign="center">

      <++include function="copyright_bit"++></td>

<td align="right" valign="center">

<table>

<tbody>

<tr>

<td valign="center"><font class="copyright">Powered by </font></td>

<td valign="center"><img alt="" src="{relative_path}images/mamico.gif" border="0"></td>

<td><a href="http://athloneweb.com" title="" target="_blank">ATHLONEWEB</a><br>

</td></tr></tbody></table><font class="copyright"> A project developed by</font> <a title="" class="etownlink" href="../../">SHANNON BELLE'S</a></td></tr></tbody></table><!--end content at bottom of page--></div></td></tr></tbody></table></div>

</body>

</html>

Link to comment
Share on other sites

<++include function="title_bit"++>

 

those are your problem. if the HTML is hard-coded, you'll need to go through and replace those with the correct characters (the actual less-than and greater-than signs, rather than their HTML entity equivalents). if it isn't hard-coded, we'll need to see the sections of PHP that output it.

Link to comment
Share on other sites

I'm going to guess that either you or your editor cause the < and > to be changed to < and > since the only htmlenties in the last file posted are where the <++ ... ++> syntax is being used.

 

The < and > would cause that part of the template to be output as is instead of it being parsed by the template engine.

Link to comment
Share on other sites

if it isn't hard-coded, we'll need to see the sections of PHP that output it.

Hard coded! now thats a new one on me.

How will i know if its hard coded?

Also, What sections would output it?

I would really like to use this script but, the vender that sells it seems to provide absolutely no support!

Link to comment
Share on other sites

if it isn't hard-coded, we'll need to see the sections of PHP that output it.

Hard coded! now thats a new one on me.

How will i know if its hard coded?

Also, What sections would output it?

I would really like to use this script but, the vender that sells it seems to provide absolutely no support!

 

an excellent reason to employ the "caveat emptor" principle when shopping around for scripts. what i meant by hard-coded is whether the HTML is spit out by the script, or if it's in there statically (just as it would be on a regular HTML page that had no PHP in it).

Link to comment
Share on other sites

  • 2 weeks later...
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.