K
K
KBsts2018-12-03 17:04:27
PHP
KBsts, 2018-12-03 17:04:27

How to set script execution time when migrating from PHP 5.6 to PHP 7.2?

Some processes on the server require a long time (the volumes are huge in places to process). And when switching from PHP 5.6 to PHP 7.2, this thing pops up

Gateway Timeout

The gateway did not receive a timely response from the upstream server or application.
Apache/2.4.10 (Debian) Server at mydomain.ru Port 443

At the same time, it doesn't seem to work in any way ... On the server, if anything, nginx is not installed. ini_set('max_execution_time', '3600');

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Timofeev, 2018-12-03
@KBsts

Gateway Timeout is not necessarily php related. I would even say "most likely php has nothing to do with it at all". This is if not nginx, then apache is visible. And he also has a config and there is also a timeout.
httpd.apache.org/docs/2.2/mod/core.html#timeout

D
Danny Chase, 2018-12-03
@Dase23

Write directly in the ini file.
Tweak Apache settings, c. Htaccess
And inside the script, try
set_time_limit(0);

V
Viktor Taran, 2018-12-03
@shambler81

.htaccess file

<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question