title: PHP working but Laravel not, returns 503 Service Unavailable
body: <p>The error_log is:</p>
  
  <pre><code>[Thu Feb 21 13:07:41.791781 2019] [proxy_fcgi:error] [pid 19304] [client 59.547.36.85:57554] AH01071: Got error 'PHP message: PHP Notice:  date_default_timezone_set(): Timezone ID 'Asia/Tehran' is invalid in /vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 49
  PHP message: PHP Stack trace:
  PHP message: PHP   1. {main}() /public/index.php:0
  PHP message: PHP   2. App\\Http\\Kernel-&gt;handle() /public/index.php:54
  PHP message: PHP   3. App\\Http\\Kernel-&gt;sendRequestThroughRouter() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
  PHP message: PHP   4. App\\Http\\Kernel-&gt;bootstrap() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:146
  PHP message: PHP   5. Illuminate\\Foundation\\Application-&gt;bootstrapWith() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:162
  PHP message: PHP   6. Illuminate\\Foundation\\Bootstrap\\LoadConfiguration-&gt;bootstrap() /vendor/laravel/framework/src/Illuminate/Foundation/Application.php:211
  PHP message: PHP   7. date_default_timezone_set() /vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php:49
  PHP message: PHP Warning:  Uncaught ErrorException: DateTime::createFromFormat(): Invalid date.timezone value 'Asia/Tehran', we selected the timezone 'UTC' for now. in /vendor/symfony/http-foundation/ResponseHeaderBag.php:295
  Stack trace:
  #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions-&gt;handleError(2, 'DateTime::creat...', '/vendor/symfony...', 295, Array)
  #1 /vendor/symfony/http-foundation/ResponseHeaderBag.php(295): DateTime::createFromFormat('U', '1550741861')
  #2 /vendor/symfony/http-foundation/ResponseHeaderBag.php(41): Symfony\\Component\\HttpFoundation\\ResponseHeaderBag-&gt;initDate()
  #3 /vendor/symfony/http-foundation/Response.php(201): Symfony\\Component\\HttpFoundation\\ResponseHeaderBag-&gt;__construct(Array)
  #4 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Symfony\\Component\\HttpFoundation\\Response-&gt;__construct(Object(Illuminate\\View\\View))
  #5 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(722): Illuminate\\Routing\\Router::toResponse(Object(Illuminat...
  PHP message: PHP Stack trace:
  PHP message: PHP   1. {main}() /public/index.php:0
  PHP message: PHP   2. App\\Http\\Kernel-&gt;handle() /public/index.php:54
  PHP message: PHP   3. App\\Http\\Kernel-&gt;sendRequestThroughRouter() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
  PHP message: PHP   4. Illuminate\\Routing\\Pipeline-&gt;then() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
  PHP message: PHP   5. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
  PHP message: PHP   6. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP   7. App\\Http\\Middleware\\CheckForMaintenanceMode-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP   8. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
  PHP message: PHP   9. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  10. Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  11. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
  PHP message: PHP  12. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  13. App\\Http\\Middleware\\TrimStrings-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  14. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
  PHP message: PHP  15. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  16. Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  17. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
  PHP message: PHP  18. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  19. App\\Http\\Middleware\\TrustProxies-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  20. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/fideloper/proxy/src/TrustProxies.php:57
  PHP message: PHP  21. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  22. Barryvdh\\Cors\\HandleCors-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  23. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/barryvdh/laravel-cors/src/HandleCors.php:36
  PHP message: PHP  24. App\\Http\\Kernel-&gt;Illuminate\\Foundation\\Http\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
  PHP message: PHP  25. Illuminate\\Routing\\Router-&gt;dispatch() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
  PHP message: PHP  26. Illuminate\\Routing\\Router-&gt;dispatchToRoute() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:614
  PHP message: PHP  27. Illuminate\\Routing\\Router-&gt;runRoute() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:625
  PHP message: PHP  28. Illuminate\\Routing\\Router-&gt;runRouteWithinStack() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:659
  PHP message: PHP  29. Illuminate\\Routing\\Pipeline-&gt;then() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:684
  PHP message: PHP  30. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
  PHP message: PHP  31. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  32. App\\Http\\Middleware\\EncryptCookies-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  33. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:66
  PHP message: PHP  34. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  35. Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  36. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37
  PHP message: PHP  37. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  38. Illuminate\\Session\\Middleware\\StartSession-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  39. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63
  PHP message: PHP  40. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  41. Illuminate\\View\\Middleware\\ShareErrorsF
  
      [Thu Feb 21 13:07:41.791912 2019] [proxy_fcgi:error] [pid 19304] [client 59.547.36.85:57554] AH01071: Got error 'closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  44. App\\Http\\Middleware\\VerifyCsrfToken-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  45. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:75
  PHP message: PHP  46. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  47. Illuminate\\Routing\\Middleware\\SubstituteBindings-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  48. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
  PHP message: PHP  49. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  50. Barryvdh\\Cors\\HandleCors-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  51. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/barryvdh/laravel-cors/src/HandleCors.php:36
  PHP message: PHP  52. Illuminate\\Routing\\Router-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
  PHP message: PHP  53. Illuminate\\Routing\\Router-&gt;prepareResponse() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:682
  PHP message: PHP  54. Illuminate\\Routing\\Router::toResponse() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:722
  PHP message: PHP  55. Illuminate\\Http\\Response-&gt;__construct() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:750
  PHP message: PHP  56. Symfony\\Component\\HttpFoundation\\ResponseHeaderBag-&gt;__construct() /vendor/symfony/http-foundation/Response.php:201
  PHP message: PHP  57. Symfony\\Component\\HttpFoundation\\ResponseHeaderBag-&gt;initDate() /vendor/symfony/http-foundation/ResponseHeaderBag.php:41
  PHP message: PHP  58. DateTime::createFromFormat() /vendor/symfony/http-foundation/ResponseHeaderBag.php:295
  PHP message: PHP Fatal error:  DateTime::createFromFormat(): Timezone database is corrupt - this should *never* happen! in /vendor/symfony/http-foundation/ResponseHeaderBag.php on line 295
  PHP message: PHP Stack trace:
  PHP message: PHP   1. {main}() /public/index.php:0
  PHP message: PHP   2. App\\Http\\Kernel-&gt;handle() /public/index.php:54
  PHP message: PHP   3. App\\Http\\Kernel-&gt;sendRequestThroughRouter() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
  PHP message: PHP   4. Illuminate\\Routing\\Pipeline-&gt;then() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
  PHP message: PHP   5. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
  PHP message: PHP   6. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP   7. App\\Http\\Middleware\\CheckForMaintenanceMode-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP   8. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
  PHP message: PHP   9. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  10. Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  11. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
  PHP message: PHP  12. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  13. App\\Http\\Middleware\\TrimStrings-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  14. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
  PHP message: PHP  15. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  16. Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  17. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
  PHP message: PHP  18. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  19. App\\Http\\Middleware\\TrustProxies-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  20. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/fideloper/proxy/src/TrustProxies.php:57
  PHP message: PHP  21. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  22. Barryvdh\\Cors\\HandleCors-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  23. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/barryvdh/laravel-cors/src/HandleCors.php:36
  PHP message: PHP  24. App\\Http\\Kernel-&gt;Illuminate\\Foundation\\Http\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
  PHP message: PHP  25. Illuminate\\Routing\\Router-&gt;dispatch() /vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
  PHP message: PHP  26. Illuminate\\Routing\\Router-&gt;dispatchToRoute() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:614
  PHP message: PHP  27. Illuminate\\Routing\\Router-&gt;runRoute() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:625
  PHP message: PHP  28. Illuminate\\Routing\\Router-&gt;runRouteWithinStack() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:659
  PHP message: PHP  29. Illuminate\\Routing\\Pipeline-&gt;then() /vendor/laravel/framework/src/Illuminate/Routing/Router.php:684
  PHP message: PHP  30. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
  PHP message: PHP  31. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  32. App\\Http\\Middleware\\EncryptCookies-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  33. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:66
  PHP message: PHP  34. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  35. Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  36. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}() /vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37
  PHP message: PHP  37. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}() /vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
  PHP message: PHP  38. Illuminate\\Session\\Middleware\\StartSession-&gt;handle() /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
  PHP message: PHP  39. Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing
  
  [Thu Feb 21 13:07:41.819083 2019] [proxy_fcgi:error] [pid 19304] (104)Connection reset by peer: [client 59.547.36.85:57554] AH01075: Error dispatching request to :
  </code></pre>
  
  <p>but when I <code>die('Working!')</code> in <code>public/index.php</code> it returns <code>Working!</code>. However when I remove that <code>die</code> Laravel returns that error!</p>
  
  <p>I'm using</p>
  
  <p><code>PHP 7.2.14</code>
  <code>Laravel Framework 5.7.27</code></p>
  
  <p>How can I fix it?</p>