在我将我的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
我的剧本
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发布于 2018-10-29 12:42:28
因此,执行php -v将告诉您您的php运行在哪个版本的php上。因此,CLI和phpinfo中的版本相互冲突。其次,任务‘Installphp72-FPM’上的'pkg‘设置为'php5-fpm';尝试将其切换到所需的版本,看看您的进展情况。
https://stackoverflow.com/questions/53045629
复制相似问题