私はLaravelプロジェクトのデータベースとしてPostgreSQLを使いたいと思っていました。
1. PostgreSQL設定php artisanは、LaravelをpostgreSQLと統合しようとしたあと、いくつかの空白行を返します
をフォローする'default' => env('DB_CONNECTION', 'mysql')
2. 'default' => env('DB_CONNECTION', 'pgsql')
にセットアップ私の.env
ファイルを変更することがpsql (10.1, server 9.5.10)
などを返すように私はすでにPostgreSQLのインストールされている次のようなオンライン掲載の人々が、私は変わっすべてに試してみました私の端末にpgsql
と入力してください
しかし、私がphp artisan migrate
にしようとすると、エラーが表示されます(エラーをキャプチャするのを忘れてしまいます)。サーフの数時間後、私はthisチュートリアルが有望だったとわかりました。私はすべてを追跡し、それは少し時間がかかりました。それが終わったとき、私はターミナルでphp artisan migrate
を入力しようとしたものを返されたことは、ここで
hznk:fraudet hznk$ php artisan migrate
hznk:fraudet hznk$
たPHP情報です:誰もがこの問題で私を助けることができる場合、私は疑問に思って
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/[email protected]/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/[email protected]
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/[email protected]/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/[email protected]
$_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/[email protected]/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/[email protected]
$_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
。ありがとうございました。
注:私はマックハイシエラを使用していますし、私のphp
バージョンが7.0.15