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
How do I mount a host volume into docker with the ruby docker-api (https://github.com/swipely/docker-api) on runtime?
Basically, the docker run -v path:path functionality with this gem.
The current README missed the part to explain on how to use the volumes with container. You should be fine to run with below command with container's folder /foo
container = Docker::Container.create('Cmd' => %w[test -d /foo],
'Image' => 'debian:wheezy',
'Volumes' => {'/foo' => {}}
)
If you need mount with local folder, update to Volumes' => {'/foo' => '/local_foo'}
You can refer the test case from:
container_spec.rb
Documentation for docker-api gem states this in its README.md:
require 'docker'
# Create a Container.
container = Docker::Container.create('Cmd' => ['ls'], 'Image' => 'base')
# Attach to the Container. Currently, the below options are the only valid ones.
# By default, :stream, :stdout, and :stderr are set.
container.attach(:stream => true, :stdin => nil, :stdout => true, :stderr => true, :logs => true, :tty => false)
# => [["bin\nboot\ndev\netc\nhome\nlib\nlib64\nmedia\nmnt\nopt\nproc\nroot\nrun\nsbin\nselinux\nsrv\nsys\ntmp\nusr\nvar", []]
# If you wish to stream the attach method, a block may be supplied.
container = Docker::Container.create('Image' => 'base', 'Cmd' => ['find / -name *'])
container.tap(&:start).attach { |stream, chunk| puts "#{stream}: #{chunk}" }
stderr: 2013/10/30 17:16:24 Unable to locate find / -name *
# => [[], ["2013/10/30 17:16:24 Unable to locate find / -name *\n"]]
# If you want to attach to stdin of the container, supply an IO-like object:
container = Docker::Container.create('Image' => 'base', 'Cmd' => ['cat'], 'OpenStdin' => true, 'StdinOnce' => true)
container.tap(&:start).attach(stdin: StringIO.new("foo\nbar\n"))
# => [["foo\nbar\n"], []]
Does this help? Can I ask why are you trying to use docker-api? Can't you just use docker volumes (-v)?
Use Binds:
'Binds' => ['/local/folder:/container/folder']
You need to use both Marcelo's and BMW's answers together to create a container with a working volume:
container = Docker::Container.create('Cmd' => %w[test -d /foo],
'Image' => 'debian:wheezy',
'Volumes' => '/container' => {},
'Binds' => ['/local:/container']
)
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.
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?
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/