0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

php artisan -vで出てきたエラーについて

Posted at

つい先日、自己学習も兼ねてDocker + Laravelで遊ぼうとした時に

php artisan -v

と打った時に出会したエラーとその解決方法を書いていく。

出てきたエラーがこちら

[21-Nov-2024 02:57:10 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mbstring.dll' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'php_mbstring.dll' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/php_mbstring.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[21-Nov-2024 11:57:10 Asia/Tokyo] PHP Deprecated:  PHP Startup: Use of mbstring.internal_encoding is deprecated in Unknown on line 0

Deprecated: PHP Startup: Use of mbstring.internal_encoding is deprecated in Unknown on line 0

php_mbstring.dllが見つからなくて後続の処理が止まっているようなのでphp_mbstring.dll関連の処理を外してみる

php.ini
### Development Setting
zend.exception_ignore_args = off
expose_php = on
max_execution_time = 30
max_input_vars = 1000
upload_max_filesize = 1G
upload_max_size=1G
post_max_size = 1G
memory_limit = 100G
error_reporting = E_ALL
display_errors = on
display_startup_errors = on
log_errors = on
error_log = /dev/stderr
default_charset = UTF-8
extension = php_mbstring.dll

[Date]
date.timezone = Asia/Tokyo

[mysqlnd]
mysqlnd.collect_memory_statistics = on

[Assertion]
zend.assertions = 1

[mbstring]
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.encoding_translation = Off
mbstring.detect_order = auto

をこう

php.ini
### Development Setting
zend.exception_ignore_args = off
expose_php = on
max_execution_time = 30
max_input_vars = 1000
upload_max_filesize = 1G
upload_max_size=1G
post_max_size = 1G
memory_limit = 100G
error_reporting = E_ALL
display_errors = on
display_startup_errors = on
log_errors = on
error_log = /dev/stderr
default_charset = UTF-8
; extension = php_mbstring.dll

[Date]
date.timezone = Asia/Tokyo

[mysqlnd]
mysqlnd.collect_memory_statistics = on

[Assertion]
zend.assertions = 1

[mbstring]
; mbstring.language = Japanese
; mbstring.internal_encoding = UTF-8
; mbstring.encoding_translation = Off
; mbstring.detect_order = auto

エラーは無くなった。

が果たしてこれで良かったのか、疑問が残るところ
この辺り詳しい方、コメント残してくれると嬉しいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?