e282486518
- e282486518 回复了 silence 的评论
An Error occurred while handling another error:
exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "public/404".' in E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\base\Module.php:462
Stack trace:
#0 E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\web\ErrorHandler.php(93): yii\base\Module->runAction('public/404')
#1 E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\base\ErrorHandler.php(109): yii\web\ErrorHandler->renderException(Object(yii\web\NotFoundHttpException))
#2 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\web\NotFoundHttpException))
#3 {main}
Previous exception:
exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "Test3/liwen/yii2admin/web/".' in E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\base\Module.php:462
Stack trace:
#0 E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\web\Application.php(100): yii\base\Module->runAction('Test3/liwen/yii...', Array)
#1 E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(common\core\Request))
#2 E:\WWW\Test3\liwen\yii2admin\web\index.php(24): yii\base\Application->run()
#3 {main}Next exception 'yii\web\NotFoundHttpException' with message '页面未找到。' in E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\web\Application.php:112
Stack trace:
#0 E:\WWW\Test3\liwen\yii2admin\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(common\core\Request))
#1 E:\WWW\Test3\liwen\yii2admin\web\index.php(24): yii\base\Application->run()
#2 {main}这个是?
应该是重写错误导致的。建议解析到web目录中。参考https://github.com/e282486518/yii2admin/tree/master/web
- e282486518 回复了 hwsyy 的评论
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.Problem 1
- yiisoft/yii2 2.0.9 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.10 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - Installation request for yiisoft/yii2 >=2.0.6 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
composer.json对应位置改成:"minimum-stability": "dev",
- e282486518 回复了 hwsyy 的评论
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.Problem 1
- yiisoft/yii2 2.0.9 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.10 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - Installation request for yiisoft/yii2 >=2.0.6 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
@hwsyy 可能是我用了“Packagist / Composer 中国全量镜像”,将composer.json最下面的:
"repositories": { "packagist": { "type": "composer", "url": "https://packagist.phpcomposer.com" } }
去掉看看。
- e282486518 回复了 hankyan 的评论
非常棒~ 不过还有好多地方没有需要完善,楼主任重道远。已关注。
附录
我执行命令行:
php ./yii install/install
的时候发现报错,然后就没管,直接下一个步骤了,参照 doc 目录下的Nginx和Apache配置文件,配置服务器,并设置hosts文件。
这个步骤没什么可说的,我是在本地进行测试的,xampp, 按照最后一种方式配的。需要注意的是如果命令行执行失败,估计是根目录不会自动生成.env
文件。反正我没找到。然后直接复制了一份.env.example
为.env
对照着在里面把自己的数据库和路径写了一下就能查看啦(windows 上新建.env
的时候会告诉你需要填文件名,蛋疼的windows 后缀模式。。。 你可以直接新建.env.
然后保存,自动变成.env
)。就到这里吧,期待楼主为我们带来更多惊喜。加油~~
谢了,已修复。
- e282486518 回复了 lxj 的评论
Fatal error: Uncaught exception 'yii\base\InvalidParamException' with message 'Invalid path alias: @storageUrl/image/' in C:\phpStudy\WWW\yii2admin-master\vendor\yiisoft\yii2\BaseYii.php:152 Stack trace: #0 C:\phpStudy\WWW\yii2admin-master\common\config\params.php(25): yii\BaseYii::getAlias('@storageUrl/ima...') #1 C:\phpStudy\WWW\yii2admin-master\frontend\config\main.php(3): require('C:\phpStudy\WWW...') #2 C:\phpStudy\WWW\yii2admin-master\frontend\web\index.php(20): require('C:\phpStudy\WWW...') #3 {main} thrown in C:\phpStudy\WWW\yii2admin-master\vendor\yiisoft\yii2\BaseYii.php on line 152
新手求解 - e282486518 回复了 lxj 的评论
Fatal error: Uncaught exception 'yii\base\InvalidParamException' with message 'Invalid path alias: @storageUrl/image/' in C:\phpStudy\WWW\yii2admin-master\vendor\yiisoft\yii2\BaseYii.php:152 Stack trace: #0 C:\phpStudy\WWW\yii2admin-master\common\config\params.php(25): yii\BaseYii::getAlias('@storageUrl/ima...') #1 C:\phpStudy\WWW\yii2admin-master\frontend\config\main.php(3): require('C:\phpStudy\WWW...') #2 C:\phpStudy\WWW\yii2admin-master\frontend\web\index.php(20): require('C:\phpStudy\WWW...') #3 {main} thrown in C:\phpStudy\WWW\yii2admin-master\vendor\yiisoft\yii2\BaseYii.php on line 152
新手求解@谦gg 看看你源码/common/config/bootstrap.php 最下面有没Yii::setAlias('@storageUrl', env('STORAGE_URL'));
- e282486518 回复了 z1x6f8 的评论
找不到CSS及JS文件
后台网址
http://backend.yii2admin.cn/admin/
css及js 文件前缀多了一个admin/ ,并且@web 显示的也是admin/ ,这个是怎么配置的?这里要看你怎么重写了。一般就三种,/、/storage、/storage/web。另外如果觉得高级版本的配置的比较麻烦的话,还提供了另外一种解析方式:https://github.com/e282486518/yii2admin/tree/master/web