博客文章
最近发表的评论
  • docker 构建简单的 PHP+MySQL+nginx+Redis 环境,以及 docker 内 PHP 扩展安装。 at 3天前

    我的没问题

    root@68b8d29a95dc:/var/www/html# docker-php-ext-enable mongodb
    root@68b8d29a95dc:/var/www/html# php -m |grep mongodb
    mongodb

    容器里什么也没有,如果要自己编译特定版本的扩展怎么办?

    root@68b8d29a95dc:/var/www/html# yum install vi
    bash: yum: command not found
    root@68b8d29a95dc:/var/www/html# wget -h
    bash: wget: command not found
  • CentOS7 安装配置 GitLab at 5天前

    什么问题

    [root@VM_0_14_centos ~]# systemctl status postfix.service
    ● postfix.service - Postfix Mail Transport Agent
       Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Tue 2018-12-04 20:22:38 CST; 36s ago
      Process: 5899 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
      Process: 5897 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
      Process: 5893 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=75)
    
    Dec 04 20:22:35 VM_0_14_centos systemd[1]: Starting Postfix Mail Transport Agent...
    Dec 04 20:22:36 VM_0_14_centos aliasesdb[5893]: /usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 04 20:22:37 VM_0_14_centos postfix/sendmail[5896]: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 04 20:22:37 VM_0_14_centos aliasesdb[5893]: newaliases: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 04 20:22:37 VM_0_14_centos postfix[5899]: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 04 20:22:38 VM_0_14_centos systemd[1]: postfix.service: control process exited, code=exited status=1
    Dec 04 20:22:38 VM_0_14_centos systemd[1]: Failed to start Postfix Mail Transport Agent.
    Dec 04 20:22:38 VM_0_14_centos systemd[1]: Unit postfix.service entered failed state.
    Dec 04 20:22:38 VM_0_14_centos systemd[1]: postfix.service failed.
  • Laravel 项目部署到云服务器(CentOS 7 系统) at 6天前

    还要注意crontab用户写入文件权限问题

    编译安装也可以尝试下,或者用docker

  • Laravel 分组获取最新记录 at 6天前

    学习了

  • 多 PHP 版本共存的环境下安装 Swoole 到指定版本 at 6天前

    其实就是替换phpize 和--with-php-config

  • [扩展推荐] PHP 语义化版本(SemVer)辅助库 at 6天前

    可以直接比较的

    >>> 'v1.2.3'>'v3.2.1'
    => false
  • 介绍一个 EOS 区块链 RPC API 接口的 PHP SDK 包 at 1周前

    什么错

    $ composer require block-matrix-network/php-eos-rpc-sdk
        1/3:        https://packagist.laravel-china.org/p/provider-2018-01$e9af7c80638f046246d6af9326edbbca0b3e6776dd84ccd06cbc3e3d1ef7b87b.json
        2/3:        https://packagist.laravel-china.org/p/provider-latest$255f4d25efd6b82e789a949211dc05f05e5e0363dbe2fd2d7d93e3e5bcb925ff.json
        3/3:        https://packagist.laravel-china.org/p/provider-2018-10$ece6d0477308b855f9c1e0c3c175101dd4a3a57f229eada0001a23715b0d945d.json
        Finished: success: 3, skipped: 0, failure: 0, total: 3
    
      [InvalidArgumentException]
      Could not find a version of package block-matrix-network/php-eos-rpc-sdk ma
      tching your minimum-stability (stable). Require it with an explicit version
       constraint allowing its desired stability.
    
    require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
    
  • 登录、登出后重定向到来源页面 at 1周前

    关键词URL::previous()

  • 神经网络 at 1周前

    第一个点赞,大佬,大家都看不懂哪

  • Laravel5.5 新项目创建步骤 at 1周前

    错误参考

    $ php artisan migrate
    Migration table created successfully.
    
    In Connection.php line 664:
    
      SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
      oo long; max key length is 1000 bytes (SQL: alter table `users` add unique
      `users_email_unique`(`email`))
    
    In Connection.php line 458:
    
      SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
      oo long; max key length is 1000 bytes
    
  • Docker for LNMP (CentOS7 + Nginx + MariaDB + PHP7) at 1周前

    为什么安装完执行出错

    [root@VM_0_14_centos ~]# ctop
    Segmentation fault
  • 安装 supervisor at 1周前

    sudo touch /var/log/supervisord.log // 已经存在再次创建也没影响

    存在的话会更新创建时间吧,记得是

  • 追踪源码的方式归纳 at 1周前

    右键一个类、方法、函数、变量 -> Go To -> Declaration 可以找到定义这个东西的代码

    快捷键 ctrl+点击 就行

  • App 多版本服务端兼容 at 1周前
  • 使用 Iris 框架写的一个后台 API 练手项目 at 1周前
  • sql 注入将会是一个笑话 at 1周前

    比如 User::whereRaw('id='.$req->get('id'))->get()

  • 最无耻的 HTTP 常用状态码图解 at 1周前
  • 使用 docker 快速搭建 Permeate 渗透测试系统实践 at 1周前

    需要 docker start mysqlserver 才能启动,可为什么http://localhost:8899/输出这个?

    [root@VM_0_14_centos lnmp-docker]# docker run --name mysqlserver -e MYSQL_ROOT_PASSWORD=root -d -i -p 3309:3306  mysql:5.6
    13916f8cf861cbc1c1eb3c21af0448cf1dd05dbc961e10ff55463d0dfbdfbb71
    [root@VM_0_14_centos lnmp-docker]# docker run --name permeate_test --link mysqlserver:db  -d -i  -p 8899:80  registry.cn-hangzhou.aliyuncs.com/daxia/web safe:init
    Unable to find image 'registry.cn-hangzhou.aliyuncs.com/daxia/websafe:init' locally
    init: Pulling from daxia/websafe
    32802c0cfa4d: Pull complete
    da1315cffa03: Pull complete
    fa83472a3562: Pull complete
    f85999a86bef: Pull complete
    13dc74171d52: Pull complete
    Digest: sha256:50ab8171392dc43e6bd2c225930d19fa172f8ca6c79af753b6abbc0a4f5dbe31
    Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/daxia/websafe:init
    8c646b7594a5725078434645b96a46b06af58facc163869f30576478161cc004
    [root@VM_0_14_centos lnmp-docker]# docker exec permeate_test zsh -c "nginx && /usr/sbin/php-fpm7.2  -R"
    Error response from daemon: Cannot link to a non running container: /mysqlserver AS /permeate_test/db
    [root@VM_0_14_centos lnmp-docker]# docker start mysqlserver
    mysqlserver
    [root@VM_0_14_centos lnmp-docker]# docker exec permeate_test zsh -c "nginx && /usr/sbin/php-fpm7.2  -R"

    file

  • PHP 数组排序(复杂字符串) at 2周前

    asort是根据字符串第一个数字排序的

    Array
    (
        [0] => 1000-2000元
        [1] => 0-999元
        [2] => 8000元以上
        [3] => 5001-8000元
        [4] => 2501-3000元
        [5] => 3001-5000元
    )
    Array
    (
        [1] => 0-999元
        [0] => 1000-2000元
        [4] => 2501-3000元
        [5] => 3001-5000元
        [3] => 5001-8000元
        [2] => 8000元以上
    )
  • Docker 快速入门指引 at 2周前