php - 在 apache2 执行 60 秒后网关超时

标签 php laravel ubuntu apache2

当我运行脚本时,出现网关超时错误。我的服务器是apache2。我进行了以下编辑,但错误仍然存​​在。

文件:/etc/php5/apache2/php.ini

max_execution_time = 0
max_input_time = -1
memory_limit = 128M

文件:/etc/apache2/apache2.conf
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 216000

然后我重新启动服务器 重启操作系统,但错误仍然发生。如何从 增加执行时间60 秒 5 分钟

我在我的项目中使用 php 和 laravel 框架。

这是错误的图像:

enter image description here

最佳答案

增加该值(确保在正确的 php.ini 文件中执行此操作):

max_execution_time = 0
max_input_time = -1
memory_limit = 258M
upload_max_filesize = 256M
post_max_size = 257M

并重新启动 apache:
sudo service apache2 restart

关于php - 在 apache2 执行 60 秒后网关超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50267913/

相关文章:

android - 在 ubuntu 中使用 NDK 为 android 构建 ffmpeg 时出错

php - 在 PHP 中将代码拆分为 header /源文件

php - 在 php 中使用正则表达式将每个前导和尾随空格替换为下划线

php - 如何使用 PHP 对数组的对象属性求和

php - Laravel 和 Simpletest

ubuntu - 无法使用 ubuntu 在 docker 上执行任何命令

ubuntu - 无法将 SIP 客户端与 Asterisk 连接

php - 在 mysql 数据库中使用 pdo 保存复选框值

laravel - PresenceChannels 和 PrivateChannels 之间的区别是什么 - LARAVEL 5.8

php - Laravel 更新后抛出 'The bootstrap/cache directory must be present and writable' 错误