[英]my codeigniter is not working on centos (internal server error 500)
[英]500 Internal Server Error on centos
我的請求僅持續3分鍾,並返回500 Internal Server Error。 這是我的Apache error_log文件: Script timed out before returning headers: index.php, referer: ...
有人可以幫助我解決該問題嗎? 我已經設置了執行時間,但仍然無法正常工作: ini_set('max_execution_time', 0);
這是我的代碼
public static function compress($source, $destination)
{
ini_set('max_execution_time', 0);
Tinify\setKey(env('API_KEY'));
Tinify\fromFile($source)->toFile($destination);
}
我的代碼僅使用tinypng api壓縮圖像,我認為它太長了
原因是1.如果您保留了睡眠功能,例如sleep(5000); 2. PHP版本7使它成為5.6。
如果您確實解決了問題,請分享您的答案。 謝謝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.