Hướng dẫn php deprecated: directive track_errors is deprecated in unknown on line 0 - php không được dùng nữa: chỉ thị track_errors không được dùng nữa ở dòng 0 không xác định

4

Mới! Lưu câu hỏi hoặc câu trả lời và sắp xếp nội dung yêu thích của bạn. Tìm hiểu thêm.
Learn more.

Tôi hoàn toàn mới bắt đầu với PHP vì vậy xin hãy tha thứ cho sự thiếu hiểu biết của tôi.

Tôi đang sử dụng phpstorm để chạy tập lệnh PHP. Mỗi lần tôi thực hiện chương trình của mình, tôi sẽ gặp lỗi này:

/opt/lampp/bin/php-7.4.1 -S localhost:3306 -t /path/to/project

Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0
[Tue Feb 18 02:07:07 2020] PHP Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0
[Tue Feb 18 02:07:07 2020] Failed to listen on localhost:3306 [reason: Address already in use]

Tôi đã nhìn ra ngoại lệ và thấy rằng track_errors không được dùng cho là Php 7.2.

Giải pháp cho điều này là giải quyết/xóa phần về track_errors vì vậy tôi đã làm mặc dù nó không khắc phục lỗi.

Tôi không biết gì nên cảm ơn trước

Lazyone

152K43 Huy hiệu vàng370 Huy hiệu bạc373 Huy hiệu đồng43 gold badges370 silver badges373 bronze badges

hỏi ngày 18 tháng 2 năm 2020 lúc 1:26Feb 18, 2020 at 1:26

5

Trong php.ini bạn có thể thử thay đổi

track_errors=On

đến

track_errors=Off

Nó làm việc cho tôi.

Đã trả lời ngày 25 tháng 3 năm 2021 lúc 11:03Mar 25, 2021 at 11:03

Tôi chỉ tự chạy vào tin nhắn này, khi chạy

track_errors=On
0. Khi tôi nhìn vào
track_errors=On
1, tôi phát hiện ra rằng php.ini của tôi đã vài năm tuổi, trong khi các tệp
track_errors=On
3 khác không quá vài tuần tuổi. Tôi đã có thể giải quyết thông báo lỗi bằng cách

sudo mv php.ini php.ini.old
sudo cp php.ini-development php.ini

Đã trả lời ngày 27 tháng 5 năm 2021 lúc 0:55May 27, 2021 at 0:55

Darwin von Coraxdarwin von CoraxDarwin von Corax

5.1413 Huy hiệu vàng17 Huy hiệu bạc27 Huy hiệu đồng3 gold badges17 silver badges27 bronze badges

Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.6.5
PHP version: 7.2.5
PHP binary path: c:\php\php.exe

PHP Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0

track_errors=On
4 vào bảng điều khiển [hoặc mở/lưu một tệp trong siêu phàm] Tôi đã gặp các lỗi sau:
track_errors=On
4
in the console [or opening/saving a file in sublime]
I got the following errors:

PHP Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0
Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
Uncaught InternalException: E_DEPRECATED: __autoload[] is deprecated, use spl_autoload_register[] instead in /usr/local/Cellar/phplint/3.0-20160307/stdlib/errors.php:172
Stack trace:
#0 /usr/local/Cellar/phplint/3.0-20160307/stdlib/all.php[3]: phplint_error_handler[8192, '__autoload[] is...', '/usr/local/Cell...', 80, Array]
#1 /usr/local/Cellar/phplint/3.0-20160307/stdlib/all.php[3]: require_once[]
#2 /usr/local/Cellar/phplint/3.0-20160307/stdlib/it/icosaedro/lint/PHPLint.php[4]: require_once['/usr/local/Cell...']
#3 {main}

Khắc phục tạm thời cho Mac [sử dụng bia]:

track_errors=On
5
track_errors=On
6
track_errors=On
7 [bạn có thể không cần cái này, cài đặt nên liên kết nó]

track_errors=On
5
track_errors=On
6
track_errors=On
7 [you might not need this one, install should link it]

Khởi động lại Sublime + Console và nó hoạt động.

Bài Viết Liên Quan

Chủ Đề