ds0678 2015-06-23 21:46
浏览 32
已采纳

迁移到远程服务器时,编译器更新/安装期间出错

The error in question:

[RuntimeException] Error Output: PHP Warning: require(/home/admin/web/"webpage"/public_html/test/app/Http/helpers.php): failed to open stream: N o such file or directory in /home/admin/web/"webpage"/public_html/test/vendor/composer/autoload_real.php on line 58 PHP Stack trace: PHP 1. {main}() /home/admin/web/"webpage"/public_html/test/artisan:0 PHP 2. require() /home/admin/web/"webpage"/public_html/test/artisan:16 PHP 3. require() /home/admin/web/"webpage"/public_html/test/bootstrap/autoload.php:17 PHP 4. ComposerAutoloaderInit95cd02d44d232a8b8d6e5e52544d8647::getLoader() /home/admin/web/"webpage"/public_html/test/vendor /autoload.php:7 PHP 5. composerRequire95cd02d44d232a8b8d6e5e52544d8647() /home/admin/web/"webpage"/public_html/test/vendor/composer/autoload _real.php:49 PHP Fatal error: require(): Failed opening required '/home/admin/web/"webpage"/public_html/test/app/Http/helpers.php' (includ e_path='/home/admin/web/"webpage"/public_html/test/vendor/phpunit/php-text-template:/home/admin/web/"webpage"/pub lic_html/test/vendor/phpunit/php-timer:.:/usr/share/pear:/usr/share/php') in /home/admin/web/"webpage"/public_html/test/vendor /composer/autoload_real.php on line 58 PHP Stack trace: PHP 1. {main}() /home/admin/web/"webpage"/public_html/test/artisan:0 PHP 2. require() /home/admin/web/"webpage"/public_html/test/artisan:16 PHP 3. require() /home/admin/web/"webpage"/public_html/test/bootstrap/autoload.php:17 PHP 4. ComposerAutoloaderInit95cd02d44d232a8b8d6e5e52544d8647::getLoader() /home/admin/web/"webpage"/public_html/test/vendor /autoload.php:7 PHP 5. composerRequire95cd02d44d232a8b8d6e5e52544d8647() /home/admin/web/"webpage"/public_html/test/vendor/composer/autoload _real.php:49

Background: Was developing locally, got to the point where I wanted to have a staging site. Set up the staging site on digital ocean (entOS 6.5 x64). I then cloned my git repo into my desired folder - configured vhosts DefaultDirectory to my public path.

A default installation works, composer update/install works. However, with my cloned repository I am getting said error. '/home/admin/web/"webpage"/public_html/test/app/Http/helpers.php' is a file I made with some helper methods I could use in various controllers. It has not caused any problems locally. I can composer update/install locally, without any problems.

Any guidance would be greatly appreciated!

  • 写回答

1条回答 默认 最新

  • douhao2026 2015-06-23 22:00
    关注

    Are those literal quotation marks in your file path

    /home/admin/web/"webpage"/public_html/test/app/Http/helpers.php

    Or are you just using that to indicate your website name normally goes there? If the former, I'd consider not doing that as it's pretty weird to have quotes in unix file names, and you may run into problems based on assumptions other people have made.

    Regardless -- you have the information you need

    [RuntimeException] Error Output: PHP Warning: require(/home/admin/web/"webpage"/public_html/test/app/Http/helpers.php): failed to open stream: N o such file or directory in /home/admin/web/"webpage"/public_html/test/vendor/composer/autoload_real.php

    PHP is telling you it tried to require in a specific file

    /home/admin/web/"webpage"/public_html/test/app/Http/helpers.php
    

    but it could not find it ("failed to open stream"). This means either the file doesn't exist on the computer you're trying to load it from, or PHP can't see it for some reason (try dumping the results of is_readable('/home/admin/web/"webpage"/public_html/test/app/Http/helpers.php'); to see if PHP thinks it can read the file or not.

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

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条