dongwei8729 2018-08-03 07:30
浏览 187
已采纳

使用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 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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 SPSS分类模型实训题步骤
  • ¥15 求解决扩散模型代码问题
  • ¥15 工创大赛太阳能电动车项目零基础要学什么
  • ¥20 limma多组间分析最终p值只有一个
  • ¥15 nopCommerce开发问题
  • ¥15 torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL
  • ¥15 QuartusⅡ15.0编译项目后,output_files中的.jdi、.sld、.sof不更新怎么解决
  • ¥15 pycharm输出和导师的一样,但是标红
  • ¥15 想问问富文本拿到的html怎么转成docx的
  • ¥15 我看了您的文章,遇到了个问题。