当前位置: 首页 > 工具软件 > BeikeShop > 使用案例 >

beikeshop 使用记录

常乐
2023-12-01

使用环境:win10+phpstudy+phpstorm

1、需要安装php8以上。同时要将win环境变量设置为php版本。

2、

location / {

 try_files $uri $uri/ /index.php?$query_string;

}

3、在php.ini 中 开启intl 

;extension=php_intl.dll

4、composer安装依赖时提示:

执行composer update提示:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/horizon[v5.10.0, ..., 5.x-dev] require ext-pcntl * -> it is missing from your system. Install or enable PHP's pcntl extension.
    - Root composer.json requires laravel/horizon ^5.10 -> satisfiable by laravel/horizon[v5.10.0, ..., 5.x-dev].

执行composer install提示:

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Your lock file does not contain a compatible set of packages. Please run composer update.

解决办法:在composer.json中增加,不能在Windows上安装ext-pcntl扩展。

"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true,
    "platform": {
        "ext-pcntl": "7.2",
        "ext-posix": "7.2"
    }
}

或(但不推荐):

composer install --ignore-platform-reqs

5、关于安装时出现504错误时,两种变通方法,以下是一种,另一种是在其它系统上安装成功之后整体备份转移。

1)在phpstorm中执行,php artisan migrate;php artisan db:seed。将数据导入数据库

2)修改:beike\Installer\Helpers\DatabaseManager.php,让其先生成后台账号、密码以及数据结构,生成lock文件,再在控制台中执行 php artisan db:seed

private function migrate(BufferedOutput $outputLog)
    {
        try {
            Artisan::call('migrate', ['--force' => true], $outputLog);
        } catch (Exception $e) {
            return $this->response($e->getMessage(), 'error', $outputLog);
        }
        return $this->response(trans('installer::installer_messages.final.finished'), 'success', $outputLog);
        //return $this->seed($outputLog);
    }

 类似资料: