{"action":"closed","issue":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4450","repository_url":"https://api.github.com/repos/bcit-ci/CodeIgniter","labels_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4450/labels{/name}","comments_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4450/comments","events_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4450/events","html_url":"https://github.com/bcit-ci/CodeIgniter/issues/4450","id":132991461,"number":4450,"title":"post_system hook called before page render","user":{"login":"serazoli","id":11732,"avatar_url":"https://avatars.githubusercontent.com/u/11732?v=3","gravatar_id":"","url":"https://api.github.com/users/serazoli","html_url":"https://github.com/serazoli","followers_url":"https://api.github.com/users/serazoli/followers","following_url":"https://api.github.com/users/serazoli/following{/other_user}","gists_url":"https://api.github.com/users/serazoli/gists{/gist_id}","starred_url":"https://api.github.com/users/serazoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serazoli/subscriptions","organizations_url":"https://api.github.com/users/serazoli/orgs","repos_url":"https://api.github.com/users/serazoli/repos","events_url":"https://api.github.com/users/serazoli/events{/privacy}","received_events_url":"https://api.github.com/users/serazoli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-11T14:44:39Z","updated_at":"2016-02-11T17:07:03Z","closed_at":"2016-02-11T17:07:03Z","body":"in application/config/hooks.php\r\n```php\r\n$hook['post_system'] = function()\r\n{\r\n    $CI =& get_instance();\r\n    $class = $CI->router->fetch_class();\r\n    sleep(10);\r\n    file_put_contents('/tmp/tmp.txt', \"Text after 10 sec $class\");\r\n};\r\n```\r\nin application/config/config.php\r\n```php\r\n$config['enable_hooks'] = TRUE;\r\n```\r\nIn my app i use: https://github.com/chriskacerguis/codeigniter-restserver\r\nI got response in browser only after 10 sec\r\n(I use this extesion for testing https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo)\r\n\r\nI use latest stable version Codeigniter 3.0.4\r\nphp 5.5.9"}}