./yii: failed to open stream: No such file or directory in /www/web/fecshop/yii on line 14

bug问题 · bb2visit · 于 5个月前 发布 · 308 次阅读

【5.2 Yii2 migratge方式导入表结构】

按照文档操作,执行到下面这个命令时
./yii migrate --interactive=0 --migrationPath=@fecshop/migrations/mysqldb
报:
Warning: require(/www/web/fecshop/vendor/autoload.php): failed to open stream: No such file or directory in /www/web/fecshop/yii on line 14

Fatal error: require(): Failed opening required '/www/web/fecshop/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /www/web/fecshop/yii on line 14

我查了下执行了./init操作啊,执行这个./init操作我选择的是development。
求解为什么?
共收到 6 条回复
Fecshop#15个月前 0 个赞

1.把您解决问题的回复,用markdown把格式弄好: http://www.fecshop.com/topic/853

2.报错是:Fatal error: require(): Failed opening required '/www/web/fecshop/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /www/web/fecshop/yii on line 14

你弄了个./yii: failed to open stream: No such file or directory in /www/web/fecshop/yii on line 14,做title是什么意思?

Fecshop#25个月前 0 个赞

你没有文件 /www/web/fecshop/vendor/autoload.php

你这个步骤没有执行成功:

composer create-project fancyecommerce/fecshop-app-advanced  fecshop 1.4.1.0
Fecshop#35个月前 0 个赞

http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-hand-install.html

composer 安装fecshop app advanced

composer global require "fxp/composer-asset-plugin:^1.3.1"
composer create-project fancyecommerce/fecshop-app-advanced  fecshop 1.4.1.0
cd fecshop
composer update    
./init

肯定是这里哪一个步骤执行失败了,执行完步骤看执行结果,是否存在报错!

Fecshop#45个月前 0 个赞

你用的是apache?

http://www.yiichina.com/tutorial/324

这里有一个类似的报错:(在下面的评论区)

Warning: require(F:\Web\website\test_yii\basic\frontend\web/../../vendor/autoload.php): failed to open stream: No such file or directory in F:\Web\website\test_yii\basic\frontend\web\index.php on line 5
Call Stack

Fatal error: require(): Failed opening required 'F:\Web\website\test_yii\basic\frontend\web/../../vendor/autoload.php' (include_path='.;C:\php\pear') in F:\Web\website\test_yii\basic\frontend\web\index.php on line 5

如果你是apache,有一个评论你可以参考下(上面的url里面的评论回复):

F:\Web\website\test_yii\basic\frontend\web\index.php on line 5 这句出错就是Apache服务器不允许执行require(DIR . '/../../vendor/autoload.php'); 
其实也就是不允许执行require这句,apache配置文件。
xx.com.conf中是否是这样的?php_admin_value open_basedir "/home/www/xx.com/frontend/web:/tmp/:/var/tmp/:/proc/" ?
如果是,恭喜你,原因找到了,这里限定了打开目录仅限于web目录,改成php_admin_value open_basedir "/home/www/xx.com:/tmp/:/var/tmp/:/proc/ 就ok。
bb2visit#55个月前 0 个赞

回复的文字怎么编辑啊?

Fecshop#65个月前 0 个赞

@bb2visit [#5楼](#comment5) @bb2visit [#5楼](#comment5)

脑木?右侧有一个编辑按钮看不到吗?

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics