2014年4月3日 星期四

更改 mantis 上傳檔案大小的限制

要更改mantis的上傳檔案限制
有三個地方要修改
1) mysql的my.cnf (CentOS 6.2位置在 /etc/my.cnf)
修改 max_allowed_packet=20M; 預設是8M
重啟 /etc/init.d/mysql restart

2) php的php.ini (CentOS 6.2位置在 /etc/php.ini)
修改 upload_max_filesize = 20M
修改 post_max_size = 24M
重啟 apachectl restart

3) mantis的config_inc.php (CentOS 6.2位置在 /mantis/config_inc.php)
修改 $g_max_file_size = 20000000; # 20 MB
如果沒有config_inc.php檔案,就...自己寫一個,內容就只有上述一行就行了,
檔案可以參考config_defaults_inc.php

reference: https://pwbc.garvan.org.au/mantis/view.php?id=119