Page 1 of 1

Parse Error

Posted: Sun Nov 20, 2005 4:48 am
by ladysham
Script URL: http://www.shamrocksweb.com/support/
Version of script: 93.1
Version of PHP: 4.3.10
Hosting company: behosting.com
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try: parse error

Write your message below:

I have just installed the program this evening. Everything works fine, I can post a trouble ticket, get the resulting email, etc. However, when I click on the link in the email to view the ticket, I get the following error:

Parse error: parse error, unexpected ';' in /mydomaininfo/support/ticket.php on line 57

In the ticket.php file, here is the line referenced:

$result = hesk_dbQuery($sql) or hesk_error("$heskT 1";

I have not made any modifications to the code. Just a clean install, and setup through the admin. Could you please shed some light on this - what am I missing here? The code looks fine to me.

Thanks!

Posted: Sun Nov 20, 2005 7:12 pm
by Klemen
Hi,

I just tested your installation and got the same error. Then I checked the original script and the error is not there.

You say you haven't been editing anything? Not even the language file (english.inc.php)?

Can you paste lines 50-60 of your ticket.php here? Use the "Code" button when pasting, it's located before the text box.

Parse error

Posted: Sun Nov 20, 2005 7:22 pm
by ladysham
Thanks, Klemen - for responding so quickly. No, I did not edit any of the files other than the one for configuration purposes. Then I began to test it and started receiving this error. That's why I'm kind of stuck. hehehe

Here is the code - a little more than you asked for:

Code: Select all

/* Get ticket info */
$sql = "SELECT * FROM `hesk_tickets` WHERE `trackid`='$trackingID' LIMIT 1";
$result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
if (hesk_dbNumRows($result) != 1) {hesk_error($hesklang['ticket_not_found']);}
$ticket = hesk_dbFetchAssoc($result);

/* Get category name and ID */
$sql = "SELECT * FROM `hesk_categories` WHERE `id`=$ticket[category] LIMIT 1";
$result = hesk_dbQuery($sql) or hesk_error("$heskT 1";
$result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
/* If this category has been deleted use the default category with ID 1 */
	if (hesk_dbNumRows($result) != 1)
	{
	    $sql = "SELECT * FROM `hesk_categories` WHERE `id`=1 LIMIT 1";
	    $result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
	}
$category = hesk_dbFetchAssoc($result);
Thanks for looking.

Found problem

Posted: Sun Nov 20, 2005 7:32 pm
by ladysham
Klemen - Apparently, there was a change in the version I downloaded about 2 weeks ago, but hadn't installed and the one that is currently available for download now at the website. I did a compare between the two different ticket.php files and I found this line in the one I installed that was not in the one downloaded today. When I took it out, it worked.

Code: Select all

$result = hesk_dbQuery($sql) or hesk_error("$heskT 1";
Thanks!

Posted: Sun Nov 20, 2005 11:46 pm
by Klemen
Hi,

Yes, the

Code: Select all

$result = hesk_dbQuery($sql) or hesk_error("$heskT 1";
part is wrong, I have no idea how it appeared there? I haven't made any changes to Hesk or download file since 17th September 2005 (and it was also working before that)? Must have been a download error or something :? :?:

Anyway, glad you got it working!