部署完成,但主页显示一片空白,点其他链接报错!

安装报错 · ycjnx · 于 5年前 发布 · 2585 次阅读

首页显示一片空白 命令行显示的数据导入成功:

//导入Mysql数据库                                                                         
[webadmin@centos7 eltmall] #108> ./yii migrate --interactive=0 --migrationPath=@fecshop/migrations/mysqldb
......
......
*** applying m180509_064412_fecshop_tables
    > execute SQL: 
            INSERT INTO `admin_menu` (`id`, `name`, `level`, `parent_id`, `url_key`, `role_key`, `created_at`, `updated_at`, `sort_order`, `can_delete`) VALUES
            (201, 'Newsletter', 2, 191, '/customer/newsletter/index', '/customer/newsletter', '2018-05-09 06:40:59', '2018-05-09 06:40:59', 0, 2)
             ... done (time: 0.000s)
    > execute SQL: 
            INSERT INTO `admin_role_menu` (`menu_id`, `role_id`, `created_at`, `updated_at`) VALUES
            (201, 4, '2018-05-09 06:46:44', '2018-05-09 06:46:44')
             ... done (time: 0.000s)
*** applied m180509_064412_fecshop_tables (time: 0.050s)


14 migrations were applied.

Migrated up successfully.
[webadmin@centos7 eltmall] #108>

但在首页看不到产品分类和,产品信息,是怎么回事?

共收到 12 条回复
ycjnx#15年前 0 个赞
MariaDB [eltmallmydb]> show tables;
+---------------------------+
| Tables_in_eltmallmydb     |
+---------------------------+
| admin_config              |
| admin_menu                |
| admin_role                |
| admin_role_menu           |
| admin_user                |
| admin_user_role           |
| admin_visit_log           |
| article                   |
| customer                  |
| customer_address          |
| ipn_message               |
| migration                 |
| product_custom_option_qty |
| product_flat_qty          |
| sales_coupon              |
| sales_coupon_usage        |
| sales_flat_cart           |
| sales_flat_cart_item      |
| sales_flat_order          |
| sales_flat_order_item     |
| session_storage           |
| static_block              |
| url_rewrite               |
+---------------------------+
23 rows in set (0.00 sec)                                                                 

MariaDB [eltmallmydb]> 

数据库中显示有23个表,没有product表,是这样的吗?

KaiJuan#25年前 0 个赞

配置步骤要操作完成, fecshop配置文档

参看:10.2、测试数据安装:

ycjnx#35年前 0 个赞

测试数据之前导过了,也没有产品信息:

//==========================================
//导入测试数据

//测试数据:                                                                                
[webadmin@centos7 TestData] #1> pwd
/mysoft/fecshop/doc/data/TestData
[webadmin@centos7 TestData] #2> ll
total 34604
drwxr-xr-x 2 webadmin       88 May 14 14:56 ./
drwxr-xr-x 4 webadmin       63 May 14 14:55 ../
-rw-r--r-- 1 webadmin 34499576 Jun 22  2017 appimage.zip
-rw-r--r-- 1 webadmin   929671 Feb 12 11:07 mongo-fecshop-20180212-110657.js
-rw-r--r-- 1 webadmin     3830 Jun 22  2017 mysql_fecshop.sql

//导入mongodb的测试数据
[webadmin@centos7 TestData] #3> mongo 127.0.0.1:27017/eltmallmgdb --quiet /mysoft/fecshop/doc/data/TestData/mongo-fecshop-20180212-110657.js

//导入mysql的测试数据
[webadmin@centos7 TestData] #4> mysql -u root -p eltmallmydb < mysql_fecshop.sql 
Enter password: 
[webadmin@centos7 TestData] #5> 

//==导入MySQL测试数据前后变化,请查找:==importmysqltest 

//拷入图片
将appimage.zip文件解压后覆盖同名目录:
/mywork/eltmall/appimage

//清空图片缓存
[webadmin@centos7 cache] #6> cd /mywork/eltmall/appimage/common/media/catalog/product/cache
[webadmin@centos7 cache] #6> pwd
/mywork/eltmall/appimage/common/media/catalog/product/cache
[webadmin@centos7 cache] #7> rm -rf *
[webadmin@centos7 cache] #8> 

不知是什么原因?

ycjnx#45年前 0 个赞

Nginx报错:

2018/05/14 17:52:28 [error] 13566#0: *8 rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/customer/ajax", client: 127.0.0.1, server: www.emall.com, request: "GET /customer/ajax?currentUrl=http%3A%2F%2Fwww.emall.com%2F&product_id= HTTP/1.1", host: "www.emall.com", referrer: "http://www.emall.com/"

一堆的index.php,这是咋出来的啊?

ycjnx#55年前 0 个赞

我的nginx配置:

    server {
        listen       80;                        # 监听端口
        server_name www.emall.com en.emall.com;    # 站点域名
        root  /mywork/eltmall/appfront/web;              # 站点根目录
        index index.php;   # 默认导航页
     
        # 去掉URL中的index.php
        location / { 
             index index.php;
             if (!-e $request_filename){
                  rewrite ^/(.*)$ /index.php/$1 last;
             }   
        }     
        location /cn/ {
            index index.php;
            if (!-e $request_filename){
                    rewrite . /cn/index.php last;
            }   
        }        
        # PHP配置
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;     
            fastcgi_index  index.php;                                                                                                                                                         
            include fastcgi.conf;
        }
    }
KaiJuan#65年前 0 个赞

产品数据是在mongodb数据库里面的:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-database-mongodb.html

mongodb导入估计是失败了

鬼知道你的一堆nginx报错的那一堆 index.php是怎么出来的。

freetiger#75年前 0 个赞

www.emall.com 是什么鬼?难道是你自己域名?

KaiJuan#85年前 0 个赞

进入到mongodb控制台,检查mongodb里面数据是否导入成功。

ycjnx#95年前 0 个赞

MongoDB中有8个集合:

> show collections
article
favorite
migration
newsletter
product_flat
review
static_block
url_rewrite
> 
KaiJuan#105年前 0 个赞

@ycjnx #9楼 去看一下 product_flat 里面有没有数据,不就行了。

自己慢慢找问题吧。

ycjnx#115年前 0 个赞

MongoDB迁移时也没有报错啊:

//导入mongodb数据库:
[webadmin@centos7 eltmall] #50> ./yii mongodb-migrate  --interactive=0 --migrationPath=@fecshop/migrations/mongodb
Yii Migration Tool (based on Yii v2.0.15.1)

Total 1 new migration to be applied:
        m170228_072455_fecshop_tables

*** applying m170228_072455_fecshop_tables
*** applied m170228_072455_fecshop_tables (time: 1.655s)


1 migration was applied.

Migrated up successfully.
[webadmin@centos7 eltmall] #51> 
ycjnx#125年前 1 个赞

真的是没有数据啊:

> db.product_flat.findOne()
>

在MongoDB Shell里再导入一次:OK,有数据了!感谢 @KaiJuan

> load("/mysoft/fecshop/doc/data/TestData/mongo-fecshop-20180212-110657.js")
true
> db.product_flat.findOne()
{
	"_id" : ObjectId("57bab0d5f656f2940a3bf56e"),
	"created_at" : NumberLong(1471852757),
	"created_user_id" : NumberLong(2),
	"updated_at" : 1497865443,
......
......
>

终于看到了:

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