วันเสาร์ที่ 11 มีนาคม พ.ศ. 2560

Laravel Internal Error 500 caused by permission in a linux system.

Although Laravel has a "Whoops" screen to show an error log helping developers to easily identify problems in their coding line by line, what if they do when a HTTP error is shown instead. This problem should be likely to happen when migrating project into a Linux system with an old traditional way.

Think of situation when you are working with a shared Linux hosting. All you have been grant is only a FTP to transfer web stuffs. Mean that composer won't be available to use anymore. Now, all of stuffs are uploaded to a Web server. First time you surf into any of path of a project, the "HTTP 500 Internal Server Error" may show out to the screen with no clues.

A web browser shows that HTTP ERROR 500 message.


This problem is caused by permission issue that should be set properly to the folder.
In an example, a Laravel version is 5.4 (which is the newest for now).
From root folder, look for a Storage folder. It is a logged files folder. With a default permission set of value, a web server is not be able to write errors in it. To fix this issue you have to manually give permissions for the group as 777 to /storage/framework/sessions and /storage/logs so both your login user and web server user can write to that log in the folders.

A big thanks to
http://stackoverflow.com/questions/23540083/failed-to-open-stream-permission-denied-error-laravel

วันอังคารที่ 13 ธันวาคม พ.ศ. 2559

สวัสดี ธันวาคม 2559 อากาศดี๊ดี


เริ่มต้นด้วยการสวัสดี แต่คงไม่จากลาไปแค่นี้
(ไอ้หนุ่มแว่นข้างบนไม่ใช่ผมนะ 555)
ผมมีความตั้งใจที่จะทำ Blog มานานแล้ว แต่ก็ไม่ได้เริ่มทำซักที เหตุผลก็เพราะต่างๆนานา
สุดท้ายแล้วสรุปได้ว่าที่ผ่านมาทั้งหมดคือ "ขี้เกียจ"
หลังจากปลีกตัวเองออกจากโลกโซเชียลได้ซักพัก ก็คนพบว่าชีวิตแม่งเริ่มดีขึ้น มีเวลาทำสิ่งที่มีประโยชน์มากขึ้น

Blog นี้ก็เป็นหนึ่งในเป้าหมายที่ผมวางไว้สำหรับปี 2560 ที่กำลังจะมาถึง
ถามว่าในนี้จะมีอะไร...  ตอนนี้อาจจะยังตอบตัวเองไม่ได้ครบถ้วน แต่สิ่งหนึ่งที่เป็นเหตุผลหลักเลยคือ เก็บบันทึกเรื่องราวในชีวิตซึ่งส่วนใหญ่มักจะเป็นความรู้ต่างๆที่ลงทุนนั่งอ่านนั่งศึกษา รวมถึงลงมือทำขึ้นมา เพราะหลายสิ่งที่ผ่านไปนั้น พอทำไปนานๆก็ลืม มาคิดดูตอนนี้ช่างน่าเสียดายจริงๆ

สุดท้ายนี้ผมตั้งใจให้ Blog นี้จะเป็นกล่องเก็บสาระสำคัญในอนาคตข้างหน้าสำหรับให้คนได้เข้ามาอ่าน หรือแสดงความเห็นกันนะครับ