1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Whoops and more

Discussion in 'Using Kayako Classic' started by Igor Kryltsov, Sep 28, 2011.

  1. Gary McGrath

    Gary McGrath Staff Member


    I think you missed my point. The logs are going to be totally useless to resolve this. Basically you ask your webserver for the same page, one time its working fine, and finds all the files, the second time it fails and says they dont exist. If an error is logged, its going to be "file does not exist", but they clearly do.

    So its a case of working out why your webserver is saying files don't exist when they actually do. That is a very odd error as I have said before. ( hence why I suggested blowing it away and starting with a clean web server )

  2. Igor Kryltsov

    Igor Kryltsov Established Member

    I agree with you. What you say " In the background, the kayako contoller uses "/core/default/login" to navigate to the correct folder, and load the correct function." It does it by using include_once() or require() in PHP and if file is missing PHP should write this into PHP error log. I understand that this is not going to be visible in Apache access_log. Than Kayako code catches up an error ant displays 404.png. This problem is tracebable on PHP level. PHP wants to include a file and it is missing.

    I want to know what exactly what file was missing. index.php with my code in is not missing. Without my code it starts executing and throwing 404. This happens when it tries to include a file. Which one exactly? Clean web server is an option we are all too busy so it will be very last resort. We have one server. Should I buy another one just to be able to put a 600$ Kayako on it? I do not like this idea, not at all. We will try Zend encoded version instead.
  3. Gary McGrath

    Gary McGrath Staff Member

    Hi Igor,

    Let me explain more how its working.

    say you have the link http://helpdeskURL/index.php?/Tickets/Submit/RenderForm

    This tells the class controller

    You are loading a file in __modules\Tickets\<Envir> ( thats the "tickets" from above ) where Envir is "client" or "admin" or "staff" etc.. depending on the calling base path.
    You are loading a class controller called submit - class.Controller_Submit.php ( thats the "submit" from above )
    You are loading a function within the class controller called "RenderForm"

    If it cant find part 3, you get an actual php error.
    if it cant find part 2, you get a white error page
    if it cant find part 1, you get a whoopsie page

    So to me its having issues actually accessing the folders.
  4. Igor Kryltsov

    Igor Kryltsov Established Member

    I have this example I posted before:

    I see /var/www/kayako/__swift/modules/core

    What is next? This folder contains only dirs:
    admin archive config cron library setup tests wallboard
    api client console intranet mobile staff visitor winapp

    Referer was http://support.nerrvana.com/staff/index.php?
  5. Gary McGrath

    Gary McGrath Staff Member

    Since this is a staff URL, the Envir is staff. e.g. __swift\modules\core\staff

    and the controller file will be class.Controller_Default.php

  6. n8.davis

    n8.davis Established Member

    I've been following this thread with curiosity about your issue Igor.

    Although I'm not as adept as Gary, I would agree with him that it appears to be an issue with your webserver itself. So, just to go back to the basics, are your files all being hosted locally or on remote storage? Have you validated that there aren't any issues with the disk(s) or controller? Maybe it is more simple/basic then the code behind the curtain? Maybe you are suffering contention with hardware or something?

    I've had hardware give me similiar "now you see it, now you don't" type issues.

    Just my 2 cents. Ignore if it doesn't apply :)

    Best Regards
  7. Igor Kryltsov

    Igor Kryltsov Established Member

    I am not saying that this is Kayajo problem I am asking to help me debug my problem as I can not see it anywhere esle - phpBB, WordPress and all the rest running on our server NEVER had this issue. I can not reproduce it without Kayako. It could be encryption module or just PHP module which only Kayako uses. We were running on 512M RAM slice on Slicehost (virtual private hosting) and we recently moved to 1G Linode virtual private hosting just because we needed more RAM for Kayako and Slicehost price was less sompetitive than Linodes'. Also Slicehost was acquired by Rackspace (no offense but I am not expecting an improvement of qulity from Rackspace comparing when founders were running this business).
    So we own a virtual machine we installed and have a full access. It is monitored by us and by Linode control panel - we see CPU activity, io activity etc.
  8. Igor Kryltsov

    Igor Kryltsov Established Member

    But on the other side if a problem will be found Kayako can incorporate it into install validation and fix it forever for all. This is how I will think if I would be managing support in tech support software company.
  9. Jamie Edwards

    Jamie Edwards Staff Member

    Hi Igor

    Please can you provide me with your ticket ID?
  10. Igor Kryltsov

    Igor Kryltsov Established Member

    Emailed you. This morning client portal worked, admin portal worked. Staff portal showed partially loaded HTML (broken page), Whoops page, than only online staff widget and logo (nothing esle), than whoops page and finally loaded fully after about 10 page refreshes. Before all 3 portals behaved identically.
    Wrote this and did another page refresh to validate in FF in staff portal. This is what I see right now. This is fully loaded by browser.

  11. Igor Kryltsov

    Igor Kryltsov Established Member

    What was a problem?

    In one place Kayako code does this:

    $_pathInfo = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');
    First of all on our server PHP configured (it is shown in admin UI and I guess there is nothing specific about it):
    variables_order = GPCS

    so ENV is not populated. According to PHP site: "There is a performance penalty paid for the registration of these arrays and because ENV is not as commonly used as the others, ENV is is not recommended on productions servers".

    So adding


    into index.php fixed a problem.
    Without it we saw some chunks of URLs from Review Board which is Python application in PATH_INFO time to time and in some cases Kayako uses PATH_INFO to build a URL as a results - a broken URL and 404. Well we can not blame Python and Review Board developers as we see a PHP coding problem here. How many people will hit it and how different their setup from ours - big question. You can not learn from our ticket as knowing that it conflicts with Review Board will be a wrong assumption. Fixing code will be the best conclusion you (Kayako) can make.

    Why this is not handled ($_pathInfo which leads to 404 is not recorded into PHP error log) and why variables_order is not checked before you start using @getenv() - not sure and honestly not interested in. At the end of the day it is not my product. We just have to use it for now. It took us an hour to figure it out after we got access to a code.

    Thank you all who participated and helped.

    HINT: It is very annoying when not all code in the same style for end of lines. Nice when it is all Win or all Unix :)
  12. Igor Kryltsov

    Igor Kryltsov Established Member

    To close this out - fix will be in a next Kayako release :)

Share This Page