簡體   English   中英

使用Laravel Artisan Migration時發生PHP致命錯誤

[英]PHP Fatal error when using laravel artisan migrate

我在使用Laravel ver5.3時遇到問題。 php artisan migrate命令在本地運行良好。 但是該命令不會在服務器上偵聽。

服務器具有PHP 7.0 / mariadb-10.0.x / UTF-8 / HTTP2.0 / Apache2。

這是錯誤消息:

$ php artisan migrate

PHP Fatal error:  Uncaught ErrorException: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /home/prepend/funcall_excute/funcall_excute.php:307
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'gethostbyaddr()...', '/home/prepend/f...', 307, Array)
#1 /home/prepend/funcall_excute/funcall_excute.php(307): gethostbyaddr('')
#2 /home/prepend/funcall_excute/funcall_excute.php(166): __simplexi_prepend_funcall_create_file('/home/prepend/f...', 'funcall.txt')
#3 /home/prepend/funcall_excute/funcall_excute.php(10): __simplexi_prepend_funcall_get_whitelist()
#4 [internal function]: __fc_dispose(Array)
#5 /sue1924/Alzzle/vendor/symfony/console/Terminal.php(127): proc_open('stty -a | grep ...', Array, Array, NULL, NULL, Array)
#6 /sue1924/Alzzle/vendor/symfony/console/Terminal.php(70): Symfony\Component\Console\Terminal::getSttyColumns()
#7 /sue1924/Alzzle/vendor/symfony/console/Terminal.php(32): Symfony\Component\Console\Terminal::initDimensions()
#8 /sue1924/Alzzle/ven in /home/prepend/funcall_excute/funcall_excute.php on line 307

有誰解決了這個問題?

我解決了問題。 我修改了本地.env文件以匹配服務器上的數據庫。 並且該命令在本地執行。 將其留給使用共享主機時遇到類似情況的用戶使用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM