Answers.Body: <p>Problem was being caused because I was trying to access the server through 'localhost' instead of '127.0.0.1'.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-05T03:34:53.327Z
Answers.Text: That's odd, but glad you got it sorted.  Craft should be more gracefully handling that situation, though. If you wouldn't mind helping to debug, could you send an email over to support@buildwithcraft.com so we can see what's going on?
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-04T18:25:01.777Z
Answers.LastActivityDate: 2014-10-04T18:25:01.777Z
Answers.UserDisplayName: Maria Stellini
Body: <p>After I install craft, I am getting the following error when trying to load the website including the admin page: </p>
  
  <pre><code>PHP Stack trace:
  PHP   1. {main}() \aspace\index.php:0
  PHP   2. require_once() \aspace\index.php:14
  PHP   3. CApplication-&gt;run() \aspace\craft\app\index.php:35
  PHP   4. Craft\WebApp-&gt;processRequest() \aspace\craft\app\framework\base\CApplication.php:180
  PHP   5. Craft\UserSessionService-&gt;requireLogin() \aspace\craft\app\etc\web\WebApp.php:272
  PHP   6. CHttpRequest-&gt;redirect() \aspace\craft\app\services\UserSessionService.php:371
  PHP   7. CApplication-&gt;end() \aspace\craft\app\framework\web\CHttpRequest.php:805
  PHP   8. CApplication-&gt;handleError() \aspace\craft\app\framework\base\CApplication.php:0
  PHP   9. CErrorHandler-&gt;handle() \aspace\craft\app\framework\base\CApplication.php:816
  PHP  10. Craft\ErrorHandler-&gt;handleError() \aspace\craft\app\framework\base\CErrorHandler.php:131
  PHP  11. CErrorHandler-&gt;handleError() \aspace\craft\app\etc\errors\ErrorHandler.php:152
  PHP  12. CErrorHandler-&gt;render() \aspace\craft\app\framework\base\CErrorHandler.php:289
  PHP  13. CWebApplication-&gt;runController() \aspace\craft\app\framework\base\CErrorHandler.php:331
  PHP  14. CController-&gt;run() \aspace\craft\app\framework\web\CWebApplication.php:282
  PHP  15. CController-&gt;runActionWithFilters() \aspace\craft\app\framework\web\CController.php:265
  PHP  16. CController-&gt;runAction() \aspace\craft\app\framework\web\CController.php:286
  PHP  17. CInlineAction-&gt;runWithParams() \aspace\craft\app\framework\web\CController.php:308
  PHP  18. Craft\TemplatesController-&gt;actionRenderError() \aspace\craft\app\framework\web\actions\CInlineAction.php:49
  PHP  19. Craft\BaseController-&gt;renderTemplate() \aspace\craft\app\controllers\TemplatesController.php:190
  PHP  20. Craft\TemplatesService-&gt;render() \aspace\craft\app\controllers\BaseController.php:98
  PHP  21. Twig_Environment-&gt;render() \aspace\craft\app\services\TemplatesService.php:220
  PHP  22. Twig_Environment-&gt;loadTemplate() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:292
  PHP  23. __TwigTemplate_d77269d0acd17023cd9970dd5812452d2a881ef03373e6e22c0d80eb68481e00-&gt;__construct() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:345
  PHP  24. Twig_Environment-&gt;loadTemplate() \aspace\craft\storage\runtime\compiled_templates\d7\72\69d0acd17023cd9970dd5812452d2a881ef03373e6e22c0d80eb68481e00.php:10
  PHP  25. __TwigTemplate_9fccce442511366b01108e1e704c62f53125ce92b05eb6545ea02e38a06a15b3-&gt;__construct() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:345
  PHP  26. Twig_Environment-&gt;loadTemplate() \aspace\craft\storage\runtime\compiled_templates\9f\cc\ce442511366b01108e1e704c62f53125ce92b05eb6545ea02e38a06a15b3.php:10
  PHP  27. Twig_Environment-&gt;getTemplateClass() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:323
  PHP  28. Craft\TemplateLoader-&gt;getCacheKey() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:265
  PHP  29. Craft\TemplateLoader-&gt;_findTemplate() \aspace\craft\app\etc\templating\twigextensions\TemplateLoader.php:71
  PHP  30. Craft\TemplatesService-&gt;findTemplate() \aspace\craft\app\etc\templating\twigextensions\TemplateLoader.php:119
  PHP  31. Craft\TemplatesService-&gt;_validateTemplateName() \aspace\craft\app\services\TemplatesService.php:835
  PHP  32. Craft\PathHelper::ensurePathIsContained() \aspace\craft\app\services\TemplatesService.php:1178
  PHP  33. Craft\HttpRequestService-&gt;decodePathInfo() \aspace\craft\app\helpers\PathHelper.php:29
  PHP  34. Craft\StringHelper::convertToUTF8() \aspace\craft\app\services\HttpRequestService.php:1072
  PHP  35. Craft\StringHelper::getEncoding() \aspace\craft\app\helpers\StringHelper.php:390
  PHP  36. mb_detect_encoding() \aspace\craft\app\helpers\StringHelper.php:460
  </code></pre>
  
  <p>Can anyone help me with this error?</p>
  
