PHP致命错误在相同环境中不可再现

PHP致命错误在相同环境中不可再现,php,Php,我有两个运行相同堆栈的环境,它们提供不同的PHPUnit测试结果 在我基于vagrant的环境中,我们的PHPUnit测试套件顺利通过 在我基于VPS的环境中,我们看到以下php致命错误: PHPUnit 5.5.1 by Sebastian Bergmann and contributors. .......................................S.S.....PHP Fatal error: Class Mock\Product\Promotion\DataP

我有两个运行相同堆栈的环境,它们提供不同的PHPUnit测试结果

在我基于vagrant的环境中,我们的PHPUnit测试套件顺利通过

在我基于VPS的环境中,我们看到以下php致命错误:

PHPUnit 5.5.1 by Sebastian Bergmann and contributors.

.......................................S.S.....PHP Fatal error:  
Class Mock\Product\Promotion\DataProviderMock contains 5 abstract methods 
and must therefore be declared abstract or implement the 
remaining methods (Olive\Product\Promotion\DataProviderInterface::hasPromotion, Olive\Product\Promotion\DataProviderInterface::isSticky, Olive\Product\Promotion\DataProviderInterface::getValuePromotion, ...) 
in /tmp/popeye/olive/tests/mock/Mock/Product/Promotion/ProviderMock.php on line 11
修复很简单(实现类中的方法),但是在进行修复之前,我想了解为什么这两种环境中的行为不同

我假设这两种环境的不同之处就在我的PHP配置中

我已经检查了
php config
php composer.phar show-t
之间的输出环境是否没有差异

php-i
的输出之间存在一些可能相关的差异

下面是
php-i
的区别,左侧是vagrant环境(未看到错误),右侧是VPS环境(确实看到错误):

$ diff php-i.vagrant php-i.vps
4c4
< System => Linux vagrant-box 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64
---
> System => Linux staging-01 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64
109c108
< apc.shm_size => 32M => 32M
---
> apc.shm_size => 192M => 192M
112c111
< apc.ttl => 0 => 0
---
> apc.ttl => 86400 => 86400
144,145c143,144
< display_errors => STDOUT => STDOUT
< display_startup_errors => On => On
---
> display_errors => Off => Off
> display_startup_errors => Off => Off
154c153
< error_reporting => 32767 => 32767
---
> error_reporting => 22527 => 22527
746c745
< opcache.fast_shutdown => 0 => 0
---
> opcache.fast_shutdown => 1 => 1
754c753
< opcache.interned_strings_buffer => 4 => 4
---
> opcache.interned_strings_buffer => 16 => 16
757c756
< opcache.max_accelerated_files => 2000 => 2000
---
> opcache.max_accelerated_files => 16229 => 16229
760c759
< opcache.memory_consumption => 64 => 64
---
> opcache.memory_consumption => 192 => 192
771c770
< opcache.validate_timestamps => On => On
---
> opcache.validate_timestamps => Off => Off
793c792
$diff php-i.vagrant php-i.vps
4c4
Linux vagrant box 4.4.0-62-generic#83 Ubuntu SMP周三1月18日14:10:15 UTC 2017 x86_64
---
>System=>Linux staging-01 4.4.0-81-generic#104 Ubuntu SMP周三6月14日08:17:06 UTC 2017 x86_64
109c108
32M=>32M
---
>apc.shm_尺寸=>192M=>192M
112c111
0=>0
---
>apc.ttl=>86400=>86400
144145C143144
STDOUT=>STDOUT
On=>On
---
>显示错误=>Off=>Off
>显示启动错误=>Off=>Off
154c153
32767=>32767
---
>错误报告=>22527=>22527
746c745
0=>0
---
>opcache.fast_shutdown=>1=>1
754c753
4=>4
---
>opcache.interned_strings_buffer=>16=>16
757c756
2000=>2000
---
>opcache.max\u加速\u文件=>16229=>16229
760c759
64=>64
---
>opcache.memory_消耗=>192=>192
771c770
On=>On
---
>opcache.validate_timestamps=>Off=>Off
793c792
是否有任何PHP专家能够解释为什么我们只在一个环境中看到这个错误


非常感谢

我怀疑这是由于与错误相关的其中一个设置不同:

144,145c143,144
< display_errors => STDOUT => STDOUT
< display_startup_errors => On => On
---
> display_errors => Off => Off
> display_startup_errors => Off => Off
154c153
< error_reporting => 32767 => 32767
---
> error_reporting => 22527 => 22527
144145c143144
STDOUT=>STDOUT
On=>On
---
>显示错误=>Off=>Off
>显示启动错误=>Off=>Off
154c153
32767=>32767
---
>错误报告=>22527=>22527

这似乎更适合于,因为它处理的是配置PHP的复杂问题,祝你好运,如果你能在你的流浪环境中编写一个演示问题的脚本,那可能是件好事。事实上,任何人都很难帮助你,看不见。我一直在用谷歌搜索这个错误,除了是否启用错误报告之外,我找不到任何会影响它的配置选项。在这两种环境中,你有不同的
错误报告设置。感谢所有答案,非常感谢。谢谢,我想你可能是对的。我将重点研究这些配置选项。