php7.2: Deprecated&Warning

Постим сюда все найденые ошибки
Justsar
Posts: 19
Joined: Wed Oct 11, 2017 10:56 am

php7.2: Deprecated&Warning

Post 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
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: php7.2: Deprecated&Warning

Post by admin »

Да, оба поправил для 7.2
Спасибо.
Don't forget to run script update
Justsar
Posts: 19
Joined: Wed Oct 11, 2017 10:56 am

Re: php7.2: Deprecated&Warning

Post 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"
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: php7.2: Deprecated&Warning

Post by admin »

Подскажите плз на каком урле выводит варнинг
Don't forget to run script update
Justsar
Posts: 19
Joined: Wed Oct 11, 2017 10:56 am

Re: php7.2: Deprecated&Warning

Post by Justsar »

admin wrote: Fri May 18, 2018 6:11 am Подскажите плз на каком урле выводит варнинг
На морде сайта, при этом админка работает, а морда лежит с 502 ответом.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: php7.2: Deprecated&Warning

Post by admin »

не может быть 502 если просто пишет в лог варнинг
что в логе вебсервака на этот зарпос?
Don't forget to run script update
Justsar
Posts: 19
Joined: Wed Oct 11, 2017 10:56 am

Re: php7.2: Deprecated&Warning

Post 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
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: php7.2: Deprecated&Warning

Post by admin »

Да, и варинг про deprecated поправил
Don't forget to run script update
Justsar
Posts: 19
Joined: Wed Oct 11, 2017 10:56 am

Re: php7.2: Deprecated&Warning

Post by Justsar »

Обновился, все попрежнему...(( В пм скинул админку.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: php7.2: Deprecated&Warning

Post by admin »

да, обновил у себя версию пхп до последней - увидел варнинг.
Пофикшено в апе.
Don't forget to run script update
Post Reply