Hi I am a newbie can anybody help me please?
I am gettin the following error Parse error: parse error, expecting `']'' in c:\program files\easyphp1-8\www\webshop\routines\tSys.php(483) : eval()'d code on line 4
Thanks in advance for your help
Katie
18 3783
Heya, Katie. Welcome to TSDN!
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
You're getting this error because there's a syntax error on line 4 in whatever code tSys.php eval()s on line 483.
O thanks for that its very kind of, you!!
so, can you tell me how I sort it?!!
many thanks
katie
O thanks for that its very kind of, you!!
so, can you tell me how I sort it?!!
many thanks
katie
We need to see your code to help you - we're not, contrary to popular belief, psychic.
:)
your not psychics!! lol
which code do u want!!
this from line 483- eval("?>".$this->templateContents);
Heya, Katie.
What app are you running? Is this some kind of e-commerce suite?
I've run into similar problems with phpBB, and the solution was to purge the template cache. There might be a similar operation with the app that you are using.
Do you get this error on every page, or just a specific one?
Yeh its Jshop server software I am using, it was working fine until I started using Coffecup HTML editer to rearrange the look of things then suddenly it happened!!
I am an extreme newbie where all this is concerned
It is a specific page, down the left side there are different store sections it happens when I click on one of them
kelby,
I would suggest that you do this:
1. open your tSys.php file, highlight all, then ctrl+c to copy it.
2. start a new reply and ctrl+v to paste the code you just copied.
3. wrap the whole code between [ code ] and [ /code ] (no spaces between the brackets, though).
When you post, we can see your code and try to help you sort out the error.
my code doesnt seem to be showing up!
Are you typing
[ code ]
...your code here...
[ /code ]
but without any spaces between the brackets and the word code?
Are you typing
[ code ]
...your code here...
[ /code ]
but without any spaces between the brackets and the word code?
yep -
-
-
function showPage() {
-
ob_implicit_flush(0);
-
ob_start();
-
eval("?>".$this->templateContents);
-
$content = ob_get_contents();
-
ob_end_clean();
-
echo $content;
-
}
-
-
function retrievePage() {
-
$this->templateContents = eregi_replace("\r\n","<full>",$this->templateContents);
-
ob_implicit_flush(0);
-
ob_start();
-
eval("?>".$this->templateContents);
-
$content = ob_get_contents();
-
ob_end_clean();
-
$content = eregi_replace("<full>","\r\n",$content);
-
return $content;
-
}
-
-
function convertText($from,$to) {
-
$this->templateContents = eregi_replace($from,$to,$this->templateContents);
-
}
-
-
function addVariable($variableName,$variableValue) {
-
$this->theVariables[$variableName] = $variableValue;
-
}
-
-
function _RUNTIME_stringLimit($theString,$theLength,$limitAdd) {
-
if (strlen($theString) > $theLength) {
-
$theString = substr($theString,0,$theLength);
-
if ($limitAdd == "dots") {
-
$theString .= "...";
-
}
-
}
-
return $theString;
-
}
-
-
function _returnError($theLine,$theError) {
-
echo "<b>Template Execution Halted!</b><br><b>Error:</b> $theLine ($theError)";
-
exit;
-
}
-
}
-
?>
-
-
yep -
-
-
function showPage() {
-
ob_implicit_flush(0);
-
ob_start();
-
eval("?>".$this->templateContents);
-
$content = ob_get_contents();
-
ob_end_clean();
-
echo $content;
-
}
-
-
function retrievePage() {
-
$this->templateContents = eregi_replace("\r\n","<full>",$this->templateContents);
-
ob_implicit_flush(0);
-
ob_start();
-
eval("?>".$this->templateContents);
-
$content = ob_get_contents();
-
ob_end_clean();
-
$content = eregi_replace("<full>","\r\n",$content);
-
return $content;
-
}
-
-
function convertText($from,$to) {
-
$this->templateContents = eregi_replace($from,$to,$this->templateContents);
-
}
-
-
function addVariable($variableName,$variableValue) {
-
$this->theVariables[$variableName] = $variableValue;
-
}
-
-
function _RUNTIME_stringLimit($theString,$theLength,$limitAdd) {
-
if (strlen($theString) > $theLength) {
-
$theString = substr($theString,0,$theLength);
-
if ($limitAdd == "dots") {
-
$theString .= "...";
-
}
-
}
-
return $theString;
-
}
-
-
function _returnError($theLine,$theError) {
-
echo "<b>Template Execution Halted!</b><br><b>Error:</b> $theLine ($theError)";
-
exit;
-
}
-
}
-
?>
-
-
It hasnt copied it all in there, theres about 500 lines, do you think this is why?
Heya, Katie.
There's a known problem with our forum's parsing engine; large amounts of code break it.
But we don't want to see that, anyway. We want to see the template that you were editing.
Heya, Katie.
There's a known problem with our forum's parsing engine; large amounts of code break it.
But we don't want to see that, anyway. We want to see the template that you were editing.
erm it could have been one of about three!!
heres the one I think it probably is: -
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
-
<HEAD><TITLE>{company.companyname} > {section.title}</TITLE>
-
<META http-equiv=Content-Type content="text/html; charset=unicode">
-
<META NAME="description" CONTENT={"meta.description}">
-
<META NAME="keywords" CONTENT={"meta.keywords}">
-
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
-
<BODY><#include:includes/top.html#>
-
<p>
-
<table cellpadding="2" cellspacing="1" border="0">
-
<tr>
-
<td valign="top"> </FONT></td>
-
<td valign="top"><IMG height=93 alt={section.title} src="{section.thumbnail}" width=84 border=1></FONT></td>
-
<td valign="top"><font class="header-title">{section.title}</font><br><font class="header-description">{section.fullDescription}</font></td>
-
</tr>
-
</table>
-
<p><center><!-- check if there are any sub-sections --><#if:loop.sections.total:neq:0#>
-
<table cellpadding="2" cellspacing="1" border="0" width="98%">
-
<tr>
-
<td align="middle" colspan="3" class="table-backing-title"><font class="table-title-text">{labels.section.subSectionsTitle} {section.title}</font></td>
-
</tr><!-- output sub-sections --
-
><#loop:sections#>
-
<#if:loop.sections.count:mod2:1#>
-
<tr
-
><#/if#>
-
<td class="table-backing-content" valign="top">
-
<table border="0" cellpadding="2" cellspacing="0">
-
<tr>
-
<td valign="top"><A href="file:///C:/Program%20Files/EasyPHP1-8/www/webshop/templates/%7Bsections.link%7D" ><IMG height=93 alt={sections.title} src="{sections.thumbnail}" width=84 border=0></a></td>
-
<td valign="top" align="left"><A class=middle-links href="{sections.link}">{sections.title}</a><br><font class="subsection-description">{sections.shortdescription}<br></font></td>
-
</tr>
-
</table>
-
</td
-
><#if:loop.sections.count:mod2:0#>
-
</tr><#/if#> <#/loop#>
-
<!-- /output sub-sections -->
-
</table><#/if#>
-
<p><!-- check if there are any products in this section --
-
><#if:loop.products.total:neq:0#>
-
<table cellpadding="2" cellspacing="2" border="0">
-
<tr>
-
<td align="middle" colspan="4" class="table-backing-title"><font class="table-title-text">{labels.section.productsTitle} {section.title} ({labels.section.productsTotal} {sectionpages.totalproducts}, {labels.section.productsShowing} {sectionpages.from} -> {sectionpages.to})</font></td>
-
</tr
-
><#loop:products#>
-
<#if:loop.products.count:mod4:1#>
-
<tr><#/if#> <!-- output product with individual add to basket form -->
-
<form name="'{"products.form.name}"'" action="'{"products.form.action}"'" method="post" onSubmit="'{"products.form.onsubmit}"'">
-
<td class="table-backing-content" valign="top">
-
<table border="0" cellpadding="2" cellspacing="0">
-
<tr>
-
<td align="middle"><A href="file:///C:/Program%20Files/EasyPHP1-8/www/webshop/templates/%7Bproducts.link%7D" ><IMG height=120 alt={products.name} src="{products.thumbnail}" width=129 border=0></A></td>
-
</tr>
-
<tr>
-
<td align="middle"><font class="product-field-title">{labels.product.productPrice}</A> <font class="product-field-content">{products.price}</font></font></td>
-
</tr>
-
<tr>
-
<td align="middle"><A class=middle-links href="{products.link}">{labels.product.moreInfoLink}</A></td>
-
</tr>
-
<tr>
-
<td align="middle"><A class=middle-links href="{products.wishlist.link}">{labels.customer.addToWishListLink}</A></td>
-
</tr>
-
<tr>
-
<td align="middle"><A class=middle-links href="{products.add.link}">{labels.cart.addToCartLink}</A></td>
-
</tr>
-
</table>
-
</td>
-
</form><!-- /output product with individual add to basket form --
-
><#if:loop.products.count:mod4:0#>
-
</tr
-
><#/if#>
-
<#/loop#>
-
</table><!-- output page navigation if there is more than one page in this section --
-
><#if:loop.sectionpages.pages.total:gt:1#>
-
<p>
-
<table cellpadding="2" cellspacing="2" border="0" width="98%">
-
<tr>
-
<td class="table-backing-content" align="middle" >
-
<font class="middle-normal-text"
-
><#if:sectionpages.previouslink:neq:blank#>
-
[<A class=middle-links href="{sectionpages.previouslink}">{labels.section.previousLink}</a>]
-
<#/if#>
-
<#loop:sectionpages.pages#>
-
<#if:sectionpages.page:eq:search.pages.page#>
-
{sectionpages.pages.page}
-
<#else#>
-
<A class=middle-links href="{sectionpages.pages.link}">{sectionpages.pages.page}</a>
-
<#/if#>
-
<#/loop#>
-
<#if:sectionpages.nextlink:neq:blank#>
-
[<A class=middle-links href="{sectionpages.nextlink}">{labels.section.nextLink}</a>]
-
<#/if#>
-
</font>
-
</td>
-
</tr>
-
</table><#/if#> <!-- /output page navigation if there is more than one page in this section --><#/if#>
-
</center><#include:includes/bottom.html#></p></BODY></HTML>
-
-
Heya, Katie.
On lines 4 and 5, you have one quote inside the tag marker and one quote outside. I wonder if that's wreaking any havoc.
just tried changing that and it made no difference.
thanks though
Heya, Katie.
I don't see anything around line 4 that might have caused the problem.
Try this.
in tSys.php, alter line 482 to look like this: -
echo $this->templateContents;
-
exit;
-
-
eval("?>".$this->templateContents);
-
Ok I did this and the error disappeared but it didnt come up how It should!!!
This is what is my code from line 480 -
-
function showPage() {
-
ob_implicit_flush(0);
-
ob_start();
-
eval("?>".$this->templateContents);
-
$content = ob_get_contents();
-
ob_end_clean();
-
echo $content;
-
}
-
-
function retrievePage() {
-
$this->templateContents = eregi_replace("\r\n","<full>",$this->templateContents);
-
ob_implicit_flush(0);
-
ob_start();
-
eval("?>".$this->templateContents);
-
$content = ob_get_contents();
-
ob_end_clean();
-
$content = eregi_replace("<full>","\r\n",$content);
-
return $content;
-
}
-
-
function convertText($from,$to) {
-
$this->templateContents = eregi_replace($from,$to,$this->templateContents);
-
}
-
-
function addVariable($variableName,$variableValue) {
-
$this->theVariables[$variableName] = $variableValue;
-
}
-
-
function _RUNTIME_stringLimit($theString,$theLength,$limitAdd) {
-
if (strlen($theString) > $theLength) {
-
$theString = substr($theString,0,$theLength);
-
if ($limitAdd == "dots") {
-
$theString .= "...";
-
}
-
}
-
return $theString;
-
}
-
-
function _returnError($theLine,$theError) {
-
echo "<b>Template Execution Halted!</b><br><b>Error:</b> $theLine ($theError)";
-
exit;
-
}
-
}
-
?>
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: entoone |
last post by:
I'm getting the following error Parse error: parse error, expecting `','' or
`';'' in /home/notarywe/public_html/php/update2.php on line 108
Here is line 108
<input type="text" name="ud_first"...
|
by: radykl |
last post by:
Can anyone explain me why you need to add open and close parenthesis to
a JSON text in order to use eval() to parse it?
For example:
var json = "{a: 'abc', b: 'def'}";
var obj1 = eval("(" +...
|
by: Anna MZ |
last post by:
I am new to php and have written the following mysql code to enter the details of a new user in the admin subdomain of my website:
$sql = "INSERT INTO 'users' ('userid', 'username', 'upassword')...
|
by: soidariti |
last post by:
database error - parse error, unexpected $, expecting kEND
AddUserAuthorisationToUsers.rb migration file
1. class AddUserAuthorisationToUsers < ActiveRecord::Migration
2. def self.up
...
|
by: AdrianH |
last post by:
Assumptions
I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C programming.
FYI
Although I have called this...
|
by: kestrel |
last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on.
Heres what i have
<?php...
|
by: Phaelle |
last post by:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
What does that error mean? I can´t find the mistake!!
In another script, I have got another kind of mistake : parse...
|
by: Lawrence Krubner |
last post by:
Imagine a template system that works by getting a file, as a string, and
then putting it through eval(), something like this:
$formAsString = $controller->command("readFileAndReturnString",...
|
by: paulrajj |
last post by:
hi to all,
i am getting syntax error on my code..
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62
...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| | |