简体   繁体   English

Laravel 4 bootstrap / autoload.php无法打开流

[英]Laravel 4 bootstrap/autoload.php failed to open stream

When I uploaded my Laravel 4 application on a live web server I get the following error when going to the base URL: 当我将Laravel 4应用程序上传到实时Web服务器上时,转到基本URL时出现以下错误:

Warning: require(/home/pvanmoll/domains/iheal.be/public_html/../laravel/bootstrap/autoload.php) [function.require]: failed to open stream: No such file or directory in /home/pvanmoll/domains/iheal.be/public_html/index.php on line 21

Fatal error: require() [function.require]: Failed opening required '/home/pvanmoll/domains/iheal.be/public_html/../laravel/bootstrap/autoload.php' (include_path='.:/usr/local/lib/php') in /home/pvanmoll/domains/iheal.be/public_html/index.php on line 21

I have put my laravel-files in a separate folder next to public_html. 我已将laravel文件放在public_html旁边的单独文件夹中。 In public html I put the content of laravel's public folder. 在公共html中,我将laravel的公共文件夹的内容放入。 This is my data structure: 这是我的数据结构:

laravel
   /app
   /bootstrap
   /vendor
   ...
public_html
   /css
   /js
   index.php
   ...

In index.php I specified following lines: 在index.php中,我指定了以下几行:

require __DIR__.'/../laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/../laravel/bootstrap/start.php';

and in laravel/bootstrap/paths.php: 并在laravel / bootstrap / paths.php中:

'public' => __DIR__.'/../../public_html',

On localhost everything runs fine, but when I upload it to my live web server, it won't work. 在localhost上,一切运行正常,但是当我将其上传到实时Web服务器时,它将无法正常工作。 I've been searching for days now and nothing can help me. 我一直在寻找几天,没有任何帮助。 Weird thing is that the two dots for going down a folder, won't work as they are just appended to my url instead of going down a folder. 奇怪的是,用于存放文件夹的两个点将不起作用,因为它们只是附加在我的网址上,而不是存放在文件夹中。

Maybe it's because my web server is running on Php 5.3.27? 也许是因为我的Web服务器在php 5.3.27上运行?

You need at least PHP >= 5.3.7 with L4. 对于L4,您至少需要PHP> = 5.3.7。 And why don't you change the web root on the server instead? 而且,为什么不更改服务器上的Web根目录呢? Is it shared hosting? 它是共享托管吗? You could also put all laravel install inside public_html, update bootstrap/path.php and index.php and redirect to laravel public with a htaccess. 您还可以将所有laravel安装在public_html内,更新bootstrap / path.php和index.php并使用htaccess重定向到laravel public。 But this is definitely not recommended ! 但这绝对不推荐!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 警告:无法打开流:第17行的C:\\ wamp \\ www \\ laravel \\ bootstrap \\ autoload.php中没有此类文件或目录 - Warning: failed to open stream: No such file or directory in C:\wamp\www\laravel\bootstrap\autoload.php on line 17 是什么原因“警告:要求(C:\\ wamp64 \\ www \\ laravel \\ bootstrap /../ vendor / autoload.php)无法打开流: - What reason 'Warning: require(C:\wamp64\www\laravel\bootstrap/../vendor/autoload.php) failed to open stream: 安装 Laravel 时如何修复“autoload.php 无法打开流”错误? - How to fix "autoload.php failed to open stream " error, while installing Laravel? 无法打开流autoload.php Facebook SDK v4 - Failed to open stream autoload.php Facebook SDK v4 Google Calendar API vendor / autoload.php:打开流失败 - Google Calendar API vendor/autoload.php: failed to open stream /autoload.php):无法打开流: - /autoload.php): failed to open stream: No such file or directory in 要求(供应商/autoload.php):无法打开 stream:没有这样的文件或目录 - require(vendor/autoload.php): failed to open stream: No such file or directory phpunit 和 yii - (PHPUnit/Autoload.php):无法打开 stream: - phpunit and yii - (PHPUnit/Autoload.php): failed to open stream: 作曲家autoload.php无法打开流:没有此类文件或目录 - composer autoload.php failed to open stream: no such file or directory autoload.php问题:无法打开流:没有这样的文件或目录 - autoload.php issue: failed to open stream: no such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM