{"action":"closed","issue":{"url":"https://api.github.com/repos/Codiad/Codiad/issues/860","labels_url":"https://api.github.com/repos/Codiad/Codiad/issues/860/labels{/name}","comments_url":"https://api.github.com/repos/Codiad/Codiad/issues/860/comments","events_url":"https://api.github.com/repos/Codiad/Codiad/issues/860/events","html_url":"https://github.com/Codiad/Codiad/issues/860","id":103150509,"number":860,"title":"Plugin Authentication Error","user":{"login":"dugite-code","id":12742064,"avatar_url":"https://avatars.githubusercontent.com/u/12742064?v=3","gravatar_id":"","url":"https://api.github.com/users/dugite-code","html_url":"https://github.com/dugite-code","followers_url":"https://api.github.com/users/dugite-code/followers","following_url":"https://api.github.com/users/dugite-code/following{/other_user}","gists_url":"https://api.github.com/users/dugite-code/gists{/gist_id}","starred_url":"https://api.github.com/users/dugite-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dugite-code/subscriptions","organizations_url":"https://api.github.com/users/dugite-code/orgs","repos_url":"https://api.github.com/users/dugite-code/repos","events_url":"https://api.github.com/users/dugite-code/events{/privacy}","received_events_url":"https://api.github.com/users/dugite-code/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-26T01:39:32Z","updated_at":"2015-10-06T06:46:03Z","closed_at":"2015-10-06T06:46:03Z","body":"I'm having some issues getting some plugins to work on my install (Macro and Terminal plugins), other plugins like markdownpreview and codgit work fine. I am accessing Codiad through an [Iframe](https://github.com/dugite-code/ifrapp) in roundcube and everything else is working fine so far.\r\n\r\nCurrent steps taken:\r\n\r\n* Fresh Codiad install `sudo git clone https://github.com/Codiad/Codiad.git`\r\n* Set owner of the Codiad directory to www-data:www-data with: `sudo chown -R www-data:www-data ./Codiad`\r\n* Disabled all the deny all sections in my nginx config (see below)\r\n* Used a different browser\r\n\r\nI get this error message when I attempt to use the plugins from the sidebar.\r\n```\r\n{\"status\":\"error\",\"message\":\"Authentication Error\"}\r\n```\r\n\r\nFrom my nginx log:\r\n```\r\n2015/08/26 09:25:05 [error] 24595#0: *134 FastCGI sent in stderr: \"PHP message: PHP Warning:  include(/usr/share/roundcubemail/public_html/assets/plugins/ifrapp/Codiad/plugins/Codiad-Macro-master/dialog.php/languages/en.php): failed to open stream: No such file or directory in /usr/share/roundcubemail/plugins/ifrapp/Codiad/common.php on line 99\r\nPHP message: PHP Warning:  include(): Failed opening '/usr/share/roundcubemail/public_html/assets/plugins/ifrapp/Codiad/plugins/Codiad-Macro-master/dialog.php/languages/en.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/roundcubemail/plugins/ifrapp/Codiad/common.php on line 99\" while reading response header from upstream, client: **IP ADDRESS**, server: **SERVER**, request: \"GET /assets/plugins/ifrapp/Codiad/plugins/Codiad-Macro-master/dialog.php?action=config HTTP/1.1\", upstream: \"fastcgi://unix:/var/run/php5-roundcube.sock:\", host: \"**SERVER**\", referrer: \"https://**SERVER**/assets/plugins/ifrapp/Codiad/\"\r\n```\r\n\r\nMy config:\r\n```\r\n<?php\r\n\r\n/*\r\n*  Copyright (c) Codiad & Kent Safranski (codiad.com), distributed\r\n*  as-is and without warranty under the MIT License. See\r\n*  [root]/license.txt for more. This information must remain intact.\r\n*/\r\n\r\n//////////////////////////////////////////////////////////////////\r\n// CONFIG\r\n//////////////////////////////////////////////////////////////////\r\n\r\n// PATH TO CODIAD\r\ndefine(\"BASE_PATH\", \"/usr/share/roundcubemail/public_html/assets/plugins/ifrapp/Codiad\");\r\n\r\n// BASE URL TO CODIAD (without trailing slash)\r\ndefine(\"BASE_URL\", \"https://**Server**/assets/plugins/ifrapp/Codiad\");\r\n\r\n// THEME : default, modern or clear (look at /themes)\r\ndefine(\"THEME\", \"default\");\r\n\r\n// ABSOLUTE PATH\r\ndefine(\"WHITEPATHS\", BASE_PATH . \",/home\");\r\n\r\n// SESSIONS (e.g. 7200)\r\n$cookie_lifetime = \"0\";\r\n\r\n// TIMEZONE\r\ndate_default_timezone_set(\"**TimeZone**\");\r\n\r\n// External Authentification\r\n//define(\"AUTH_PATH\", \"/path/to/customauth.php\");\r\n\r\n//////////////////////////////////////////////////////////////////\r\n// ** DO NOT EDIT CONFIG BELOW **\r\n//////////////////////////////////////////////////////////////////\r\n\r\n// PATHS\r\ndefine(\"COMPONENTS\", BASE_PATH . \"/components\");\r\ndefine(\"PLUGINS\", BASE_PATH . \"/plugins\");\r\ndefine(\"THEMES\", BASE_PATH . \"/themes\");\r\ndefine(\"DATA\", BASE_PATH . \"/data\");\r\ndefine(\"WORKSPACE\", BASE_PATH . \"/workspace\");\r\n\r\n// URLS\r\ndefine(\"WSURL\", BASE_URL . \"/workspace\");\r\n\r\n// Marketplace\r\n//define(\"MARKETURL\", \"http://market.codiad.com/json\");\r\n\r\n// Update Check\r\n//define(\"UPDATEURL\", \"http://update.codiad.com/?v={VER}&o={OS}&p={PHP}&w={WEB}&a={ACT}\");\r\n//define(\"ARCHIVEURL\", \"https://github.com/Codiad/Codiad/archive/master.zip\");\r\n//define(\"COMMITURL\", \"https://api.github.com/repos/Codiad/Codiad/commits\");\r\n```\r\n\r\nnginx config\r\n```\r\n# http part, may want to move that to nginx.conf, but will work here also\r\nfastcgi_cache_path /var/lib/nginx/fastcgi/ levels=1:2 keys_zone=**server**:16m max_size=256m inactive=1d;\r\nfastcgi_temp_path /var/lib/nginx/fastcgi/temp 1 2;\r\nfastcgi_cache_key \"$scheme$request_method$host$request_uri\";\r\nfastcgi_cache_use_stale error timeout invalid_header http_500;\r\n\r\n\r\nserver {\r\n        listen 80;\r\n        server_name **server**;\r\n\r\n        # Force HTTPS useage\r\n        rewrite ^ https://$server_name$request_uri permanent;  # enforce https\r\n}\r\nserver {\r\n        listen 443 ssl;\r\n        server_name **server**;\r\n\r\n        # Logging options\r\n        access_log /var/log/nginx/access.log;\r\n        error_log /var/log/nginx/error.log;\r\n\r\n        ssl_certificate /etc/nginx/ssl/nginx.crt;\r\n        ssl_certificate_key /etc/nginx/ssl/nginx.key;\r\n\r\n        #-------------------------------------------------\r\n        # Gloabl Cache settings\r\n        #-------------------------------------------------\r\n        open_file_cache max=1024 inactive=1m;\r\n        open_file_cache_valid    90s;\r\n        open_file_cache_min_uses 2;\r\n\r\n        #-------------------------------------------------\r\n        # Common Fastcgi settings\r\n        #-------------------------------------------------\r\n        fastcgi_param HTTPS on;\r\n        fastcgi_keep_conn on;\r\n        fastcgi_cache **server**;\r\n        fastcgi_cache_valid 200 302 304 10m;\r\n        fastcgi_cache_valid 301 1h;\r\n        fastcgi_cache_min_uses 2;\r\n        fastcgi_buffers 256 4k;\r\n        fastcgi_busy_buffers_size 8k;\r\n        fastcgi_temp_file_write_size 8k;\r\n\r\n        #-------------------------------------------------\r\n        # Roundcube mail\r\n        #-------------------------------------------------\r\n        location / {\r\n\r\n                index index.php;\r\n                root  /usr/share/roundcubemail/public_html/;\r\n                client_max_body_size 30M; # set maximum upload size for mail attachments\r\n                # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).\r\n                location ~ ^/(README(.md)?|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {\r\n                        deny all;\r\n                }\r\n                location ~ ^/(bin|SQL|config|logs)/ {\r\n                        deny all;\r\n                }\r\n                location ~^/program/(include|lib|localization|steps)/ {\r\n                        deny all;\r\n                }\r\n                location ~ /\\. {\r\n                        deny all;\r\n                        access_log off;\r\n                        log_not_found off;\r\n                }\r\n                location ~* .(jpg|jpeg|png|gif|ico|css)$ {\r\n                        expires 10d;\r\n                }\r\n                location ~ \\.php$ {\r\n                        include fastcgi_params;\r\n                        fastcgi_split_path_info ^(.+\\.php)(/.*)$;\r\n                        fastcgi_pass unix:/var/run/php5-roundcube.sock;\r\n                        fastcgi_param SCRIPT_FILENAME $request_filename;\r\n                        fastcgi_read_timeout 150;\r\n                }\r\n        }\r\n```\r\nphp5 pool config\r\n```\r\n[roundcubemail]\r\nlisten.owner = www-data\r\nlisten.group = www-data\r\nlisten.mode = 0660\r\nrequest_terminate_timeout = 300\r\n\r\nuser = www-data\r\ngroup = www-data\r\nlisten = /var/run/php5-roundcube.sock\r\npm = dynamic\r\npm.max_children = 40\r\npm.start_servers = 15\r\npm.min_spare_servers = 10\r\npm.max_spare_servers = 20\r\nchdir = /\r\n\r\n# Derived from .htaccess of roundcube\r\nphp_flag[display_errors] = Off\r\nphp_flag[log_errors] = On\r\n \r\nphp_value[upload_max_filesize] = 30M\r\nphp_value[post_max_size] = 30M\r\n \r\nphp_flag[zlib.output_compression] = Off\r\nphp_flag[magic_quotes_gpc] = Off\r\nphp_flag[magic_quotes_runtime] = Off\r\nphp_flag[zend.ze1_compatibility_mode] = Off\r\nphp_flag[suhosin.session.encrypt] = Off\r\n \r\nphp_flag[session.auto_start] = Off\r\nphp_value[session.gc_maxlifetime] = 21600\r\nphp_value[session.gc_divisor] = 500\r\nphp_value[session.gc_probability] = 1\r\n \r\n# http://bugs.php.net/bug.php?id=30766\r\nphp_value[mbstring.func_overload] = 0 \r\n```"}}