douhanxujiuji6098 2017-08-02 16:33
浏览 139

将站点(drupal8)移动到MAMP,autoload.php错误

Somebody send me a site to work on so I setup my MAMP webserver, extracted the drupal8 files into the htdocs folder, I setup the database in phpMyAdmin and run the MAMP servers.

When I try to reach localhost I get a HTTP ERROR 500, of-course I check the logs for errors and find this:

[02-Aug-2017 16:14:24 UTC] PHP Warning: require(C:\MAMP\htdocs/../vendor/autoload.php): failed to open stream: No such file or directory in C:\MAMP\htdocs\autoload.php on line 17

[02-Aug-2017 16:14:24 UTC] PHP Fatal error: require(): Failed opening required 'C:\MAMP\htdocs/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\MAMP\htdocs\autoload.php on line 17

I thought this had something to do with composer so I reinstalled it and ran cmd

composer install

In installed some files + generated some autoload files which is what i thought was going to solve my problem, but i still get the same error and i feel like im missing something really obvious. Ive been stuck for so long on a small problem.

Hope someone has an answer for me!

  • 写回答

1条回答 默认 最新

  • douche1936 2017-08-02 17:05
    关注

    SOLVED

    It was a pathing error in the autoload.php file

    return require DIR . '../vendor/autoload.php';

    changed to:

    return require DIR . '/vendor/autoload.php';

    评论

报告相同问题?

悬赏问题

  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line