Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack (1) Thread Tools Search this Thread Display Modes
  (#31) Old
pol67 Offline
New Member
 
Posts: 18
Join Date: May 2007
Thumbs up Issue solved - Currently no error in the error_log file - 14-06-2008, 12:08 AM

For the investigation on the issue see Ticket id #TVZ-353366 (Kayako Support).
Result: Currently no error in the error_log file.
   
Reply With Quote
  (#32) Old
starchild Offline
New Member
 
Posts: 7
Join Date: Nov 2007
Similar Problem - 22-06-2008, 05:30 AM

When a User attempts to login, Kayako crashes and the error below results.


Fatal error: TPL: [in header line 3]: syntax error: function does not exist (class.compiler.php, line 346) in /var/www/vhosts/default/htdocs/support/includes/SmartyLight/class.template.php on line 421
   
Reply With Quote
  (#33) Old
sergioag Offline
New Member
 
Posts: 8
Join Date: Oct 2007
Location: Lima-Peru
22-06-2008, 06:27 PM

Hi

I think i've found the cause of this error, at least in my case. I found the same errors in my log, but checked the access log and found this:

Code:
GET /visitor/index.php?_m=livesupport&_a=updatefootprint&time=1214158638629&rand=19&url=https://support.mydomain.com/index.php?_m=tickets&_a=viewlist&isfirsttime=0&sessionid=c6b42dd1cb596dbffe8ff248b50120ae&referrer=&resolution=1024x768&colordepth=32&platform=Win32&appversion=9.50%20(Windows%20NT%205.1;%20U;%20en)&appname=Opera&browsercode=OP&browserversion=9.50%20(Windows%20NT%205.1;%20U;%20en)&browsername=Opera&operatingsys=Windows&pagetitle=QMailHosting.net%20Intl.&country=Peru&countrycode=pe&hasnotes=&campaignid=&campaigntitle= HTTP/1.1
As you can see the url= parameter is not correctly encoded so it overwrites some parameters, such as _m and _a. I can't explain how _a got overwritten and _m not (probably a php bug), but this is how i solved. The problem is in /modules/livesupport/visitor_htmlcode.php, around line 338, which says:

Code:
updateurl = "<?php echo $_SWIFT["swiftpath"] ?>visitor/index.php?_m=livesupport&_a=updatefootprint&time="+date1.getTime()+"&rand="+doRand()+"&url="+encodeURIComponent(window.location)+"&isfirsttime="+encodeURI(isfirsttime)+"&sessionid="+encodeURI(sessionid)+"&referrer="+encodeURI(document.referrer)+"&resolution="+encodeURI(screenWidth+"x"+screenHeight)+"&colordepth="+encodeURI(colorDepth)+"&platform="+encodeURI(navigator.platform)+"&appversion="+encodeURI(navigator.appVersion)+"&appname="+encodeURI(navigator.appName)+"&browsercode="+encodeURI(browsercode)+"&browserversion="+encodeURI(browserversion)+"&browsername="+encodeURI(browsername)+"&operatingsys="+encodeURI(operatingsys)+"&pagetitle="+encodeURI(title)+"&country="+encodeURI(country)+"&countrycode="+encodeURI(countrycode)+"&hasnotes="+encodeURI(hasnotes)+"&campaignid="+encodeURI(campaignid)+"&campaigntitle="+encodeURI(campaigntitle);
You must replace encodeURI(window.location) with encodeURIComponent(window.location). The documentation of encodeURI states that it won't encode some characters (see JavaScript encodeURI() Function), but use encodeURIComponent for those ones.

Hope this helps

Sergio
   
Reply With Quote
  (#34) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,256
Join Date: Jan 2006
Location: United Kingdom
22-06-2008, 09:58 PM

Hi Sergio,

Thank you for that; I have passed it onto the developers who will review it.


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
  • This is not an official support forum - submit a support ticket.
   
Reply With Quote
  (#35) Old
eger Offline
Member
 
Posts: 126
Join Date: Jul 2004
23-06-2008, 03:21 PM

Quote:
Originally Posted by sergioag View Post
Hi

I think i've found the cause of this error, at least in my case. I found the same errors in my log, but checked the access log and found this:

Code:
GET /visitor/index.php?_m=livesupport&_a=updatefootprint&time=1214158638629&rand=19&url=https://support.mydomain.com/index.php?_m=tickets&_a=viewlist&isfirsttime=0&sessionid=c6b42dd1cb596dbffe8ff248b50120ae&referrer=&resolution=1024x768&colordepth=32&platform=Win32&appversion=9.50%20(Windows%20NT%205.1;%20U;%20en)&appname=Opera&browsercode=OP&browserversion=9.50%20(Windows%20NT%205.1;%20U;%20en)&browsername=Opera&operatingsys=Windows&pagetitle=QMailHosting.net%20Intl.&country=Peru&countrycode=pe&hasnotes=&campaignid=&campaigntitle= HTTP/1.1
As you can see the url= parameter is not correctly encoded so it overwrites some parameters, such as _m and _a. I can't explain how _a got overwritten and _m not (probably a php bug), but this is how i solved. The problem is in /modules/livesupport/visitor_htmlcode.php, around line 338, which says:

Code:
updateurl = "<?php echo $_SWIFT["swiftpath"] ?>visitor/index.php?_m=livesupport&_a=updatefootprint&time="+date1.getTime()+"&rand="+doRand()+"&url="+encodeURIComponent(window.location)+"&isfirsttime="+encodeURI(isfirsttime)+"&sessionid="+encodeURI(sessionid)+"&referrer="+encodeURI(document.referrer)+"&resolution="+encodeURI(screenWidth+"x"+screenHeight)+"&colordepth="+encodeURI(colorDepth)+"&platform="+encodeURI(navigator.platform)+"&appversion="+encodeURI(navigator.appVersion)+"&appname="+encodeURI(navigator.appName)+"&browsercode="+encodeURI(browsercode)+"&browserversion="+encodeURI(browserversion)+"&browsername="+encodeURI(browsername)+"&operatingsys="+encodeURI(operatingsys)+"&pagetitle="+encodeURI(title)+"&country="+encodeURI(country)+"&countrycode="+encodeURI(countrycode)+"&hasnotes="+encodeURI(hasnotes)+"&campaignid="+encodeURI(campaignid)+"&campaigntitle="+encodeURI(campaigntitle);
You must replace encodeURI(window.location) with encodeURIComponent(window.location). The documentation of encodeURI states that it won't encode some characters (see JavaScript encodeURI() Function), but use encodeURIComponent for those ones.

Hope this helps

Sergio
How did you get an un-encoded copy of this file?
   
Reply With Quote
  (#36) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,256
Join Date: Jan 2006
Location: United Kingdom
23-06-2008, 03:47 PM

Hi eger,

Sergio has an owned license; most of the files come unencoded with this license.


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
  • This is not an official support forum - submit a support ticket.
   
Reply With Quote
  (#37) Old
Ryan Lederman Offline
Chief Operating Officer
 
Ryan Lederman's Avatar
 
Posts: 852
Join Date: May 2005
Location: Boise, Idaho
23-06-2008, 07:50 PM

Apologies for anyone who ended up experiencing this bug. encodeURI() was introduced to fix a different bug related to escape(), but the current code in the distro uses encodeURIComponent().

So, if that is actually the cause of this particular issue, it has already been resolved in the development branch.


Ryan Lederman (ryan.lederman ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#38) Old
Ryan Lederman Offline
Chief Operating Officer
 
Ryan Lederman's Avatar
 
Posts: 852
Join Date: May 2005
Location: Boise, Idaho
23-06-2008, 07:51 PM

Quote:
Originally Posted by starchild View Post
When a User attempts to login, Kayako crashes and the error below results.


Fatal error: TPL: [in header line 3]: syntax error: function does not exist (class.compiler.php, line 346) in /var/www/vhosts/default/htdocs/support/includes/SmartyLight/class.template.php on line 421
Varun informs me that this is most likely to an improperly edited template. Evidently, such an error can be caused by the introduction of a syntax error in the template's code.


Ryan Lederman (ryan.lederman ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#39) Old
eger Offline
Member
 
Posts: 126
Join Date: Jul 2004
23-06-2008, 08:16 PM

Quote:
Originally Posted by Ryan Lederman View Post
Apologies for anyone who ended up experiencing this bug. encodeURI() was introduced to fix a different bug related to escape(), but the current code in the distro uses encodeURIComponent().

So, if that is actually the cause of this particular issue, it has already been resolved in the development branch.
I will be able to test in next version. I also noticed that since this started happening the LiveResponse Monitor pane now longer shows any visitors. Was the modified code related to this also? Maybe this was the side affect that wasn't noticed...
   
Reply With Quote
  (#40) Old
Ryan Lederman Offline
Chief Operating Officer
 
Ryan Lederman's Avatar
 
Posts: 852
Join Date: May 2005
Location: Boise, Idaho
23-06-2008, 08:36 PM

Quote:
Originally Posted by eger View Post
I will be able to test in next version. I also noticed that since this started happening the LiveResponse Monitor pane now longer shows any visitors. Was the modified code related to this also? Maybe this was the side affect that wasn't noticed...
Yes, visitors not appearing was also a side effect of this same problem, which should be resolved by changing all instances of encodeURI() to encodeURIComponent() and then issuing the two following queries on your database:

DELETE FROM `swsessions`;
DELETE FROM `swvisitorfootprints`;

This will flush out any invalid records that got in there due to this problem


Ryan Lederman (ryan.lederman ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#41) Old
eger Offline
Member
 
Posts: 126
Join Date: Jul 2004
24-06-2008, 05:00 PM

Quote:
Originally Posted by Ryan Lederman View Post
Yes, visitors not appearing was also a side effect of this same problem, which should be resolved by changing all instances of encodeURI() to encodeURIComponent() and then issuing the two following queries on your database:

DELETE FROM `swsessions`;
DELETE FROM `swvisitorfootprints`;

This will flush out any invalid records that got in there due to this problem
Are these all template changes or do you mean changes in un-encoded files?

If these are files, which files are they (if there are others than just visitor_htmlcode.php) and can they be downloaded from CVS to a 3.20.02 as a 'patch'?

I am willing to test these out if I can just load the fixed versions from CVS unless there are more major changes that require a complete upgrade.
   
Reply With Quote
  (#42) Old
Ryan Lederman Offline
Chief Operating Officer
 
Ryan Lederman's Avatar
 
Posts: 852
Join Date: May 2005
Location: Boise, Idaho
24-06-2008, 05:46 PM

Quote:
Originally Posted by eger View Post
Are these all template changes or do you mean changes in un-encoded files?

If these are files, which files are they (if there are others than just visitor_htmlcode.php) and can they be downloaded from CVS to a 3.20.02 as a 'patch'?

I am willing to test these out if I can just load the fixed versions from CVS unless there are more major changes that require a complete upgrade.
The file in question is /modules/livesupport/visitor_htmlcode.php. Unfortunately, you can't just take this file from CVS currently because a different bug fix is now in place that changes the way the file behaves.

The best way to fix it on your own desk would simply be to open up that file and do a find/replace of encodeURI with encodeURIComponent


Ryan Lederman (ryan.lederman ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#43) Old
eger Offline
Member
 
Posts: 126
Join Date: Jul 2004
27-06-2008, 07:21 PM

Quote:
Originally Posted by Ryan Lederman View Post
The best way to fix it on your own desk would simply be to open up that file and do a find/replace of encodeURI with encodeURIComponent
Sure, If i could decode and encode Zend binary on the fly in my head
   
Reply With Quote
  (#44) Old
truz Offline
New Member
 
Posts: 6
Join Date: May 2005
28-06-2008, 07:13 PM

I'm still getting the following error in my error logs..

[Sat Jun 28 13:11:20 2008] [error] [client IP.0.0.0.0] PHP Fatal error: register action is not registered in /home/*user*/public_html/support/includes/functions.php on line 742, referer: http://www.*domain*.com/support/inde...re&_a=register
   
Reply With Quote
  (#45) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,256
Join Date: Jan 2006
Location: United Kingdom
28-06-2008, 07:14 PM

Hi truz,

Is this after applying the fix discussed here: Errors in "error_Log" file


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
  • This is not an official support forum - submit a support ticket.
   
Reply With Quote
Reply

Tags
errorlog, errors

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://forums.kayako.com/f56/errors-error_log-file-16324/
Posted By For Type Date
Kayako Bug Tracker - Viewing Issue #549 - Fatal Errors thrown in error_log need to be resolved This thread Refback 23-04-2008 05:06 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
LiveResponse disconnects continuously. rohmelec SupportSuite, eSupport and LiveResponse 21 26-09-2007 08:14 AM
Help Desk completely down with multiple errors Lisa SupportSuite, eSupport and LiveResponse 31 30-05-2007 10:23 AM
Key.php - Update URL Field BEFORE you Upload File. kropes SupportSuite, eSupport and LiveResponse 5 27-11-2006 08:38 AM
problem ! graziano68 SupportSuite, eSupport and LiveResponse 2 08-11-2006 07:07 AM
Swift CLI problem joshopkins SupportSuite, eSupport and LiveResponse 2 02-09-2006 06:12 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46