Related
I have configured my db-connection in my *.env-file in my Laravel Framework 9.48.0 project, which I would like to try on github codespaces. I want to connect to an externally hosted db server.
When running php artisan migrate I get:
#githubcoder ➜ /workspaces/ghProject (main ✗) $ php artisan migrate:fresh
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port).
Dropping all tables .................................................................................................................... 11ms FAIL
Illuminate\Database\QueryException
could not find driver (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
756▕ // If an exception occurs when attempting to run a query, we'll format the error
757▕ // message to include the bindings with SQL, which will make this exception a
758▕ // lot more helpful to the developer instead of just the database's errors.
759▕ catch (Exception $e) {
➜ 760▕ throw new QueryException(
761▕ $query, $this->prepareBindings($bindings), $e
762▕ );
763▕ }
764▕ }
+44 vendor frames
45 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port).
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port).
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port).
I tried to enable ;extension=pdo_mysql.so however in my php.ini file this option does not exist:
phpinfo()
PHP Version => 8.1.4
System => Linux codespaces-58b9f9 5.4.0-1100-azure #106~18.04.1-Ubuntu SMP Mon Dec 12 21:49:35 UTC 2022 x86_64
Build Date => Dec 19 2022 20:29:04
Build System => Linux buildkitsandbox 5.15.0-1024-azure #30-Ubuntu SMP Wed Nov 16 23:37:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Configure Command => './configure' '--prefix=/usr/local/php/8.1.4' '--with-config-file-path=/usr/local/php/8.1.4/ini' '--with-config-file-scan-dir=/usr/local/php/8.1.4/ini/conf.d' '--enable-option-checking=fatal' '--with-curl' '--with-libedit' '--with-openssl' '--with-zlib' '--with-password-argon2' '--with-sodium=shared' '--with-pear' 'EXTENSION_DIR=/usr/local/php/8.1.4/extensions'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/php/8.1.4/ini
Loaded Configuration File => /usr/local/php/8.1.4/ini/php.ini
Scan this dir for additional .ini files => /usr/local/php/8.1.4/ini/conf.d
Additional .ini files parsed => /usr/local/php/8.1.4/ini/conf.d/xdebug.ini
PHP API => 20210902
PHP Extension => 20210902
Zend Extension => 420210902
Zend Extension Build => API420210902,NTS
PHP Extension Build => API20210902,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters => zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk
This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.1.4, Copyright (c) Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans
_______________________________________________________________________
Configuration
Core
PHP Version => 8.1.4
Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
expose_php => On => On
extension_dir => /usr/local/php/8.1.4/extensions => /usr/local/php/8.1.4/extensions
fiber.stack_size => no value => no value
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/local/php/8.1.4/lib/php => .:/usr/local/php/8.1.4/lib/php
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => -1 => -1
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
syslog.facility => LOG_USER => LOG_USER
syslog.filter => no-ctrl => no-ctrl
syslog.ident => php => php
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => -1 => -1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.exception_ignore_args => On => On
zend.exception_string_param_max_len => 0 => 0
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
zend.signal_check => Off => Off
ctype
ctype functions => enabled
curl
cURL support => enabled
cURL Information => 7.68.0
Age => 5
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => Yes
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => Yes
GSSAPI => Yes
KERBEROS5 => Yes
UNIX_SOCKETS => Yes
PSL => Yes
HTTPS_PROXY => Yes
MULTI_SSL => No
BROTLI => Yes
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-pc-linux-gnu
SSL Version => OpenSSL/1.1.1f
ZLib Version => 1.2.11
libSSH Version => libssh/0.9.3/openssl/zlib
Directive => Local Value => Master Value
curl.cainfo => no value => no value
date
date/time support => enabled
timelib version => 2021.11
"Olson" Timezone Database Version => 2021.5
Timezone Database => internal
Default timezone => UTC
Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.833333 => 90.833333
date.sunset_zenith => 90.833333 => 90.833333
date.timezone => no value => no value
dom
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.10
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled
fileinfo
fileinfo support => enabled
libmagic => 540
filter
Input Validation and Filtering => enabled
Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value
hash
hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat murmur3a murmur3c murmur3f xxh32 xxh64 xxh3 xxh128 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
iconv
iconv support => enabled
iconv implementation => glibc
iconv library version => 2.31
...
Any suggestions how to connect from codespaces to an externaly hosted db?
I appreciate your replies
I fixed this issue using Devcontainers. Here is my config:
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "codespaces-laravel",
"dockerComposeFile": ["docker-compose.yml"],
"workspaceFolder": "/workspace",
"service": "app",
"shutdownAction": "stopCompose",
"extensions": [
"editorconfig.editorconfig",
"ryannaddy.laravel-artisan",
"amiralizadeh9480.laravel-extra-intellisense",
"stef-k.laravel-goto-controller",
"codingyu.laravel-goto-view",
"mikestead.dotenv",
"eg2.tslint",
"christian-kohler.path-intellisense",
"esbenp.prettier-vscode",
"CoenraadS.bracket-pair-colorizer"
],
"settings": {
"#terminal.integrated.shell.linux": "/bin/bash"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [80],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cp .env.example .env && composer install && php artisan key:generate && yarn install && yarn run development",
"portsAttributes": {
"80": {
"label": "HTTP"
}
}
}
I'm using AlmaLinux 8.4, and I'm trying to install Zend Opcache and verify that it's running.
In Easy Apache, php8 and php80-php-opcache are installed. php -1 shows Zend is not enabled, while php -a does, and 10-opcache.ini is loaded. (I see that CLI is not enabled, but I don't need it.)
Apache and PHP-FPM have been restarted several times.
Is this configuration correct?
How do I determine if Zend Opcode is actually running?
[root}# php -i shows:
Zend OPcache
Opcode Caching => Disabled
Optimization => Disabled
SHM Cache => Enabled
File Cache => Disabled
JIT => On
Startup Failed => Opcode Caching is disabled for CLI
Loaded Configuration File => /opt/cpanel/ea-php80/root/etc/php.ini
Additional .ini files parsed => /opt/cpanel/ea-php80/root/etc/php.d/10-opcache.ini
Core
PHP Version => 8.0.9
zend.assertions => -1 => -1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.exception_ignore_args => Off => Off
zend.exception_string_param_max_len => 15 => 15
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
zend.signal_check => Off => Off
The file /opt/cpanel/ea-php80/root/etc/php.d/10-opcache.ini shows
Enable Zend OPcache extension module
zend_extension=opcache.so
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=0
; The OPcache shared memory storage size.
opcache.memory_consumption=128
; The amount of memory for interned strings in Mbytes.
opcache.interned_strings_buffer=8
; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 100000 are allowed.
opcache.max_accelerated_files=4000
php -a shows
php > print_r(opcache_get_configuration());
Array
(
[directives] => Array
(
[opcache.enable] => 1
[opcache.enable_cli] =>
[opcache.use_cwd] => 1
[opcache.validate_timestamps] => 1
[opcache.validate_permission] => 1
[opcache.validate_root] =>
[opcache.dups_fix] =>
[opcache.revalidate_path] =>
[opcache.log_verbosity_level] => 1
[opcache.memory_consumption] => 134217728
[opcache.interned_strings_buffer] => 8
[opcache.max_accelerated_files] => 4000
[opcache.max_wasted_percentage] => 0.05
[opcache.consistency_checks] => 0
[opcache.force_restart_timeout] => 180
[opcache.revalidate_freq] => 2
[opcache.preferred_memory_model] =>
[opcache.blacklist_filename] => /opt/cpanel/ea-php80/root/etc/php.d/opcache*.blacklist
[opcache.max_file_size] => 0
[opcache.error_log] =>
[opcache.protect_memory] =>
[opcache.save_comments] => 1
[opcache.record_warnings] =>
[opcache.enable_file_override] =>
[opcache.optimization_level] => 2147401727
[opcache.lockfile_path] => /tmp
[opcache.file_cache] =>
[opcache.file_cache_only] =>
[opcache.file_cache_consistency_checks] => 1
[opcache.file_update_protection] => 2
[opcache.opt_debug_level] => 0
[opcache.restrict_api] =>
[opcache.huge_code_pages] =>
[opcache.preload] =>
[opcache.preload_user] =>
[opcache.jit] => tracing
[opcache.jit_buffer_size] => 0
[opcache.jit_debug] => 0
[opcache.jit_bisect_limit] => 0
[opcache.jit_blacklist_root_trace] => 16
[opcache.jit_blacklist_side_trace] => 8
[opcache.jit_hot_func] => 127
[opcache.jit_hot_loop] => 64
[opcache.jit_hot_return] => 8
[opcache.jit_hot_side_exit] => 8
[opcache.jit_max_exit_counters] => 8192
[opcache.jit_max_loop_unrolls] => 8
[opcache.jit_max_polymorphic_calls] => 2
[opcache.jit_max_recursive_calls] => 2
[opcache.jit_max_recursive_returns] => 2
[opcache.jit_max_root_traces] => 1024
[opcache.jit_max_side_traces] => 128
[opcache.jit_prof_threshold] => 0
)
[version] => Array
(
[version] => 8.0.9
[opcache_product_name] => Zend OPcache
)
[blacklist] => Array
(
)
)
To determine if the opcache is enabled and working and ensure that the JIT actually works, create a PHP script that's accessible via the browser and look at the output of opcache_get_status().
Example PHP file can be:
var_dump(opcache_get_status());
Example output when it is enabled is:
array(9) {
["opcache_enabled"]=>
bool(true)
...
if the opcache extension is not installed or not enabled it will throw this error:
Fatal error: Uncaught Error: Call to undefined function opcache_get_status()
Another option is that you print out your phpinfo and check for opcache in the output:
<?php phpinfo(); ?>
I'm using Apache/2.4.29 with PHP 7.4.5 as module.
Apache and PHP are configured with lito as user.
Virtualhost configuration with PHP settings:
php_admin_value opcache.enabled 1
php_admin_value opcache.preload /home/lito/www/preload.php
php_admin_value opcache.preload_user lito
phpinfo show opcache configuration:
opcache.enable On
opcache.preload /home/lito/www/preload.php
opcache.preload_user lito
No errors on apache log.
After apache restart opcache_get_status haven't any key related with preload status (preload_statistics) and there are only one script preloaded (current phpinfo.php):
Array
(
[opcache_enabled] => 1
[cache_full] =>
[restart_pending] =>
[restart_in_progress] =>
[memory_usage] => Array
(
[used_memory] => 9168872
[free_memory] => 125047784
[wasted_memory] => 1072
[current_wasted_percentage] => 0.00079870223999023
)
[interned_strings_usage] => Array
(
[buffer_size] => 6291008
[used_memory] => 522888
[free_memory] => 5768120
[number_of_strings] => 10969
)
[opcache_statistics] => Array
(
[num_cached_scripts] => 1
[num_cached_keys] => 1
[max_cached_keys] => 16229
[hits] => 1
[start_time] => 1587378881
[last_restart_time] => 0
[oom_restarts] => 0
[hash_restarts] => 0
[manual_restarts] => 0
[misses] => 3
[blacklist_misses] => 0
[blacklist_miss_ratio] => 0
[opcache_hit_rate] => 25
)
[scripts] => Array
(
[/home/lito/www/phpinfo.php] => Array
(
[full_path] => /home/lito/www/phpinfo.php
[hits] => 0
[memory_consumption] => 1040
[last_used] => Mon Apr 20 12:39:15 2020
[last_used_timestamp] => 1587379155
[timestamp] => 1587378955
)
)
)
Is not available opcache preload on Apache with PHP as module (without a custom php.ini)?
Thanks!
UPDATE: Tested adding preload file on /etc/php/7.4/apache2/php.ini and it works fine.
Similar (for nginx with php-fpm): https://bugs.php.net/bug.php?id=79043#1578412872
As far as I can tell, it looks like preloading is not in effect when configured this way.
Answer from PHP core dev:
yes, as preloading happens during early server startup, enabling it through php_admin_value does not work.
At first I wanted to use PostgreSQL as the database for my Laravel project. I have tried to changed everything as people posted online such as:
1. changing 'default' => env('DB_CONNECTION', 'mysql') to 'default' => env('DB_CONNECTION', 'pgsql')
2. Setup my .env file to follow the postgresql configuration
I have already installed postgresql as it returns psql (10.1, server 9.5.10) as I type pgsql in my terminal
However, whenever I tried to php artisan migrate it will shows some errors (I forget to capture the error). After few hours of surfing I found this tutorial that seemed promising. I followed everything and it took a little while. When it finished, I tried to type php artisan migrate in terminal and what returned was
hznk:fraudet hznk$ php artisan migrate
hznk:fraudet hznk$
here is the php info:
PHP Version => 7.0.15
System => Darwin hznk.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64
Build Date => Dec 29 2017 18:33:15
Configure Command => './configure' '--without-iconv'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20151012
PHP Extension => 20151012
Zend Extension => 320151012
Zend Extension Build => API320151012,NTS
PHP Extension Build => API20151012,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => php, file, glob, data, http, ftp, phar
Registered Stream Socket Transports => tcp, udp, unix, udg
Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
_______________________________________________________________________
Configuration
Core
PHP Version => 7.0.15
Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => no value => no value
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20151012 => /usr/local/lib/php/extensions/no-debug-non-zts-20151012
file_uploads => On => On
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/local/lib/php => .:/usr/local/lib/php
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => Off => Off
log_errors_max_len => 1024 => 1024
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => no value => no value
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 17 => 17
short_open_tag => On => On
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => EGPCS => EGPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => 1 => 1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
ctype
ctype functions => enabled
date
date/time support => enabled
"Olson" Timezone Database Version => 2016.10
Timezone Database => internal
Default timezone => UTC
Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value
dom
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.4
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled
fileinfo
fileinfo support => enabled
version => 1.0.5
libmagic => 522
filter
Input Validation and Filtering => enabled
Revision => $Id: 28fcca4bfda9c9907588a64d245b49cb398249d8 $
Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value
hash
hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
json
json support => enabled
json version => 1.4.0
libxml
libXML support => active
libXML Compiled Version => 2.9.4
libXML Loaded Version => 20904
libXML streams => enabled
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.38 2015-11-23
PCRE JIT Support => enabled
Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.jit => 1 => 1
pcre.recursion_limit => 100000 => 100000
PDO
PDO support => enabled
PDO drivers => sqlite
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.14.2
Phar
Phar: PHP Archive support => enabled
Phar EXT version => 2.0.2
Phar API version => 1.1.1
SVN revision => $Id: bf89220e0ebdb68ebb5379ffc0a32997f94e77e7 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => disabled (install ext/zlib)
bzip2 compression => disabled (install pecl/bz2)
OpenSSL support => disabled (install ext/openssl)
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On
posix
Revision => $Id: b691ca925e7a085e6929579c4eba8fed0732e0ef $
Reflection
Reflection => enabled
Version => $Id: 3054da9d8c9ebb2a7e0a7df1f0cdf3cbbe9f8bd8 $
session
Session Support => enabled
Registered save handlers => files user
Registered serializer handlers => php_serialize php php_binary
Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => /dev/urandom => /dev/urandom
session.entropy_length => 32 => 32
session.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 4 => 4
session.hash_function => 0 => 0
session.lazy_write => On => On
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_strict_mode => Off => Off
session.use_trans_sid => 0 => 0
SimpleXML
Simplexml support => enabled
Revision => $Id: b8b5c37931a53e50a937c0aef2a26d351e173215 $
Schema support => enabled
SPL
SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
sqlite3
SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.14.2
Directive => Local Value => Master Value
sqlite3.extension_dir => no value => no value
standard
Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i
Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.exception => 0 => 0
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,form=,fieldset= => a=href,area=href,frame=src,form=,fieldset=
user_agent => no value => no value
tokenizer
Tokenizer Support => enabled
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.4
xmlreader
XMLReader => enabled
xmlwriter
XMLWriter => enabled
Additional Modules
Module Name
Environment
Variable => Value
rvm_bin_path => /Users/hznk/.rvm/bin
TERM_PROGRAM => Apple_Terminal
GEM_HOME => /Users/hznk/.rvm/gems/ruby-2.3.1
SHELL => /bin/bash
TERM => xterm-256color
IRBRC => /Users/hznk/.rvm/rubies/ruby-2.3.1/.irbrc
TMPDIR => /var/folders/4v/kht4d5qn0j72c3gt9qtcsjl80000gn/T/
Apple_PubSub_Socket_Render => /private/tmp/com.apple.launchd.zAbLo6t0xL/Render
TERM_PROGRAM_VERSION => 400
OLDPWD => /Users/hznk
MY_RUBY_HOME => /Users/hznk/.rvm/rubies/ruby-2.3.1
TERM_SESSION_ID => 53575832-8EDD-4165-BB5A-31CD66A41C40
USER => hznk
_system_type => Darwin
rvm_path => /Users/hznk/.rvm
SSH_AUTH_SOCK => /private/tmp/com.apple.launchd.46FwM34Zls/Listeners
rvm_prefix => /Users/hznk
PATH => /Users/hznk/anaconda2/bin:/opt/local/bin:/opt/local/sbin:/Users/hznk/.composer/vendor/bin:/Users/hznk/.rvm/gems/ruby-2.3.1/bin:/Users/hznk/.rvm/gems/ruby-2.3.1#global/bin:/Users/hznk/.rvm/rubies/ruby-2.3.1/bin:/Users/hznk/.rbenv/shims:/Users/hznk/.rbenv/shims:/Users/hznk/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/hznk/.rvm/bin:/opt/metasploit-framework/bin:/opt/metasploit-framework/bin
PWD => /Applications/XAMPP/htdocs/fraudet
_system_arch => x86_64
XPC_FLAGS => 0x0
_system_version => 10.13
RBENV_SHELL => bash
XPC_SERVICE_NAME => 0
rvm_version => 1.27.0 (latest)
SHLVL => 1
HOME => /Users/hznk
LOGNAME => hznk
GEM_PATH => /Users/hznk/.rvm/gems/ruby-2.3.1:/Users/hznk/.rvm/gems/ruby-2.3.1#global
LC_CTYPE => UTF-8
DISPLAY => /private/tmp/com.apple.launchd.mAwrunwzZa/org.macosforge.xquartz:0
RUBY_VERSION => ruby-2.3.1
_system_name => OSX
_ => /usr/local/bin/php
PHP Variables
Variable => Value
$_SERVER['rvm_bin_path'] => /Users/hznk/.rvm/bin
$_SERVER['TERM_PROGRAM'] => Apple_Terminal
$_SERVER['GEM_HOME'] => /Users/hznk/.rvm/gems/ruby-2.3.1
$_SERVER['SHELL'] => /bin/bash
$_SERVER['TERM'] => xterm-256color
$_SERVER['IRBRC'] => /Users/hznk/.rvm/rubies/ruby-2.3.1/.irbrc
$_SERVER['TMPDIR'] => /var/folders/4v/kht4d5qn0j72c3gt9qtcsjl80000gn/T/
$_SERVER['Apple_PubSub_Socket_Render'] => /private/tmp/com.apple.launchd.zAbLo6t0xL/Render
$_SERVER['TERM_PROGRAM_VERSION'] => 400
$_SERVER['OLDPWD'] => /Users/hznk
$_SERVER['MY_RUBY_HOME'] => /Users/hznk/.rvm/rubies/ruby-2.3.1
$_SERVER['TERM_SESSION_ID'] => 53575832-8EDD-4165-BB5A-31CD66A41C40
$_SERVER['USER'] => hznk
$_SERVER['_system_type'] => Darwin
$_SERVER['rvm_path'] => /Users/hznk/.rvm
$_SERVER['SSH_AUTH_SOCK'] => /private/tmp/com.apple.launchd.46FwM34Zls/Listeners
$_SERVER['rvm_prefix'] => /Users/hznk
$_SERVER['PATH'] => /Users/hznk/anaconda2/bin:/opt/local/bin:/opt/local/sbin:/Users/hznk/.composer/vendor/bin:/Users/hznk/.rvm/gems/ruby-2.3.1/bin:/Users/hznk/.rvm/gems/ruby-2.3.1#global/bin:/Users/hznk/.rvm/rubies/ruby-2.3.1/bin:/Users/hznk/.rbenv/shims:/Users/hznk/.rbenv/shims:/Users/hznk/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/hznk/.rvm/bin:/opt/metasploit-framework/bin:/opt/metasploit-framework/bin
$_SERVER['PWD'] => /Applications/XAMPP/htdocs/fraudet
$_SERVER['_system_arch'] => x86_64
$_SERVER['XPC_FLAGS'] => 0x0
$_SERVER['_system_version'] => 10.13
$_SERVER['RBENV_SHELL'] => bash
$_SERVER['XPC_SERVICE_NAME'] => 0
$_SERVER['rvm_version'] => 1.27.0 (latest)
$_SERVER['SHLVL'] => 1
$_SERVER['HOME'] => /Users/hznk
$_SERVER['LOGNAME'] => hznk
$_SERVER['GEM_PATH'] => /Users/hznk/.rvm/gems/ruby-2.3.1:/Users/hznk/.rvm/gems/ruby-2.3.1#global
$_SERVER['LC_CTYPE'] => UTF-8
$_SERVER['DISPLAY'] => /private/tmp/com.apple.launchd.mAwrunwzZa/org.macosforge.xquartz:0
$_SERVER['RUBY_VERSION'] => ruby-2.3.1
$_SERVER['_system_name'] => OSX
$_SERVER['_'] => /usr/local/bin/php
$_SERVER['PHP_SELF'] => test.php
$_SERVER['SCRIPT_NAME'] => test.php
$_SERVER['SCRIPT_FILENAME'] => test.php
$_SERVER['PATH_TRANSLATED'] => test.php
$_SERVER['DOCUMENT_ROOT'] =>
$_SERVER['REQUEST_TIME_FLOAT'] => 1514551615.1487
$_SERVER['REQUEST_TIME'] => 1514551615
$_SERVER['argv'] => Array
(
[0] => test.php
)
$_SERVER['argc'] => 1
$_ENV['rvm_bin_path'] => /Users/hznk/.rvm/bin
$_ENV['TERM_PROGRAM'] => Apple_Terminal
$_ENV['GEM_HOME'] => /Users/hznk/.rvm/gems/ruby-2.3.1
$_ENV['SHELL'] => /bin/bash
$_ENV['TERM'] => xterm-256color
$_ENV['IRBRC'] => /Users/hznk/.rvm/rubies/ruby-2.3.1/.irbrc
$_ENV['TMPDIR'] => /var/folders/4v/kht4d5qn0j72c3gt9qtcsjl80000gn/T/
$_ENV['Apple_PubSub_Socket_Render'] => /private/tmp/com.apple.launchd.zAbLo6t0xL/Render
$_ENV['TERM_PROGRAM_VERSION'] => 400
$_ENV['OLDPWD'] => /Users/hznk
$_ENV['MY_RUBY_HOME'] => /Users/hznk/.rvm/rubies/ruby-2.3.1
$_ENV['TERM_SESSION_ID'] => 53575832-8EDD-4165-BB5A-31CD66A41C40
$_ENV['USER'] => hznk
$_ENV['_system_type'] => Darwin
$_ENV['rvm_path'] => /Users/hznk/.rvm
$_ENV['SSH_AUTH_SOCK'] => /private/tmp/com.apple.launchd.46FwM34Zls/Listeners
$_ENV['rvm_prefix'] => /Users/hznk
$_ENV['PATH'] => /Users/hznk/anaconda2/bin:/opt/local/bin:/opt/local/sbin:/Users/hznk/.composer/vendor/bin:/Users/hznk/.rvm/gems/ruby-2.3.1/bin:/Users/hznk/.rvm/gems/ruby-2.3.1#global/bin:/Users/hznk/.rvm/rubies/ruby-2.3.1/bin:/Users/hznk/.rbenv/shims:/Users/hznk/.rbenv/shims:/Users/hznk/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/hznk/.rvm/bin:/opt/metasploit-framework/bin:/opt/metasploit-framework/bin
$_ENV['PWD'] => /Applications/XAMPP/htdocs/fraudet
$_ENV['_system_arch'] => x86_64
$_ENV['XPC_FLAGS'] => 0x0
$_ENV['_system_version'] => 10.13
$_ENV['RBENV_SHELL'] => bash
$_ENV['XPC_SERVICE_NAME'] => 0
$_ENV['rvm_version'] => 1.27.0 (latest)
$_ENV['SHLVL'] => 1
$_ENV['HOME'] => /Users/hznk
$_ENV['LOGNAME'] => hznk
$_ENV['GEM_PATH'] => /Users/hznk/.rvm/gems/ruby-2.3.1:/Users/hznk/.rvm/gems/ruby-2.3.1#global
$_ENV['LC_CTYPE'] => UTF-8
$_ENV['DISPLAY'] => /private/tmp/com.apple.launchd.mAwrunwzZa/org.macosforge.xquartz:0
$_ENV['RUBY_VERSION'] => ruby-2.3.1
$_ENV['_system_name'] => OSX
$_ENV['_'] => /usr/local/bin/php
I am wondering if anyone could help me with this problem. Thank you.
Note: I am using mac high Sierra and my php version is 7.0.15
oh nevermind, I found out php.ini that I use was blank. So I tried to copied from the one in XAMPP. When I run php artisan migrate it shows
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so, 9): image not found in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php:113
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/bootstrap.php(19): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding('Call to undefin...', 'UTF-8', 'ASCII')
#1 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(1157): mb_convert_encoding('Call to undefin...', 'utf8', 'ASCII')
#2 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(745): Symfony\Component\Console\Application->splitStringByWidth('Call to undefin...', 75)
#3 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(719): Symfony\Component\Console\Application->doRenderException(Object(Symfony\Component\Debug\Exception\FatalThrowableError), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Applications/XAMPP/xamppfiles/ht in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php on line 113
PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php:113
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/bootstrap.php(19): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding('Uncaught Error:...', 'UTF-8', 'ASCII')
#1 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(1157): mb_convert_encoding('Uncaught Error:...', 'utf8', 'ASCII')
#2 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(745): Symfony\Component\Console\Application->splitStringByWidth('Uncaught Error:...', 75)
#3 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(719): Symfony\Component\Console\Application->doRenderException(Object(Symfony\Component\Debug\Exception\FatalErrorException), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Applications/XAMPP/xamppfiles/ht in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php on line 113
hznk:fraudet hznk$ php artisan migrate
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_pgsql.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20151012/pgsql.so, 9): image not found in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php:113
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/bootstrap.php(19): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding('Call to undefin...', 'UTF-8', 'ASCII')
#1 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(1157): mb_convert_encoding('Call to undefin...', 'utf8', 'ASCII')
#2 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(745): Symfony\Component\Console\Application->splitStringByWidth('Call to undefin...', 75)
#3 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(719): Symfony\Component\Console\Application->doRenderException(Object(Symfony\Component\Debug\Exception\FatalThrowableError), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Applications/XAMPP/xamppfiles/ht in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php on line 113
PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php:113
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/bootstrap.php(19): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding('Uncaught Error:...', 'UTF-8', 'ASCII')
#1 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(1157): mb_convert_encoding('Uncaught Error:...', 'utf8', 'ASCII')
#2 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(745): Symfony\Component\Console\Application->splitStringByWidth('Uncaught Error:...', 75)
#3 /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/console/Application.php(719): Symfony\Component\Console\Application->doRenderException(Object(Symfony\Component\Debug\Exception\FatalErrorException), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Applications/XAMPP/xamppfiles/ht in /Applications/XAMPP/xamppfiles/htdocs/fraudet/vendor/symfony/polyfill-mbstring/Mbstring.php on line 113
at least it shows something. Gotta work on this first and I'll let you know if I succeed with this problem.
I'm running a vanilla Amazon EC2 server. I installed PHP 5.5.21 myself. My web application is built on Laravel. For weeks, everything was working flawlessly. Now, however, when running the Laravel command to update the database schema:
php artisan migrate
I get the following error:
PHP Fatal error: Call to undefined function Symfony\Component\Console\mb_convert_variables() in /var/www/mysite/vendor/symfony/console/Symfony/Component/Console/Application.php on line 1154
Oddly, I haven't made any updates or installed any packages between the time it was working and when it ceased to work. (At least I think. I checked my history to be sure.)
I don't believe that this is an issue with Laravel, per se. My research suggests that mb_convert_variables is supposed to be a built-in PHP function.
Here's line 1154 of Application.php that is throwing the error:
mb_convert_variables($encoding, 'utf8', $lines);
And here is it in the larger context. It's interesting the mb_convert_encoding(...) seems to be working fine:
private function splitStringByWidth($string, $width)
{
// str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
// additionally, array_slice() is not enough as some character has doubled width.
// we need a function to split string not by character count but by string width
if (!function_exists('mb_strwidth')) {
return str_split($string, $width);
}
if (false === $encoding = mb_detect_encoding($string)) {
return str_split($string, $width);
}
$utf8String = mb_convert_encoding($string, 'utf8', $encoding);
$lines = array();
$line = '';
foreach (preg_split('//u', $utf8String) as $char) {
// test if $char could be appended to current line
if (mb_strwidth($line.$char, 'utf8') <= $width) {
$line .= $char;
continue;
}
// if not, push current line to array and make new line
$lines[] = str_pad($line, $width);
$line = $char;
}
if (strlen($line)) {
$lines[] = count($lines) ? str_pad($line, $width) : $line;
}
mb_convert_variables($encoding, 'utf8', $lines);
return $lines;
}
I'm not sure if this is helpful, but here's a list of all installed PHP modules:
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib
And here's some of the output of php -i:
phpinfo()
PHP Version => 5.5.21
System => Linux ip-172-31-6-34 3.14.26-24.46.amzn1.x86_64 #1 SMP Wed Dec 10 10:02:43 UTC 2014 x86_64
Build Date => Feb 11 2015 23:17:00
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php-5.5.d
Additional .ini files parsed => /etc/php-5.5.d/bz2.ini,
/etc/php-5.5.d/calendar.ini,
/etc/php-5.5.d/ctype.ini,
/etc/php-5.5.d/curl.ini,
/etc/php-5.5.d/dom.ini,
/etc/php-5.5.d/exif.ini,
/etc/php-5.5.d/fileinfo.ini,
/etc/php-5.5.d/ftp.ini,
/etc/php-5.5.d/gettext.ini,
/etc/php-5.5.d/iconv.ini,
/etc/php-5.5.d/json.ini,
/etc/php-5.5.d/mcrypt.ini,
/etc/php-5.5.d/mysqlnd.ini,
/etc/php-5.5.d/mysqlnd_mysql.ini,
/etc/php-5.5.d/mysqlnd_mysqli.ini,
/etc/php-5.5.d/pdo.ini,
/etc/php-5.5.d/pdo_mysqlnd.ini,
/etc/php-5.5.d/pdo_sqlite.ini,
/etc/php-5.5.d/phar.ini,
/etc/php-5.5.d/php.ini,
/etc/php-5.5.d/posix.ini,
/etc/php-5.5.d/shmop.ini,
/etc/php-5.5.d/simplexml.ini,
/etc/php-5.5.d/sockets.ini,
/etc/php-5.5.d/sqlite3.ini,
/etc/php-5.5.d/sysvmsg.ini,
/etc/php-5.5.d/sysvsem.ini,
/etc/php-5.5.d/sysvshm.ini,
/etc/php-5.5.d/tokenizer.ini,
/etc/php-5.5.d/xml.ini,
/etc/php-5.5.d/xml_wddx.ini,
/etc/php-5.5.d/xmlreader.ini,
/etc/php-5.5.d/xmlwriter.ini,
/etc/php-5.5.d/xsl.ini,
/etc/php-5.5.d/zip.ini
PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS
PHP Extension Build => API20121212,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => enabled
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*
Core
PHP Version => 5.5.21
Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib64/php/5.5/modules => /usr/lib64/php/5.5/modules
file_uploads => On => On
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/share/pear:/usr/share/php => .:/usr/share/pear:/usr/share/php
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 17 => 17
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
ctype
ctype functions => enabled
ereg
Regex Library => Bundled library enabled
exif
EXIF Support => enabled
EXIF Version => 1.4 $Id: 7f95ff43ea7cc9a2c41a912863ed70069c0e34c5 $
Supported EXIF Version => 0220
Supported filetypes => JPEG,TIFF
Directive => Local Value => Master Value
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15
fileinfo
fileinfo support => enabled
version => 1.0.5
filter
Input Validation and Filtering => enabled
Revision => $Id: 4d3899e089e6e45b157975ceef2ac7deb6e9d762 $
Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value
ftp
FTP support => enabled
gettext
GetText Support => enabled
hash
hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
iconv
iconv support => enabled
iconv implementation => glibc
iconv library version => 2.17
Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1
json
json support => enabled
json version => 1.3.6
JSON-C headers version => 0.11
JSON-C library version => 0.11
libxml
libXML support => active
libXML Compiled Version => 2.9.1
libXML Loaded Version => 20901
libXML streams => enabled
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
Version => 2.5.8
Api No => 20021217
Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream
Directive => Local Value => Master Value
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
mhash
MHASH support => Enabled
MHASH API Version => Emulated Support
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1k-fips 8 Jan 2015
OpenSSL Header Version => OpenSSL 1.0.1k-fips 8 Jan 2015
pcntl
pcntl support => enabled
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.21 2011-12-12
Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000
PDO
PDO support => enabled
PDO drivers => mysql, sqlite
pdo_mysql
PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $
Directive => Local Value => Master Value
pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.7.17
Phar
Phar: PHP Archive support => enabled
Phar EXT version => 2.0.2
Phar API version => 1.1.1
SVN revision => $Id: cc0fad28eb9ea42466f756c3b5fc22c764e32690 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
Native OpenSSL support => enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On
posix
Revision => $Id: 1dfa9997ed76804e53c91e0ce862f3707617b6ed $
readline
Readline Support => enabled
Readline library => EditLine wrapper
Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \> => \b \>
Reflection
Reflection => enabled
Version => $Id: 95b780d3f0d017feba96a5c35cca9541186114ad $
session
Session Support => enabled
Registered save handlers => files user
Registered serializer handlers => php_serialize php php_binary wddx
Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => /dev/urandom => /dev/urandom
session.entropy_length => 32 => 32
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_strict_mode => Off => Off
session.use_trans_sid => 0 => 0
shmop
shmop support => enabled
SimpleXML
Simplexml support => enabled
Revision => $Id: a915862ec47f9589309acc4996ca8f6179788746 $
Schema support => enabled
sockets
Sockets Support => enabled
SPL
SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
standard
Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i
Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value
sysvmsg
sysvmsg support => enabled
Revision => $Id: adf1d2d6be849c46eed3c3ee6f1cbebd1448d6e5 $
tokenizer
Tokenizer Support => enabled
wddx
WDDX Support => enabled
WDDX Session Serializer => enabled
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.1
xmlreader
XMLReader => enabled
xmlwriter
XMLWriter => enabled
xsl
XSL => enabled
libxslt Version => 1.1.28
libxslt compiled against libxml Version => 2.9.1
EXSLT => enabled
libexslt Version => 1.1.28
zip
Zip => enabled
Extension Version => $Id: 05dd1ecc211075107543b0ef8cee488dd229fccf $
Zip version => 1.11.0
Compiled against libzip version => 0.10.1
zlib
ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.7
Linked Version => 1.2.7
Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value
Additional Modules
Module Name
sysvsem
sysvshm
I have a few questions regarding this:
How can I fix it?
What could I have done wrong that messed it up?
Thanks!
From datasage comment:
You need to install a package named something like php-mbstring. Name may vary depending on the exact version of linux.
Example:
sudo yum install php55-mbstring