首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >流浪汉没有加载正确的版本

问流浪汉没有加载正确的版本
EN

Stack Overflow用户
提问于 2018-10-29 12:35:17
回答 1查看 262关注 0票数 1

在我将我的ansible playbooks php版本从5更新到7.2之后,xdebug与这个版本相匹配。我在我的盒中运行php -v

PHP7.2.11-3+ubuntu14.04.1+deb.sury.org+1 (cli) (构建:2018年10月25日08:20:21) ( NTS )版权(c) 1997-2018 PHP Group Zend Engine v3.2.0,版权(c) 1998-2018 Zend Technologies with Zend OPcache v7.2.11-3+ubuntu14.04.1+deb.sury.org+1,版权(c) 1999-2018,由Zend与Xdebv2.6.1,版权(c) 2002-2018,由Derick

但我的phpinfo();说

PHP5.6.38-3+ubuntu14.04.1+deb.sury.org+1本程序使用Zend脚本语言引擎: Zend v2.6.0,版权(c) 1998-2016年Zend OPcache v7.0.6-dev,版权(c) 1999-2016年,由Zend与Xdebug v2.5.5,版权(c) 2002-2017

我的剧本

代码语言:javascript
复制
 name: Add ppa Repository
  sudo: yes
  apt_repository: repo=ppa:ondrej/{{ php.ppa }}

- name: Update apt
  sudo: yes
  apt: update_cache=yes

- name: Install php72
  sudo: yes
  apt: pkg=php7.2 state=latest

- name: Install php72-fpm
  sudo: yes
  apt: pkg=php5-fpm state=latest

- name: Install PHP Packages
  sudo: yes
  apt: pkg={{ item }} state=latest
  with_items: "{{php.packages}}"
  when: php.packages is defined

- name: Set date.timezone for CLI
  become: true
  lineinfile:
    dest: /etc/php/7.2/cli/php.ini
    regexp: "date.timezone ="
    line: "date.timezone = Europe/Berlin"

- name: Set date.timezone for apache php
  become: true
  lineinfile:
    dest: /etc/php/7.2/apache2/php.ini
    regexp: "date.timezone ="
    line: "date.timezone = Europe/Berlin"

- include: configure.yml
- include: pecl.yml
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-10-29 12:42:28

因此,执行php -v将告诉您您的php运行在哪个版本的php上。因此,CLI和phpinfo中的版本相互冲突。其次,任务‘Installphp72-FPM’上的'pkg‘设置为'php5-fpm';尝试将其切换到所需的版本,看看您的进展情况。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53045629

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档