Tags: <install><php><setup>
Title: PHP error after installation
ThreadText: # PHP error after installation
  
  (Asked by: username_0 on 2014-10-04)
  
  After I install craft, I am getting the following error when trying to load the website including the admin page:
  
  ```
  PHP Stack trace:
  PHP   1. {main}() \aspace\index.php:0
  PHP   2. require_once() \aspace\index.php:14
  PHP   3. CApplication->run() \aspace\craft\app\index.php:35
  PHP   4. Craft\WebApp->processRequest() \aspace\craft\app\framework\base\CApplication.php:180
  PHP   5. Craft\UserSessionService->requireLogin() \aspace\craft\app\etc\web\WebApp.php:272
  PHP   6. CHttpRequest->redirect() \aspace\craft\app\services\UserSessionService.php:371
  PHP   7. CApplication->end() \aspace\craft\app\framework\web\CHttpRequest.php:805
  PHP   8. CApplication->handleError() \aspace\craft\app\framework\base\CApplication.php:0
  PHP   9. CErrorHandler->handle() \aspace\craft\app\framework\base\CApplication.php:816
  PHP  10. Craft\ErrorHandler->handleError() \aspace\craft\app\framework\base\CErrorHandler.php:131
  PHP  11. CErrorHandler->handleError() \aspace\craft\app\etc\errors\ErrorHandler.php:152
  PHP  12. CErrorHandler->render() \aspace\craft\app\framework\base\CErrorHandler.php:289
  PHP  13. CWebApplication->runController() \aspace\craft\app\framework\base\CErrorHandler.php:331
  PHP  14. CController->run() \aspace\craft\app\framework\web\CWebApplication.php:282
  PHP  15. CController->runActionWithFilters() \aspace\craft\app\framework\web\CController.php:265
  PHP  16. CController->runAction() \aspace\craft\app\framework\web\CController.php:286
  PHP  17. CInlineAction->runWithParams() \aspace\craft\app\framework\web\CController.php:308
  PHP  18. Craft\TemplatesController->actionRenderError() \aspace\craft\app\framework\web\actions\CInlineAction.php:49
  PHP  19. Craft\BaseController->renderTemplate() \aspace\craft\app\controllers\TemplatesController.php:190
  PHP  20. Craft\TemplatesService->render() \aspace\craft\app\controllers\BaseController.php:98
  PHP  21. Twig_Environment->render() \aspace\craft\app\services\TemplatesService.php:220
  PHP  22. Twig_Environment->loadTemplate() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:292
  PHP  23. __TwigTemplate_d77269d0acd17023cd9970dd5812452d2a881ef03373e6e22c0d80eb68481e00->__construct() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:345
  PHP  24. Twig_Environment->loadTemplate() \aspace\craft\storage\runtime\compiled_templates\d7\72\69d0acd17023cd9970dd5812452d2a881ef03373e6e22c0d80eb68481e00.php:10
  PHP  25. __TwigTemplate_9fccce442511366b01108e1e704c62f53125ce92b05eb6545ea02e38a06a15b3->__construct() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:345
  PHP  26. Twig_Environment->loadTemplate() \aspace\craft\storage\runtime\compiled_templates\9f\cc\ce442511366b01108e1e704c62f53125ce92b05eb6545ea02e38a06a15b3.php:10
  PHP  27. Twig_Environment->getTemplateClass() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:323
  PHP  28. Craft\TemplateLoader->getCacheKey() \aspace\craft\app\vendor\twig\twig\lib\Twig\Environment.php:265
  PHP  29. Craft\TemplateLoader->_findTemplate() \aspace\craft\app\etc\templating\twigextensions\TemplateLoader.php:71
  PHP  30. Craft\TemplatesService->findTemplate() \aspace\craft\app\etc\templating\twigextensions\TemplateLoader.php:119
  PHP  31. Craft\TemplatesService->_validateTemplateName() \aspace\craft\app\services\TemplatesService.php:835
  PHP  32. Craft\PathHelper::ensurePathIsContained() \aspace\craft\app\services\TemplatesService.php:1178
  PHP  33. Craft\HttpRequestService->decodePathInfo() \aspace\craft\app\helpers\PathHelper.php:29
  PHP  34. Craft\StringHelper::convertToUTF8() \aspace\craft\app\services\HttpRequestService.php:1072
  PHP  35. Craft\StringHelper::getEncoding() \aspace\craft\app\helpers\StringHelper.php:390
  PHP  36. mb_detect_encoding() \aspace\craft\app\helpers\StringHelper.php:460
  
  ```
  
  Can anyone help me with this error?
  
  **Tags:** install, php, setup
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2014-10-04. Score: 2
  
  Problem was being caused because I was trying to access the server through 'localhost' instead of '127.0.0.1'.
  
  > **Comments:**
  > **username_1**: That's odd, but glad you got it sorted.  Craft should be more gracefully handling that situation, though. If you wouldn't mind helping to debug, could you send an email over to support@buildwithcraft.com so we can see what's going on?  
  
  ---
  
  