Fecmall

第 2 位会员

会员
个人信息
  • 加入于 2017-05-31 17:38:45
  • 城市 Qingdao
  • GitHub https://github.com/fecshop
  • 最后登录时间 10天前
  • 签名 净化自己,潜心编码
个人简介
Terry,Fecmall开源产品作者,12年电商经验一线程序员开发者,擅长规划产品,架构设计。
个人成就
  • 发表文章次数 744
  • 发布回复次数 5760
  • 个人主页浏览次数 683
mac 环境下使用docker 安装 mongodb出错7年前

@cjw4176185 #2楼 你是在本机,还是阿里云,还是什么机器?

操作系统是centos还是ubuntu,把你的信息详细说明一下。

安装完成后搜索功能报错7年前

仔细阅读发帖须知: http://www.fecshop.com/topic/624

1.发帖前先搜索报错信息

2.如果发帖,报错信息写到标题里面

mac 环境下使用docker 安装 mongodb出错7年前

这个安装,对应的是 这个dockerfile: https://github.com/fecshop/yii2_fecshop_docker/blob/master/services/php/docker/Dockerfile

也就是先安装mongodb扩展,然后在开启

RUN pecl install -o -f oauth mongodb amqp \
    && rm -rf /tmp/pear

RUN docker-php-ext-enable mongodb oauth amqp

是不是网络原因造成的,上面的pecl 安装mongodb扩展没有完成 ?

下载安装包安装缺少文件?7年前

