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.

Problem with key.php after install

Discussion in 'Installation and setup (Kayako Classic Download)' started by Robert taylor, Dec 12, 2011.

  1. Robert taylor

    Robert taylor New Member

    Hi,

    I'm installing Kayako 4.30.750. The install has completed successfully.

    when I try to access Kayako, I see this in the browser window:

    ---
    key.php is empty. Please try uploading your key file in Binary mode or contact the Kayako Support at https://my.kayako.com for further assistance.
    ---

    and I see this in my /var/log/httpd/error_log:

    ---
    [Tue Dec 13 07:39:33 2011] [error] [client 192.168.0.88] PHP Warning: file_get_contents(./key.php) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: Permission denied in /var/www/html/__swift/library/class.SWIFT.php on line 82, referer: http://navsupport.hemamaps.local/setup/index.php?/Core/Setup
    ---

    I have re-downloaded the key.php file numerous times, with the same result.
    I've checked permissions on the key.php file itself.

    Does anyone have any ideas, please?
     
  2. Jamie Edwards

    Jamie Edwards Staff Member

    Hi Robert,

    1. Is key.php in your helpdesk's root directory (so in the same directory as __swift, __modules, etc?)
    2. Does the key.php file have permissions for your web server software to access it (ie the same permissions as other PHP files on your helpdesk)?
     
  3. Robert taylor

    Robert taylor New Member

    Thanks for the quick reply, Jamie...

    1. Yes key.php is in the top-level directory where Kayako4 is installed.

    2. Well..I've been looking at permissions...this is what I've got it set to:

    ---
    [root@navsupport html]# ls -la
    total 160
    drwxr-xr-x 16 apache apache 4096 Dec 13 07:23 .
    drwxr-xr-x 8 root root 4096 Oct 21 07:05 ..
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 admin
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 api
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:03 console
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 cron
    -rw-r--r-- 1 apache apache 1086 Dec 6 23:03 favicon.ico
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 geoip
    -rw-r--r-- 1 apache apache 1753 Dec 6 23:03 index.php
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 intranet
    -rwxrwxrwx 1 apache apache 556 Dec 13 07:51 key.php
    drwxr-xr-x 8 apache apache 4096 Dec 6 23:03 __modules
    -rw-r--r-- 1 apache apache 230 Dec 6 23:03 robots.txt
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:03 rss
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 staff
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:03 staffapi
    drwxr-xr-x 15 apache apache 4096 Dec 6 23:04 __swift
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 visitor
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 wallboard
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 winapp
    ---

    So, it looks pretty much like everything else...
     
  4. Robert taylor

    Robert taylor New Member

    I do not understand this...I was doing some playing around with the key file - evil things like deleting bits of text etc.

    Before I started doing this I took a backup copy of the key.php file -> key.php.backup

    After nothing seemed to have any effect, I deleted the key.php file I had been messing with. I then copied the key.php.backup file back to key.php, and what do you know, Kayako suddenly works fine!

    Permissions now look like this:

    ---
    total 184
    drwxr-xr-x 16 apache apache 4096 Dec 13 12:21 .
    drwxr-xr-x 8 root root 4096 Oct 21 07:05 ..
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 admin
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 api
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:03 console
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 cron
    -rw-r--r-- 1 apache apache 1086 Dec 6 23:03 favicon.ico
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 geoip
    -rw-r--r-- 1 apache apache 1753 Dec 6 23:03 index.php
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 intranet
    -rwxr-xr-x 1 root root 556 Dec 13 12:21 key.php
    -rwxrwxrwx 1 apache apache 556 Dec 13 12:13 key.php.backup
    -rw-r--r-- 1 root root 556 Dec 13 12:21 key.php.backup2
    drwxr-xr-x 8 apache apache 4096 Dec 6 23:03 __modules
    -rw-r--r-- 1 root root 39 Dec 13 11:05 phpinfo.php
    -rw-r--r-- 1 apache apache 230 Dec 6 23:03 robots.txt
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:03 rss
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 staff
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:03 staffapi
    drwxr-xr-x 15 apache apache 4096 Dec 6 23:04 __swift
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 visitor
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 wallboard
    drwxr-xr-x 2 apache apache 4096 Dec 6 23:04 winapp
    ---
    I do not understand what might have changed permissions-wise here, but at any rate it is working now...
     
  5. Jamie Edwards

    Jamie Edwards Staff Member

    Hi Robert

    The permissions seemed to have changed on the key.php file during that process. Whatever you did, that seemed to have enabled access to the file.
     
  6. The key.php file is now having ownership changed from 'apache' to 'root', which affected access permissions.
     
  7. Jamie Edwards

    Jamie Edwards Staff Member

    Embarrassed to have missed that :oops:
     
  8. Robert taylor

    Robert taylor New Member

    Thanks for your comments etc.

    Weird thing is, the fie was originally owned by root as I downloaded it directly on the VMWare Kayako machine. I had changed the permissions to apache:apache while trying to fix the issue (which it didn't). I was only when I blew away the original file, and copied the backup file to the original name that things worked.

    If the file had apache:apache, why did I have access problems (httpd runs as apache user) ???
     

Share This Page