|
 |
|
ผมใช้ mpdf บน localhost สร้าง pdf ขึั้นปกติแต่พออัพขึ้น host กับไม่แสดงอะไรเลยครับ |
|
 |
|
|
 |
 |
|
เดาไม่ถูกครับ เท่าที่เห็นตัวโค้ดไม่มีปัญหา ดูเหมือนจะเป็นอย่างนั้น
ต้องตรวจ error log บน production server หรือเว็บจริงนั่นครับ
https://www.php.net/manual/en/errorfunc.configuration.php
ปรับใน .htaccess, .user.ini แล้วแต่ว่าใช้ web server แบบไหน
ปรับสำหรับบน production server
display_errors 0, Off
error_reporting E_ALL
display_startup_errors 0, Off
log_errors 1, On
error_log /path/ไป/ยัง/log.log
จากนั้นเอา log มาดูจะเจอปัญหา
แต่ว่า ความจริงถ้ากรณีอย่างนี้ บน server จริงไม่ทำงานแต่ localhost ทำงาน นี่แสดงว่ามันมีปัญหาตั้งแต่บน localhost แล้วครับ แต่คุณดันไปปิด error เอาไว้
ดังนั้นบน development server, localhost ให้เปิดแสดง error ด้วยเพื่อจะได้แก้ปัญหาแต่เนิ่นๆ ไม่ให้มีเหตุการณ์อย่างนี้อีก
https://rundiz.com/?p=171 กำหนด php.ini ที่เหมาะสำหรับ development mode.
|
ประวัติการแก้ไข 2021-02-16 18:27:24
 |
 |
 |
 |
Date :
2021-02-16 18:26:53 |
By :
mr.v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|