@jingjim [#8楼](#comment8) 上面步骤都详细执行log打印出来了,你还解决不了,能力所限,帮助不了榆木。

你要么重新安装吧,自己玩吧

下载安装包安装缺少文件?7年前

[root@E3-1230v2-829 fecshop-1.3.1.0]# ./init
Yii Application Initialization Tool v1.0

Which environment do you want the application to be initialized in?

  [0] Development
  [1] Production

  Your choice [0-1, or "q" to quit] 0

  Initialize the application under 'Development' environment? [yes|no] yes

  Start initialization ...

  unchanged yii
  unchanged apphtml5/web/index-merge-config.php
  unchanged apphtml5/web/index-test.php
  unchanged apphtml5/web/cn/sitemap.xml
  unchanged apphtml5/web/cn/index.php
  unchanged apphtml5/web/cn/robots.txt
  unchanged apphtml5/web/fr/sitemap.xml
  unchanged apphtml5/web/fr/index.php
  unchanged apphtml5/web/fr/robots.txt
  unchanged apphtml5/web/sitemap.xml
  unchanged apphtml5/web/sitemap_es.xml
  unchanged apphtml5/web/index.php
  unchanged apphtml5/web/robots.txt
  unchanged apphtml5/merge_config.php
  unchanged apphtml5/config/main-local.php
  unchanged apphtml5/config/params-local.php
  unchanged tests/codeception/config/config-local.php
  unchanged console/config/main-local.php
  unchanged console/config/params-local.php
  unchanged appserver/web/index-merge-config.php
  unchanged appserver/web/index-test.php
  unchanged appserver/web/index.php
  unchanged appserver/merge_config.php
  unchanged appserver/config/main-local.php
  unchanged appserver/config/params-local.php
  unchanged appapi/web/index-merge-config.php
  unchanged appapi/web/index-test.php
  unchanged appapi/web/index.php
  unchanged appapi/merge_config.php
  unchanged appapi/config/main-local.php
  unchanged appapi/config/params-local.php
  unchanged common/config/main-local.php
  unchanged common/config/params-local.php
  unchanged appfront/web/index-merge-config.php
  unchanged appfront/web/index-test.php
  unchanged appfront/web/cn/sitemap.xml
  unchanged appfront/web/cn/index.php
  unchanged appfront/web/cn/robots.txt
  unchanged appfront/web/fr/sitemap.xml
  unchanged appfront/web/fr/index.php
  unchanged appfront/web/fr/robots.txt
  unchanged appfront/web/sitemap.xml
  unchanged appfront/web/sitemap_es.xml
      exist appfront/web/index.php
            ...overwrite? [Yes|No|All|Quit] yes
  overwrite appfront/web/index.php
  unchanged appfront/web/robots.txt
  unchanged appfront/merge_config.php
  unchanged appfront/config/main-local.php
  unchanged appfront/config/params-local.php
  unchanged appadmin/web/index-test.php
  unchanged appadmin/web/index.php
  unchanged appadmin/config/main-local.php
  unchanged appadmin/config/params-local.php
   generate cookie validation key in appadmin/config/main-local.php
   generate cookie validation key in appapi/config/main-local.php
   generate cookie validation key in appfront/config/main-local.php
   generate cookie validation key in apphtml5/config/main-local.php
   generate cookie validation key in appserver/config/main-local.php
      chmod 0777 appadmin/runtime
      chmod 0777 appadmin/web/assets
      chmod 0777 appapi/runtime
      chmod 0777 appapi/web/assets
      chmod 0777 appfront/runtime
      chmod 0777 appfront/web/assets
      chmod 0777 appfront/web/cn/assets
      chmod 0777 appfront/web/fr/assets
      chmod 0777 appfront/web/sitemap.xml
      chmod 0777 appfront/web/sitemap_es.xml
      chmod 0777 appfront/web/fr/sitemap.xml
      chmod 0777 appfront/web/cn/sitemap.xml
      chmod 0777 apphtml5/runtime
      chmod 0777 apphtml5/web/assets
      chmod 0777 apphtml5/web/sitemap.xml
      chmod 0777 apphtml5/web/sitemap_es.xml
      chmod 0777 apphtml5/web/fr/sitemap.xml
      chmod 0777 apphtml5/web/cn/sitemap.xml
      chmod 0777 appserver/runtime
      chmod 0777 appserver/web/assets
      chmod 0777 appimage/common/media/catalog/product
      chmod 0755 yii
      chmod 0755 tests/codeception/bin/yii

  ... initialization completed.

[root@E3-1230v2-829 fecshop-1.3.1.0]# vim appfront/web/index.php 
下载安装包安装缺少文件?7年前

安装的时候,用develop模式,就显示报错信息了

product模式不显示报错信息

重新执行 ./init ,选择develop

购物车结算报错7年前

@yishun1006 #2楼 发帖前,看一下发帖规则:http://www.fecshop.com/topic/624

初始化时报错7年前

@mrwangdc #4楼 发帖前,看一下发帖规则:http://www.fecshop.com/topic/624

初始化时报错7年前

打开根目录的 init 文件,将下面的代码覆盖上面,重新执行即可

#!/usr/bin/env php
<?php
/**
 * Yii Application Initialization Tool
 *
 * In order to run in non-interactive mode:
 *
 * init --env=Development --overwrite=n
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

if (!extension_loaded('openssl')) {
    die('The OpenSSL PHP extension is required by Yii2.');
}

$params = getParams();
$root = str_replace('\\', '/', __DIR__);
$envs = require("$root/environments/index.php");
$envNames = array_keys($envs);

echo "Yii Application Initialization Tool v1.0\n\n";

$envName = null;
if (empty($params['env']) || $params['env'] === '1') {
    echo "Which environment do you want the application to be initialized in?\n\n";
    foreach ($envNames as $i => $name) {
        echo "  [$i] $name\n";
    }
    echo "\n  Your choice [0-" . (count($envs) - 1) . ', or "q" to quit] ';
    $answer = trim(fgets(STDIN));

    if (!ctype_digit($answer) || !in_array($answer, range(0, count($envs) - 1))) {
        echo "\n  Quit initialization.\n";
        exit(0);
    }

    if (isset($envNames[$answer])) {
        $envName = $envNames[$answer];
    }
} else {
    $envName = $params['env'];
}

if (!in_array($envName, $envNames)) {
    $envsList = implode(', ', $envNames);
    echo "\n  $envName is not a valid environment. Try one of the following: $envsList. \n";
    exit(2);
}

$env = $envs[$envName];

if (empty($params['env'])) {
    echo "\n  Initialize the application under '{$envNames[$answer]}' environment? [yes|no] ";
    $answer = trim(fgets(STDIN));
    if (strncasecmp($answer, 'y', 1)) {
        echo "\n  Quit initialization.\n";
        exit(0);
    }
}

echo "\n  Start initialization ...\n\n";
$files = getFileList("$root/environments/{$env['path']}");
if (isset($env['skipFiles'])) {
    $skipFiles = $env['skipFiles'];
    array_walk($skipFiles, function(&$value) use($env, $root) { $value = "$root/$value"; });
    $files = array_diff($files, array_intersect_key($env['skipFiles'], array_filter($skipFiles, 'file_exists')));
}
$all = false;
foreach ($files as $file) {
    if (!copyFile($root, "environments/{$env['path']}/$file", $file, $all, $params)) {
        break;
    }
}

$callbacks = ['setCookieValidationKey', 'setWritable', 'setExecutable', 'createSymlink'];
foreach ($callbacks as $callback) {
    if (!empty($env[$callback])) {
        $callback($root, $env[$callback]);
    }
}

echo "\n  ... initialization completed.\n\n";

function getFileList($root, $basePath = '')
{
    $files = [];
    $handle = opendir($root);
    while (($path = readdir($handle)) !== false) {
        if ($path === '.git' || $path === '.svn' || $path === '.' || $path === '..') {
            continue;
        }
        $fullPath = "$root/$path";
        $relativePath = $basePath === '' ? $path : "$basePath/$path";
        if (is_dir($fullPath)) {
            $files = array_merge($files, getFileList($fullPath, $relativePath));
        } else {
            $files[] = $relativePath;
        }
    }
    closedir($handle);
    return $files;
}

function copyFile($root, $source, $target, &$all, $params)
{
    if (!is_file($root . '/' . $source)) {
        echo "       skip $target ($source not exist)\n";
        return true;
    }
    if (is_file($root . '/' . $target)) {
        if (file_get_contents($root . '/' . $source) === file_get_contents($root . '/' . $target)) {
            echo "  unchanged $target\n";
            return true;
        }
        if ($all) {
            echo "  overwrite $target\n";
        } else {
            echo "      exist $target\n";
            echo "            ...overwrite? [Yes|No|All|Quit] ";


            $answer = !empty($params['overwrite']) ? $params['overwrite'] : trim(fgets(STDIN));
            if (!strncasecmp($answer, 'q', 1)) {
                return false;
            } else {
                if (!strncasecmp($answer, 'y', 1)) {
                    echo "  overwrite $target\n";
                } else {
                    if (!strncasecmp($answer, 'a', 1)) {
                        echo "  overwrite $target\n";
                        $all = true;
                    } else {
                        echo "       skip $target\n";
                        return true;
                    }
                }
            }
        }
        file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source));
        return true;
    }
    echo "   generate $target\n";
    @mkdir(dirname($root . '/' . $target), 0777, true);
    file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source));
    return true;
}

function getParams()
{
    $rawParams = [];
    if (isset($_SERVER['argv'])) {
        $rawParams = $_SERVER['argv'];
        array_shift($rawParams);
    }

    $params = [];
    foreach ($rawParams as $param) {
        if (preg_match('/^--(\w+)(=(.*))?$/', $param, $matches)) {
            $name = $matches[1];
            $params[$name] = isset($matches[3]) ? $matches[3] : true;
        } else {
            $params[] = $param;
        }
    }
    return $params;
}

function setWritable($root, $paths)
{
    foreach ($paths as $writable) {
        if (is_dir("$root/$writable")) {
            echo "      chmod 0777 $writable\n";
            @chmod("$root/$writable", 0777);
        } else {
            if (substr($writable,(strlen($writable)-4)) == '.xml') {
                echo "      chmod 0777 $writable\n";
                @chmod("$root/$writable", 0777);
            } else {
                echo "\n  Error. Directory $writable does not exist. \n";
            }
        }
    }
}

function setExecutable($root, $paths)
{
    foreach ($paths as $executable) {
        echo "      chmod 0755 $executable\n";
        @chmod("$root/$executable", 0755);
    }
}

function setCookieValidationKey($root, $paths)
{
    foreach ($paths as $file) {
        echo "   generate cookie validation key in $file\n";
        $file = $root . '/' . $file;
        $length = 32;
        $bytes = openssl_random_pseudo_bytes($length);
        $key = strtr(substr(base64_encode($bytes), 0, $length), '+/=', '_-.');
        $content = preg_replace('/(("|\')cookieValidationKey("|\')\s*=>\s*)(""|\'\')/', "\\1'$key'", file_get_contents($file));
        file_put_contents($file, $content);
    }
}

function createSymlink($root, $links) {
    foreach ($links as $link => $target) {
        echo "      symlink " . $root . "/" . $target . " " . $root . "/" . $link . "\n";
        //first removing folders to avoid errors if the folder already exists
        @rmdir($root . "/" . $link);
        //next removing existing symlink in order to update the target
        if (is_link($root . "/" . $link)) {
            @unlink($root . "/" . $link);
        }
        @symlink($root . "/" . $target, $root . "/" . $link);
    }
}

初始化时报错7年前

我测试了一下,是存在这个问题,不过不影响安装

这个是设置文件可写搞错了,apphtml5/web/sitemap_es.xml是一个文件,不是一个目录。

您继续安装即可,不影响

初始化时报错7年前

你是通过composer 安装的1.3.1.0吗?

LINUX系统对大小写敏感之重写数据库配置文件之后无法找到7年前

@Tudou #15楼 抱歉,脾气有时候搂不住,因为上面说了好几遍了。

回答这些问题很无趣,况且回答了好几遍,发帖的人看了不思考,就上火。

相互理解吧。

LINUX系统对大小写敏感之重写数据库配置文件之后无法找到7年前

protected $_orderModelName = '\appadmin\local\local_models\mysqldb\order\Orderinfo'; 改成: protected $_orderModelName = '\appadmin\local\local_models\mysqldb\order\OrderInfo';

LINUX系统对大小写敏感之重写数据库配置文件之后无法找到7年前

脑子不长记性,榆木!

上面说了多注意大小写的问题,你看:

fecshop/appadmin/local/local_models/mysqldb/order/OrderInfo.php

你的报错信息是:\appadmin\local\local_models\mysqldb\order\Orderinfo

你看OrderInfoOrderinfo 大小心的问题,Info部分是大写。

榆木。找不到文件 not found,要么是少了字符,要么是字符大小写问题!!!

LINUX系统对大小写敏感之重写数据库配置文件之后无法找到7年前

@Tudou #5楼 那你的配置文件里面为什么是小写?

'Class '\appadmin\local\local_models\mysqldb\product\customer' not found'

Your Site Analytics