2015-06-09 10:00
浏览 171


I'm trying to install zend-escaper but I'm getting this error:

enter image description here

This is strange as my PHP version (from phpinfo()) is 5.5.19, the message claims it is 5.3.5(!) which should satisfy the requirement anyway.

My ZF version is 1.12.13 I'm using PHP Storm

Can anyone help please?

Thanks Tomasz

图片转代码服务由CSDN问答提供 功能建议

我正在尝试安装zend-escaper但我收到此错误: \ n

这很奇怪,因为我的 PHP版本(来自phpinfo())是5.5.19,消息声称它是5.3.5(!),它应该满足要求。

我的ZF版本是1.12.13 \ 我正在使用PHP风暴


谢谢 Tomasz

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douhan8430 2015-06-09 17:10

    The PHP version on the command line can be a different executable than the PHP running inside the web server. It also can use a different pho.ini configuration file.

    So if Composer states the PHP it is using is 5.3.5, this is correct because Composer is directly asking the PHP it is running on for its version. The problem is when this PHP version on the command line is way older then the PHP version in the web server.

    Try to update your command line PHP.

    Some more things to say: the version 5.3.5 is lower than the required 5.3.23, because the last number in the version is 5 compared with 23, and 5 is less than 23. So the version you are using is below the minimum requirement for zend escaper - at least in the version 2.5.1 you try to use. Such an old PHP was last supported in the 2.2 framework versions, so you might as well try to depend on ~2.2. However this will simply be a workaround for the old cli version.

    One other note: You are in the process of installing a zend framework 2 component - don't expect your installed zend framework 1 to support any fancy stuff on its own. It is possible to mix classes with namespaces and without, and even use zf2 things together with zf1, but zf1 won't offer any automatic functionality to use these.

    打赏 评论

相关推荐 更多相似问题