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.

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

报告相同问题?

悬赏问题

  • ¥20 关于#stm32#的问题,请各位专家解答!
  • ¥15 (标签-python)
  • ¥15 第一个已完成,求第二个做法
  • ¥20 搭建awx,试了很多版本都有错
  • ¥15 java corba的客户端该如何指定使用本地某个固定IP去连接服务端?
  • ¥15 activiti工作流问题,求解答
  • ¥15 有人写过RPA后台管理系统么?
  • ¥15 Bioage计算生物学年龄
  • ¥20 如何将FPGA Alveo U50恢复原来出厂设置哇?
  • ¥50 cocos2d-x lua 在mac上接入lua protobuf?