laravel migration raise could not find driver under docker - laravel
I installed laravel 5.8(with mysql) app under docker with php:7.1-apache
and running the migration I got error that could not find driver :
root#3b62eed328c1:/var/www/ticketly_docker_root# php artisan migrate
In Connection.php line 664:
could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE')
In PDOConnection.php line 31:
could not find driver
In PDOConnection.php line 27:
could not find driver
In my _Docker/web/Dockerfile.yml file I have mysqli, pdo and pdo_mysql installed :
FROM php:7.1-apache
RUN apt-get update && \
apt-get install -y \
python \
libfreetype6-dev \
libwebp-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
nano \
mc \
git-core \
curl \
build-essential \
openssl \
libssl-dev \
libgmp-dev \
libldap2-dev \
netcat \
locate \
&& git clone https://github.com/nodejs/node.git \
&& cd node \
&& git checkout v12.0.0 \
&& ./configure \
&& make \
&& make install
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install gd mysqli pdo pdo_mysql zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite
COPY virtualhost.conf /etc/apache2/sites-enabled/000-default.conf
and entering in the bash I check installed modules:
# php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gmp
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
sysvmsg
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
root#ff277e39b8f3:/var/www/ticketly_docker_root# php -v
PHP 7.1.33 (cli) (built: Oct 25 2019 06:33:10) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
I see mysqli, pdo_mysql installed.
In _Docker/docker-compose.yml I have :
db:
container_name: ticketly_db
image: mysql:5.7.28
restart: always
environment:
- MYSQL_DATABASE=DockerTicketly
- MYSQL_USER=docker_user
- MYSQL_PASSWORD=4321
- MYSQL_ALLOW_EMPTY_PASSWORD=false
- MYSQL_ROOT_PASSWORD=321
volumes:
- ${DB_PATH_HOST}:/var/lib/mysql
and in .env of app:
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=DockerTicketly
DB_USERNAME=docker_user
DB_PASSWORD=4321
What did I miss in the installation ?
MODIFIED BLOCK:
I added into _Docker/web/Dockerfile.yml lines :
FROM php:7.1-apache
RUN apt-get update && \
apt-get install -y \
python \
libfreetype6-dev \
libwebp-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
nano \
mc \
git-core \
curl \
build-essential \
openssl \
libssl-dev \
libgmp-dev \
libldap2-dev \
netcat \
locate \
&& git clone https://github.com/nodejs/node.git \
&& cd node \
&& git checkout v12.0.0 \
&& ./configure \
&& make \
&& make install
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install gd pdo pdo_mysql zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
COPY virtualhost.conf /etc/apache2/sites-enabled/000-default.conf
but after recompile I got the same errors
Are commands above correct?
In .env:
# I tried both variants below after cache clearing. Which of them have I to use ?
DB_CONNECTION=mysqli
# DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=DockerTicketly
DB_USERNAME=docker_user
DB_PASSWORD=4321
My current confuguration:
# php -v
\PHP 7.1.33 (cli) (built: Oct 25 2019 06:33:10) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
root#a03a8839fff2:/var/www/ticketly_docker_root# php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gmp
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
sysvmsg
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
# php -i
phpinfo()
PHP Version => 7.1.33
System => Linux a03a8839fff2 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64
Build Date => Oct 25 2019 06:31:52
Configure Command => './configure' '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-pdo-sqlite=/usr' '--with-sqlite3=/usr' '--with-curl' '--with-libedit' '--with-openssl' '--with-zlib' '--with-libdir=lib/x86_64-linux-gnu' '--with-apxs2' '--disable-cgi' 'build_alias=x86_64-linux-gnu'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc/php
Loaded Configuration File => (none)
Scan this dir for additional .ini files => /usr/local/etc/php/conf.d
Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini,
/usr/local/etc/php/conf.d/docker-php-ext-exif.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gmp.ini,
/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sysvmsg.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
PHP API => 20160303
PHP Extension => 20160303
Zend Extension => 320160303
Zend Extension Build => API320160303,NTS
PHP Extension Build => API20160303,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib.*, convert.iconv.*, 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.1.0, Copyright (c) 1998-2018 Zend Technologies
_______________________________________________________________________
Configuration
bcmath
BCMath support => enabled
Directive => Local Value => Master Value
bcmath.scale => 0 => 0
Core
PHP Version => 7.1.33
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
expose_php => On => On
extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20160303 => /usr/local/lib/php/extensions/no-debug-non-zts-20160303
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/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 => 4096K => 4096K
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 => -t -i => -t -i
serialize_precision => -1 => -1
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
zend.signal_check => Off => Off
ctype
ctype functions => enabled
curl
cURL support => enabled
cURL Information => 7.64.0
Age => 4
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
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.1d
ZLib Version => 1.2.11
libSSH Version => libssh2/1.8.0
date
date/time support => enabled
timelib version => 2016.05
"Olson" Timezone Database Version => 2018.7
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
exif
EXIF Support => enabled
EXIF Version => 7.1.33
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
libmagic => 522
filter
Input Validation and Filtering => enabled
Revision => $Id: 5a34caaa246b9df197f4b43af8ac66a07464fe4b $
Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value
ftp
FTP support => enabled
FTPS support => enabled
gd
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.9.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.6.36
WBMP Support => enabled
XBM Support => enabled
WebP Support => enabled
Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1
gmp
gmp support => enabled
GMP version => 6.1.2
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 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
MHASH support => Enabled
MHASH API Version => Emulated Support
iconv
iconv support => enabled
iconv implementation => glibc
iconv library version => 2.28
Directive => Local Value => Master Value
iconv.input_encoding => no value => no value
iconv.internal_encoding => no value => no value
iconv.output_encoding => no value => no value
json
json support => enabled
json version => 1.5.0
ldap
LDAP Support => enabled
RCS Version => $Id: 5f1913de8e05a346da913956f81e0c0d8991c7cb $
Total Links => 0/unlimited
API Version => 3001
Vendor Name => OpenLDAP
Vendor Version => 20447
Directive => Local Value => Master Value
ldap.max_links => Unlimited => Unlimited
libxml
libXML support => active
libXML Compiled Version => 2.9.4
libXML Loaded Version => 20904
libXML streams => enabled
mbstring
Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled
libmbfl version => 1.3.2
oniguruma version => 5.9.6
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) backtrack check => On
Multibyte regex (oniguruma) version => 5.9.6
Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => no value => no value
mbstring.http_output => no value => no value
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.internal_encoding => no value => no value
mbstring.language => neutral => neutral
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value
mysqli
MysqlI Support => enabled
Client API library version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Active Persistent Links => 0
Inactive Persistent Links => 0
Active Links => 0
Directive => Local Value => Master Value
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
mysqlnd
mysqlnd => enabled
Version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Compression => supported
core SSL => supported
extended SSL => supported
Command buffer size => 4096
Read buffer size => 32768
Read timeout => 31536000
Collecting statistics => Yes
Collecting memory statistics => No
Tracing => n/a
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_sha256_password
API Extensions => mysqli,pdo_mysql
mysqlnd statistics =>
bytes_sent => 0
bytes_received => 0
packets_sent => 0
packets_received => 0
protocol_overhead_in => 0
protocol_overhead_out => 0
bytes_received_ok_packet => 0
bytes_received_eof_packet => 0
bytes_received_rset_header_packet => 0
bytes_received_rset_field_meta_packet => 0
bytes_received_rset_row_packet => 0
bytes_received_prepare_response_packet => 0
bytes_received_change_user_packet => 0
packets_sent_command => 0
packets_received_ok => 0
packets_received_eof => 0
packets_received_rset_header => 0
packets_received_rset_field_meta => 0
packets_received_rset_row => 0
packets_received_prepare_response => 0
packets_received_change_user => 0
result_set_queries => 0
non_result_set_queries => 0
no_index_used => 0
bad_index_used => 0
slow_queries => 0
buffered_sets => 0
unbuffered_sets => 0
ps_buffered_sets => 0
ps_unbuffered_sets => 0
flushed_normal_sets => 0
flushed_ps_sets => 0
ps_prepared_never_executed => 0
ps_prepared_once_executed => 0
rows_fetched_from_server_normal => 0
rows_fetched_from_server_ps => 0
rows_buffered_from_client_normal => 0
rows_buffered_from_client_ps => 0
rows_fetched_from_client_normal_buffered => 0
rows_fetched_from_client_normal_unbuffered => 0
rows_fetched_from_client_ps_buffered => 0
rows_fetched_from_client_ps_unbuffered => 0
rows_fetched_from_client_ps_cursor => 0
rows_affected_normal => 0
rows_affected_ps => 0
rows_skipped_normal => 0
rows_skipped_ps => 0
copy_on_write_saved => 0
copy_on_write_performed => 0
command_buffer_too_small => 0
connect_success => 0
connect_failure => 0
connection_reused => 0
reconnect => 0
pconnect_success => 0
active_connections => 0
active_persistent_connections => 0
explicit_close => 0
implicit_close => 0
disconnect_close => 0
in_middle_of_command_close => 0
explicit_free_result => 0
implicit_free_result => 0
explicit_stmt_close => 0
implicit_stmt_close => 0
mem_emalloc_count => 0
mem_emalloc_amount => 0
mem_ecalloc_count => 0
mem_ecalloc_amount => 0
mem_erealloc_count => 0
mem_erealloc_amount => 0
mem_efree_count => 0
mem_efree_amount => 0
mem_malloc_count => 0
mem_malloc_amount => 0
mem_calloc_count => 0
mem_calloc_amount => 0
mem_realloc_count => 0
mem_realloc_amount => 0
mem_free_count => 0
mem_free_amount => 0
mem_estrndup_count => 0
mem_strndup_count => 0
mem_estrdup_count => 0
mem_strdup_count => 0
mem_edupl_count => 0
mem_dupl_count => 0
proto_text_fetched_null => 0
proto_text_fetched_bit => 0
proto_text_fetched_tinyint => 0
proto_text_fetched_short => 0
proto_text_fetched_int24 => 0
proto_text_fetched_int => 0
proto_text_fetched_bigint => 0
proto_text_fetched_decimal => 0
proto_text_fetched_float => 0
proto_text_fetched_double => 0
proto_text_fetched_date => 0
proto_text_fetched_year => 0
proto_text_fetched_time => 0
proto_text_fetched_datetime => 0
proto_text_fetched_timestamp => 0
proto_text_fetched_string => 0
proto_text_fetched_blob => 0
proto_text_fetched_enum => 0
proto_text_fetched_set => 0
proto_text_fetched_geometry => 0
proto_text_fetched_other => 0
proto_binary_fetched_null => 0
proto_binary_fetched_bit => 0
proto_binary_fetched_tinyint => 0
proto_binary_fetched_short => 0
proto_binary_fetched_int24 => 0
proto_binary_fetched_int => 0
proto_binary_fetched_bigint => 0
proto_binary_fetched_decimal => 0
proto_binary_fetched_float => 0
proto_binary_fetched_double => 0
proto_binary_fetched_date => 0
proto_binary_fetched_year => 0
proto_binary_fetched_time => 0
proto_binary_fetched_datetime => 0
proto_binary_fetched_timestamp => 0
proto_binary_fetched_string => 0
proto_binary_fetched_json => 0
proto_binary_fetched_blob => 0
proto_binary_fetched_enum => 0
proto_binary_fetched_set => 0
proto_binary_fetched_geometry => 0
proto_binary_fetched_other => 0
init_command_executed_count => 0
init_command_failed_count => 0
com_quit => 0
com_init_db => 0
com_query => 0
com_field_list => 0
com_create_db => 0
com_drop_db => 0
com_refresh => 0
com_shutdown => 0
com_statistics => 0
com_process_info => 0
com_connect => 0
com_process_kill => 0
com_debug => 0
com_ping => 0
com_time => 0
com_delayed_insert => 0
com_change_user => 0
com_binlog_dump => 0
com_table_dump => 0
com_connect_out => 0
com_register_slave => 0
com_stmt_prepare => 0
com_stmt_execute => 0
com_stmt_send_long_data => 0
com_stmt_close => 0
com_stmt_reset => 0
com_stmt_set_option => 0
com_stmt_fetch => 0
com_deamon => 0
bytes_received_real_data_normal => 0
bytes_received_real_data_ps => 0
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1d 10 Sep 2019
OpenSSL Header Version => OpenSSL 1.1.1d 10 Sep 2019
Openssl default config => /usr/lib/ssl/openssl.cnf
Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value
pcntl
pcntl support => 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, mysql
pdo_mysql
PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Directive => Local Value => Master Value
pdo_mysql.default_socket => no value => no value
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.27.2
Phar
Phar: PHP Archive support => enabled
Phar EXT version => 2.0.2
Phar API version => 1.1.1
SVN revision => $Id: e117ab0dc068703c55b505e78a0d3b3752e9c0b7 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => disabled (install pecl/bz2)
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: e3a2bc739dee8e0d29094e30e1cfbe3e87e2ceb4 $
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: 279be19a9e466fb7cfea9841a630521f99644504 $
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.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
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.sid_bits_per_character => 4 => 4
session.sid_length => 32 => 32
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: ae067cdcddf424d6e762603905b98798bc924a00 $
Schema support => enabled
Thanks!
Add in Dockerfile :
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
Related
Debug unit tests PhpStorm + Laravel Sail [duplicate]
I am using PHPUnit through PhpStorm with a remote interpreter from docker. The Container is run through docker-compose PHPUnit works. Xdebug works through the browser. In docker-php-ext-xdebug.ini, I have all the mandatory options, and I can see in the CLI Interpreter Config that PhpStorm does load this config. BUT when I try to run PHPUnit with the debugger I get: PhpStorm Debugger extension is not detected CLI Interpreter Config: DockerFile FROM php:7.4-fpm-alpine # OS DEPENDENCIES RUN apk update RUN apk add --no-cache bash git curl libmcrypt libmcrypt-dev openssh-client icu-dev RUN apk add --no-cache libxml2-dev freetype-dev libpng-dev libjpeg-turbo-dev zip libzip-dev g++ make autoconf RUN apk add --no-cache postgresql-dev RUN docker-php-source extract RUN pecl install xdebug redis RUN docker-php-ext-enable xdebug redis RUN docker-php-source delete RUN docker-php-ext-install -j$(nproc) pgsql RUN docker-php-ext-install -j$(nproc) pdo_pgsql RUN docker-php-ext-install soap intl zip RUN docker-php-ext-install opcache # XDEBUG CONFIGURATION ARG XDEBUG_REMOTE_HOST ARG XDEBUG_REMOTE_PORT ARG XDEBUG_REMOTE_CONNECT_BACK ARG XDEBUG_INI=/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini RUN echo "error_reporting = E_ALL" >> ${XDEBUG_INI} RUN echo "display_startup_errors=1" >> ${XDEBUG_INI} RUN echo "display_errors=1" >> ${XDEBUG_INI} RUN echo "xdebug.profiler_enable=1" >> ${XDEBUG_INI} RUN echo "xdebug.remote_enable=1" >> ${XDEBUG_INI} RUN echo "xdebug.remote_connect_back=$XDEBUG_REMOTE_CONNECT_BACK" >> ${XDEBUG_INI} RUN echo "xdebug.idekey=\"PHPSTORM\"" >> ${XDEBUG_INI} RUN echo "xdebug.remote_handler=dbgp" >> ${XDEBUG_INI} RUN echo "xdebug.remote_port=$XDEBUG_REMOTE_PORT" >> ${XDEBUG_INI} RUN echo "xdebug.remote_host=$XDEBUG_REMOTE_HOST" >> ${XDEBUG_INI} RUN echo "xdebug.remote_autostart=1" >> ${XDEBUG_INI} # COMPOSER INSTALLATION COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # EXORT COMPOSER GLOBAL PATH ENV PATH="$PATH:$HOME/.composer/vendor/bin" #edited docker-compose.yaml dataapi: container_name: dataapi build: context: ${DOCKER_FILES_PATH}/privateapi/ args: - XDEBUG_REMOTE_PORT=10000 - XDEBUG_REMOTE_HOST=172.17.0.1 #DOCKER network IP - XDEBUG_REMOTE_CONNECT_BACK=0 #edited command: sh -c "composer install && bin/console doctrine:migrations:migrate --allow-no-migration -n && php-fpm" UPDATE: Here is the result of phpinto() in phpunit: sodium sodium support => enabled libsodium headers version => 1.0.18 libsodium library version => 1.0.18 SPL SPL support => enabled Interfaces => 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 SQLite Library => 3.32.1 Directive => Local Value => Master Value sqlite3.defensive => 1 => 1 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 session.trans_sid_hosts => no value => no value session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form= unserialize_max_depth => 4096 => 4096 url_rewriter.hosts => no value => no value url_rewriter.tags => form= => form= user_agent => no value => no value tokenizer Tokenizer Support => enabled xdebug xdebug support => enabled Version => 2.9.6 Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support Debugger => enabled IDE Key => PHPSTORM Directive => Local Value => Master Value xdebug.auto_trace => Off => Off xdebug.cli_color => 0 => 0 xdebug.collect_assignments => Off => Off xdebug.collect_includes => On => On xdebug.collect_params => 0 => 0 xdebug.collect_return => Off => Off xdebug.collect_vars => Off => Off xdebug.coverage_enable => On => On xdebug.default_enable => On => On xdebug.dump.COOKIE => no value => no value xdebug.dump.ENV => no value => no value xdebug.dump.FILES => no value => no value xdebug.dump.GET => no value => no value xdebug.dump.POST => no value => no value xdebug.dump.REQUEST => no value => no value xdebug.dump.SERVER => no value => no value xdebug.dump.SESSION => no value => no value xdebug.dump_globals => On => On xdebug.dump_once => On => On xdebug.dump_undefined => Off => Off xdebug.file_link_format => no value => no value xdebug.filename_format => no value => no value xdebug.force_display_errors => Off => Off xdebug.force_error_reporting => 0 => 0 xdebug.gc_stats_enable => Off => Off xdebug.gc_stats_output_dir => /tmp => /tmp xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p xdebug.halt_level => 0 => 0 xdebug.idekey => PHPSTORM => PHPSTORM xdebug.max_nesting_level => 256 => 256 xdebug.max_stack_frames => -1 => -1 xdebug.overload_var_dump => 2 => 2 xdebug.profiler_append => Off => Off xdebug.profiler_enable => On => On xdebug.profiler_enable_trigger => Off => Off xdebug.profiler_enable_trigger_value => no value => no value xdebug.profiler_output_dir => /tmp => /tmp xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p xdebug.remote_addr_header => no value => no value xdebug.remote_autostart => On => On xdebug.remote_connect_back => Off => Off xdebug.remote_cookie_expire_time => 3600 => 3600 xdebug.remote_enable => On => On xdebug.remote_host => 172.17.0.1 => 172.17.0.1 xdebug.remote_log => no value => no value xdebug.remote_log_level => 7 => 7 xdebug.remote_mode => req => req xdebug.remote_port => 10000 => 10000 xdebug.remote_timeout => 200 => 200 xdebug.scream => Off => Off xdebug.show_error_trace => Off => Off xdebug.show_exception_trace => Off => Off xdebug.show_local_vars => Off => Off xdebug.show_mem_delta => Off => Off xdebug.trace_enable_trigger => Off => Off xdebug.trace_enable_trigger_value => no value => no value xdebug.trace_format => 0 => 0 xdebug.trace_options => 0 => 0 xdebug.trace_output_dir => /tmp => /tmp xdebug.trace_output_name => trace.%c => trace.%c xdebug.var_display_max_children => 128 => 128 xdebug.var_display_max_data => 512 => 512 xdebug.var_display_max_depth => 3 => 3 xml XML Support => active XML Namespace Support => active libxml2 Version => 2.9.10 xmlreader XMLReader => enabled xmlwriter XMLWriter => enabled Zend OPcache Opcode Caching => Disabled Optimization => Disabled SHM Cache => Enabled File Cache => Disabled Startup Failed => Opcode Caching is disabled for CLI Directive => Local Value => Master Value opcache.blacklist_filename => no value => no value opcache.consistency_checks => 0 => 0 opcache.dups_fix => Off => Off opcache.enable => On => On opcache.enable_cli => Off => Off opcache.enable_file_override => Off => Off opcache.error_log => no value => no value opcache.file_cache => no value => no value opcache.file_cache_consistency_checks => On => On opcache.file_cache_only => Off => Off opcache.file_update_protection => 2 => 2 opcache.force_restart_timeout => 180 => 180 opcache.huge_code_pages => Off => Off opcache.interned_strings_buffer => 8 => 8 opcache.lockfile_path => /tmp => /tmp opcache.log_verbosity_level => 1 => 1 opcache.max_accelerated_files => 10000 => 10000 opcache.max_file_size => 0 => 0 opcache.max_wasted_percentage => 5 => 5 opcache.memory_consumption => 128 => 128 opcache.opt_debug_level => 0 => 0 opcache.optimization_level => 0 => 0x7FFEBFFF opcache.preferred_memory_model => no value => no value opcache.preload => no value => no value opcache.preload_user => no value => no value opcache.protect_memory => Off => Off opcache.restrict_api => no value => no value opcache.revalidate_freq => 2 => 2 opcache.revalidate_path => Off => Off opcache.save_comments => On => On opcache.use_cwd => On => On opcache.validate_permission => Off => Off opcache.validate_root => Off => Off opcache.validate_timestamps => On => On zip Zip => enabled Zip version => 1.15.6 Libzip headers version => 1.6.1 Libzip library version => 1.6.1 zlib ZLib Support => enabled Stream Wrapper => compress.zlib:// Stream Filter => zlib.inflate, zlib.deflate Compiled Version => 1.2.11 Linked Version => 1.2.11 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 Environment Variable => Value PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/.composer/vendor/bin HOSTNAME => fb6d372627df JETBRAINS_REMOTE_RUN => 1 IDE_PHPUNIT_PHPUNIT_PHAR => /var/www/privateapi/vendor/bin/.phpunit/phpunit-7.5-0/phpunit IDE_PHPUNIT_VERSION => 7.5.20 PHPIZE_DEPS => autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c PHP_INI_DIR => /usr/local/etc/php PHP_EXTRA_CONFIGURE_ARGS => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi PHP_CFLAGS => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_CPPFLAGS => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_LDFLAGS => -Wl,-O1 -pie GPG_KEYS => 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312 PHP_VERSION => 7.4.7 PHP_URL => https://www.php.net/distributions/php-7.4.7.tar.xz PHP_ASC_URL => https://www.php.net/distributions/php-7.4.7.tar.xz.asc PHP_SHA256 => 53558f8f24cd8ab6fa0ea252ca8198e2650160649681ce5230c1df1dc2b52faf PHP_MD5 => HOME => /root APP_ENV => test KERNEL_CLASS => App\Kernel APP_AUTH_API_HOST => http://authapi DATABASE_URL_TEST => postgresql://postgres:postgres#172.17.0.1:5433/privateapi_test CORS_ALLOW_ORIGIN => ^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$ PHP Variables Variable => Value $_ENV['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/.composer/vendor/bin $_ENV['HOSTNAME'] => fb6d372627df $_ENV['JETBRAINS_REMOTE_RUN'] => 1 $_ENV['IDE_PHPUNIT_PHPUNIT_PHAR'] => /var/www/privateapi/vendor/bin/.phpunit/phpunit-7.5-0/phpunit $_ENV['IDE_PHPUNIT_VERSION'] => 7.5.20 $_ENV['PHPIZE_DEPS'] => autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c $_ENV['PHP_INI_DIR'] => /usr/local/etc/php $_ENV['PHP_EXTRA_CONFIGURE_ARGS'] => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi $_ENV['PHP_CFLAGS'] => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $_ENV['PHP_CPPFLAGS'] => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $_ENV['PHP_LDFLAGS'] => -Wl,-O1 -pie $_ENV['GPG_KEYS'] => 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312 $_ENV['PHP_VERSION'] => 7.4.7 $_ENV['PHP_URL'] => https://www.php.net/distributions/php-7.4.7.tar.xz $_ENV['PHP_ASC_URL'] => https://www.php.net/distributions/php-7.4.7.tar.xz.asc $_ENV['PHP_SHA256'] => 53558f8f24cd8ab6fa0ea252ca8198e2650160649681ce5230c1df1dc2b52faf $_ENV['PHP_MD5'] => $_ENV['HOME'] => /root $_ENV['APP_ENV'] => test $_ENV['KERNEL_CLASS'] => App\Kernel $_ENV['APP_AUTH_API_HOST'] => http://authapi $_ENV['DATABASE_URL_TEST'] => postgresql://postgres:postgres#172.17.0.1:5433/privateapi_test $_ENV['CORS_ALLOW_ORIGIN'] => ^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$ $_ENV['APP_SECRET'] => $ecretf0rt3st $_ENV['DATABASE_URL'] => $_ENV['SYMFONY_DOTENV_VARS'] => APP_SECRET,DATABASE_URL,SYMFONY_DEPRECATIONS_HELPER,PANTHER_APP_ENV $_ENV['SYMFONY_DEPRECATIONS_HELPER'] => 999999 $_ENV['PANTHER_APP_ENV'] => panther $_ENV['APP_DEBUG'] => 1 Set Up: Ubuntu 20.04 PhpStorm 2020.1.4 Docker 19.03.12 docker-compose 1.26.0
Your Xdebug settings look fine to me. It shows expected values for PHPUnit and it works for a web page debug. This has to be the IDE settings / some IDE misconfiguration. In particular, make sure that you have selected the default PHP Interpreter. Even though you have specified one in your Run/Debug Configuration, PhpStorm still requires a project-default interpreter to be selected -- it's a know limitation: WI-51570. Settings/Preferences | Languages & Frameworks | PHP | CLI Interpreter NOTE: as of 2021.1 version the PHP settings node has been moved to the top level and now it's Settings/Preferences | PHP | CLI Interpreter P.S. You can also set it via File | New Projects Settings | Settings for New Projects.... This way it will be set for all future new projects created on that computer (which you can then change as required on per project basis).
I had this problem. I fixed it by specifying the CLI Interpreter in Preferences > PHP
This will not work in your docker since the steps will be removed when running the container: RUN echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc RUN source ~/.bashrc you may use: ENV PATH="$PATH:$HOME/.composer/vendor/bin" Update You may also not using the IP in your config, instead you can map the port to your host when starting your container. First change XDEBUG_REMOTE_HOST=172.17.0.1 to XDEBUG_REMOTE_HOST=0.0.0.0
I had this same issue. However it turned out in XDebug 3 the port changed to 9003. Ctrl + Alt + S > Languages & Frameworks > PHP > Debug > Debug Port to 9003
Set up PhpStorm+Vagrant+Xdebug
I've already banged my head to the wall trying to set up debug process on Vagrant virtual machine. I've got Windows 8.1 on my host machine and Ubuntu 14 onthe guest machine. Here is my xdebug.ini: zend_extension="/usr/lib/php5/20121212/xdebug.so" xdebug.remote_log=/var/xdebug.log xdebug.remote_host="10.0.2.2" xdebug.remote_port="8000" xdebug.remote_enable=1 xdebug.remote_autostart=0 xdebug.remote_handler="dbgp" xdebug.idekey=vagrant But in a log file I see such message: Log opened at 2014-11-13 04:32:18 I: Checking remote connect back address. I: Remote address found, connecting to 10.10.10.1:9000. E: Time-out connecting to client. :-( Log closed at 2014-11-13 04:32:18 Why there are different ip and port? I've searched around where it can be overwritten, but no luck. In php.ini I found nothing. Also strange thing: in my path mapping settings at PHPStorm I have slashes replaced by backslahes. I don't know, is it come to a problem. EDIT: Here is result of php -i | grep xdebug 24:/etc/php5/cli/conf.d/20-xdebug.ini, 47: with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans 767:xdebug 769:xdebug support => enabled 777:xdebug.auto_trace => Off => Off 778:xdebug.cli_color => 0 => 0 779:xdebug.collect_assignments => Off => Off 780:xdebug.collect_includes => On => On 781:xdebug.collect_params => 0 => 0 782:xdebug.collect_return => Off => Off 783:xdebug.collect_vars => Off => Off 784:xdebug.coverage_enable => On => On 785:xdebug.default_enable => On => On 786:xdebug.dump.COOKIE => no value => no value 787:xdebug.dump.ENV => no value => no value 788:xdebug.dump.FILES => no value => no value 789:xdebug.dump.GET => no value => no value 790:xdebug.dump.POST => no value => no value 791:xdebug.dump.REQUEST => no value => no value 792:xdebug.dump.SERVER => no value => no value 793:xdebug.dump.SESSION => no value => no value 794:xdebug.dump_globals => On => On 795:xdebug.dump_once => On => On 796:xdebug.dump_undefined => Off => Off 797:xdebug.extended_info => On => On 798:xdebug.file_link_format => no value => no value 799:xdebug.idekey => vagrant => vagrant 800:xdebug.max_nesting_level => 100 => 100 801:xdebug.overload_var_dump => On => On 802:xdebug.profiler_aggregate => Off => Off 803:xdebug.profiler_append => Off => Off 804:xdebug.profiler_enable => Off => Off 805:xdebug.profiler_enable_trigger => Off => Off 806:xdebug.profiler_output_dir => /tmp => /tmp 807:xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p 808:xdebug.remote_autostart => Off => Off 809:xdebug.remote_connect_back => On => On 810:xdebug.remote_cookie_expire_time => 3600 => 3600 811:xdebug.remote_enable => On => On 812:xdebug.remote_handler => dbgp => dbgp 813:xdebug.remote_host => 10.0.2.2 => 10.0.2.2 814:xdebug.remote_log => /var/xdebug.log => /var/xdebug.log 815:xdebug.remote_mode => req => req 816:xdebug.remote_port => 10000 => 10000 817:xdebug.scream => Off => Off 818:xdebug.show_exception_trace => Off => Off 819:xdebug.show_local_vars => Off => Off 820:xdebug.show_mem_delta => Off => Off 821:xdebug.trace_enable_trigger => Off => Off 822:xdebug.trace_format => 0 => 0 823:xdebug.trace_options => 0 => 0 824:xdebug.trace_output_dir => /tmp => /tmp 825:xdebug.trace_output_name => trace.%c => trace.%c 826:xdebug.var_display_max_children => 128 => 128 827:xdebug.var_display_max_data => 512 => 512 828:xdebug.var_display_max_depth => 3 => 3
Alright, so my problem has been resolved by setting remote_connect_back option to Off. Important note: I have used PuPHPet to generate Vagrant config file, and I didn't know, that there, in the PuPHPet config file, xDebug configuration dwells. Hence somehow host and port was always 10.10.10.10 and 9000 respectively. So it seems that all configurations have to be done by the initial Vagrant config, not by the SSH afterwards.
What does the ssl_version set as nil fallback to in ruby OpenSSL
We have asked to by our payment provider to upgrade the SSL version to TLS from SSLv3 citing poodle attack Currently I see the ssl_version been set as nil in Ruby net/https library what I'm trying to understand is when ssl_version is set nil what does it translate to? (or fallback to ?) Reading through this make me feel that it upto OpenSSL to decide the ssl_version(protocol) to use It also mention by setting :auto always make sure it take the highest available protocol Can anyone share some light on it.
Ruby 2.1.3 uses SSLv23 as a default. You can check it in your irb console: > require 'openssl' # => true > OpenSSL::SSL::SSLContext::DEFAULT_PARAMS # => { # => :ssl_version => "SSLv23", # => :verify_mode => 1, # => :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", # => :options => -2147482625 # => } Btw there is another constant that tells you all available SSL/TLS methods: > OpenSSL::SSL::SSLContext::METHODS # => [ # => [ 0] :TLSv1, # => [ 1] :TLSv1_server, # => [ 2] :TLSv1_client, # => [ 3] :TLSv1_2, # => [ 4] :TLSv1_2_server, # => [ 5] :TLSv1_2_client, # => [ 6] :TLSv1_1, # => [ 7] :TLSv1_1_server, # => [ 8] :TLSv1_1_client, # => [ 9] :SSLv3, # => [10] :SSLv3_server, # => [11] :SSLv3_client, # => [12] :SSLv23, # => [13] :SSLv23_server, # => [14] :SSLv23_client # => ] see: http://ruby-doc.org/stdlib-2.1.3/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#constants-list
Iterating an array via Smarty in SugarCRM
When iterating an array in Smarty I am getting results conflicting with a print_r() of the same array. When doing a print_r() on the array I can see that there are 2 objects in the array and each object is unique. However, when I run a print_r() on each item of the array (via foreach loop) I seem to get the same results for each item. Can anyone identify what I'm doing wrong? See the below code examples and results. Code: {$fields.rgggo_spreadsheetcellmap_documents.value->beans|#print_r} Ouput: Array ( [a852b076-a5cb-dda9-3868-52010d6957ab] => RGGGO_SpreadsheetCellMap Object ( [new_schema] => 1 [module_dir] => RGGGO_SpreadsheetCellMap [object_name] => RGGGO_SpreadsheetCellMap [table_name] => rgggo_spreadsheetcellmap [importable] => [id] => a852b076-a5cb-dda9-3868-52010d6957ab [name] => [date_entered] => 08/06/2013 09:52am [date_modified] => 08/06/2013 02:16pm [modified_user_id] => 1 [modified_by_name] => Sean [created_by] => 1 [created_by_name] => Sean [description] => Test 2 [deleted] => 0 [created_by_link] => [modified_user_link] => [team_id] => 2e201ae4-fac9-8426-44c5-4f54f5830831 [team_set_id] => 65bd59b2-b3ed-fb2b-6a85-4f8888229942 [team_count] => [team_name] => Development [team_link] => [team_count_link] => [teams] => [assigned_user_id] => [assigned_user_name] => [assigned_user_link] => [field] => document_type_text_c [row] => 3 [col] => 1 .... a bunch more stuff here ) [f038918d-a13d-69f0-3541-51fff82f0497] => RGGGO_SpreadsheetCellMap Object ( [new_schema] => 1 [module_dir] => RGGGO_SpreadsheetCellMap [object_name] => RGGGO_SpreadsheetCellMap [table_name] => rgggo_spreadsheetcellmap [importable] => [id] => f038918d-a13d-69f0-3541-51fff82f0497 [name] => [date_entered] => 08/05/2013 02:10pm [date_modified] => 08/06/2013 02:17pm [modified_user_id] => 1 [modified_by_name] => Sean [created_by] => 1 [created_by_name] => Sean [description] => [deleted] => 0 [created_by_link] => [modified_user_link] => [team_id] => 2e201ae4-fac9-8426-44c5-4f54f5830831 [team_set_id] => 65bd59b2-b3ed-fb2b-6a85-4f8888229942 [team_count] => [team_name] => Development [team_link] => [team_count_link] => [teams] => [assigned_user_id] => [assigned_user_name] => [assigned_user_link] => [field] => description [row] => 2 [col] => 1 .... a bunch more stuff here ) ) When I iterate the array... {{foreach from=$fields.rgggo_spreadsheetcellmap_documents.value->beans key=k item=v}} <pre> {$v|#print_r} </pre> {{/foreach}} I get these results: RGGGO_SpreadsheetCellMap Object ( [new_schema] => 1 [module_dir] => RGGGO_SpreadsheetCellMap [object_name] => RGGGO_SpreadsheetCellMap [table_name] => rgggo_spreadsheetcellmap [importable] => [id] => f038918d-a13d-69f0-3541-51fff82f0497 [name] => [date_entered] => 08/05/2013 02:10pm [date_modified] => 08/06/2013 02:17pm [modified_user_id] => 1 [modified_by_name] => Sean [created_by] => 1 [created_by_name] => Sean [description] => [deleted] => 0 [created_by_link] => [modified_user_link] => [team_id] => 2e201ae4-fac9-8426-44c5-4f54f5830831 [team_set_id] => 65bd59b2-b3ed-fb2b-6a85-4f8888229942 [team_count] => [team_name] => Development [team_link] => [team_count_link] => [teams] => [assigned_user_id] => [assigned_user_name] => [assigned_user_link] => [field] => description [row] => 2 [col] => 1 .... a bunch more stuff here ) RGGGO_SpreadsheetCellMap Object ( [new_schema] => 1 [module_dir] => RGGGO_SpreadsheetCellMap [object_name] => RGGGO_SpreadsheetCellMap [table_name] => rgggo_spreadsheetcellmap [importable] => [id] => f038918d-a13d-69f0-3541-51fff82f0497 [name] => [date_entered] => 08/05/2013 02:10pm [date_modified] => 08/06/2013 02:17pm [modified_user_id] => 1 [modified_by_name] => Sean [created_by] => 1 [created_by_name] => Sean [description] => [deleted] => 0 [created_by_link] => [modified_user_link] => [team_id] => 2e201ae4-fac9-8426-44c5-4f54f5830831 [team_set_id] => 65bd59b2-b3ed-fb2b-6a85-4f8888229942 [team_count] => [team_name] => Development [team_link] => [team_count_link] => [teams] => [assigned_user_id] => [assigned_user_name] => [assigned_user_link] => [field] => description [row] => 2 [col] => 1 .... a bunch more stuff here )
I found the answer in another stackoverflow question. The issue is double vs single curly brackets and their use in SugarCRM. Is there a difference between using a single vs. double brace (delimiters) in SugarCRM Smarty tpls command construct?
Magento 1.6 does not seem to be using APC
I am using Magento 1.6 with APC 3.1.9. I am getting 99% miss and only 0.4% hit. Magento local.xml has this entry <config> <global> <cache> <backend>apc</backend> <prefix>MAGE_</prefix> </cache> ...... ..... I have tweaked most of the params in apc.ini as per the Magento forums. When i run, php -r 'phpinfo();' | grep 'apc' output is additional .ini files parsed => /etc/php.d/apc.ini, apc apc.cache_by_default => On => On apc.canonicalize => On => On apc.coredump_unmap => Off => Off apc.enable_cli => On => On apc.enabled => On => On apc.file_md5 => Off => Off apc.file_update_protection => 2 => 2 apc.filters => no value => no value apc.gc_ttl => 3600 => 3600 apc.include_once_override => Off => Off apc.lazy_classes => Off => Off apc.lazy_functions => Off => Off apc.max_file_size => 20M => 20M apc.mmap_file_mask => no value => no value apc.num_files_hint => 10000 => 10000 apc.preload_path => no value => no value apc.report_autofilter => Off => Off apc.rfc1867 => Off => Off apc.rfc1867_freq => 0 => 0 apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS apc.rfc1867_prefix => upload_ => upload_ apc.rfc1867_ttl => 3600 => 3600 apc.serializer => default => default apc.shm_segments => 1 => 1 apc.shm_size => 1024M => 1024M apc.slam_defense => On => On apc.stat => On => On apc.stat_ctime => Off => Off apc.ttl => 0 => 0 apc.use_request_time => On => On apc.user_entries_hint => 10000 => 10000 apc.user_ttl => 0 => 0 apc.write_lock => On => On Not sure how to debug this issue and resolve the 99%cache miss. What have I missed? Please help.
make sure that you did a rm -rf /var/www/var/cache/* after changing local.xml. try to optimizing your apc cache http://blog.nexcess.net/2011/03/25/optimizing-apc-cache-settings-for-magento/ and make sure that you check Additional Advice for APC configuration: turn off apc.optimization (experimental and unstable, may cache user session info, useless items which should not be cached, such as admin pages and logged-in site pages) turn off apc.include_once_override turn off apc.slam_defense (may cause objects to be replaced with PHP warnings which are displayed to the user) set apc.user_ttl = 0 (allows your php scripts to set appropriate timeouts for queries and objects) set apc.mmap_file_mask = /tmp/apc-yourusernamehere.XXXXXX for file-backed mmap; make file mask unique by adding your unique string; XXXXXX (exactly 6 X’s) must remain to allow APC to add random string OR set to /dev/zero for anonymous mmap if you can spare the memory source : http://blog.magikcommerce.com/configuring-apc-cache-for-faster-magento/