Page 1 of 3
php7.2: Deprecated&Warning
Posted: Wed May 16, 2018 6:06 am
by Justsar
Сайт лежит со статусом 502. При обновление скрипта в консоли:
Code: Select all
PHP Warning: Use of undefined constant BASE_DIR - assumed 'BASE_DIR' (this will throw an Error in a future version of PHP) in /var/www/site.net/html/scj/includes/prepare.php on line 0.
В логах:
Code: Select all
FastCGI sent in stderr: "PHP message: PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/site.net/html/scj/includes/libs/functions.php on line 0
PHP message: PHP Deprecated: Function create_function() is deprecated in /var/www/site.net/html/scj/includes/libs/functions.php on line 0
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Re: php7.2: Deprecated&Warning
Posted: Wed May 16, 2018 6:14 pm
by admin
Да, оба поправил для 7.2
Спасибо.
Re: php7.2: Deprecated&Warning
Posted: Fri May 18, 2018 4:30 am
by Justsar
admin wrote: Wed May 16, 2018 6:14 pm
Да, оба поправил для 7.2
Спасибо.
Всегда пожалуйста!

Только после обновления все равно в логах:
Code: Select all
2018/05/18 11:20:55 [error] 16575#16575: *2804 FastCGI sent in stderr: "PHP message: PHP Deprecated: Function create_function() is deprecated in /var/www/myself/site.net/html/scj/includes/libs/functions.php on line 0
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message: PHP Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
PHP message:
2018/05/18 11:20:55 [error] 16575#16575: *2804 upstream sent too big header while reading response header from upstream, client: 194.28.205.120, server: site.net, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm_scj.sock:", host: "site.net"
Re: php7.2: Deprecated&Warning
Posted: Fri May 18, 2018 6:11 am
by admin
Подскажите плз на каком урле выводит варнинг
Re: php7.2: Deprecated&Warning
Posted: Sat May 19, 2018 3:40 am
by Justsar
admin wrote: Fri May 18, 2018 6:11 am
Подскажите плз на каком урле выводит варнинг
На морде сайта, при этом админка работает, а морда лежит с 502 ответом.
Re: php7.2: Deprecated&Warning
Posted: Sat May 19, 2018 8:44 am
by admin
не может быть 502 если просто пишет в лог варнинг
что в логе вебсервака на этот зарпос?
Re: php7.2: Deprecated&Warning
Posted: Sat May 19, 2018 9:25 am
by Justsar
Выше логи вебсервера. С 502 ошибкой разобрался - ошибка была из-за того, что размер заголовка ответа одного из бэкендов больше, чем Nginx может прочитать. Надо увеличивать буфера для одного соединения. А варнинги так и остались+новые появились:
Code: Select all
Deprecated: Function create_function() is deprecated in /var/www/myself/site.net/html/scj/includes/libs/functions.php on line 0
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant category_name - assumed 'category_name' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Deprecated: Function create_function() is deprecated in /var/www/myself/site.net/html/scj/includes/libs/functions.php on line 0
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: Use of undefined constant total_ctr - assumed 'total_ctr' (this will throw an Error in a future version of PHP) in /var/www/myself/site.net/html/scj/includes/libs/functions.php(0) : runtime-created function on line 1
Warning: session_start(): Cannot start session when headers already sent in /var/www/myself/site.net/html/scj/tube/index.php on line 0
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/myself/site.net/html/scj/includes/libs/tpl_functions.php on line 0
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/myself/site.net/html/scj/includes/libs/tpl_functions.php on line 0
Re: php7.2: Deprecated&Warning
Posted: Mon May 21, 2018 6:32 am
by admin
Да, и варинг про deprecated поправил
Re: php7.2: Deprecated&Warning
Posted: Thu May 24, 2018 6:24 am
by Justsar
Обновился, все попрежнему...(( В пм скинул админку.
Re: php7.2: Deprecated&Warning
Posted: Tue May 29, 2018 11:39 am
by admin
да, обновил у себя версию пхп до последней - увидел варнинг.
Пофикшено в апе.