2018-08-03 07:30 阅读 174

使用laravel artisan migrate时出现PHP致命错误

I was having problems using Laravel ver5.3. The php artisan migrate command worked fine locally. But The command does not listen on the server.

Server has PHP 7.0 / mariadb-10.0.x / UTF-8 / HTTP2.0 / Apache2.

this is error messages:

$ 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

Has anyone solved this problem?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dongtuoji5396 dongtuoji5396 2018-08-06 01:57

    I solve the problem. I modified the local .env file to match the db on the server. And the command was executed locally. Leave it for those who meet similar cases while using shared hosting.

    点赞 评论 复制链接分享