dongxibeng5324 2018-05-31 20:28
浏览 300

php artisan服务找不到autoload.php

SOLUTION: laravel new project-name was actually giving me an error that i overlooked. I had the wrong version of php. It requires phpv7.1.3 or higher. If you don't have it it doesn't work.

Ran into one other problem:

  • i had a system environment variable that is pointing to an old version of php
  • Also laravel requires openssl extension and mbstring to turned on. UNCOMMENTED from php.ini

FOR NEWCOMERS: if you have just downloaded php and unzipped the file. It contains a file called

install.txt

that you HAVE to read. It explains everything.

I ran laravel new blog from their getting started page. When I tried to run php artisan serve, I got the following error:

Warning: require(C:\Projects\laravel-projects\blog/vendor/autoload.php): failed to open stream: No such file or directory in C:\Projects\laravel-projects\blog\artisan on line 18

The artisan file is pointing to

require __DIR__.'/vendor/autoload.php';

this directory does not exist. Even if I point it to the correct directory, it still wouldn't work because I don't have read permissions for that folder (so it gets denied).

What's going on, and how can I fix this?

EDIT: changed the url from the mentioned above to:

C:\Users\sarkis\AppData\Roaming\Composer\vendor\autoload.php

This worked perfectly for some reason. And NOW. A NEW ERROR HAS APPEARED.

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Projects\laravel-projects\blog\bootstrap\app.php:14 Stack trace:#0 C:\Projects\laravel-projects\blog\artisan(21): require_once() #1 {main} thrown in C:\Projects\laravel-projects\blog\bootstrap\app.php on line 14

found that i don't have the proper version of php required.

  • 写回答

6条回答 默认 最新

  • dongpan8439 2018-05-31 20:30
    关注

    Try running composer dump-autoload , after that run a composer install

    If that doesn't work, try the composer update --no-scripts

    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测