问题标签 [php-5.6]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2357 浏览

php - PHP crypt() 在版本 5.6.4 中返回 *0 失败字符串,但不是 5.4,

echo crypt('test', "$2a$07$");在 PHP 版本 5.4.16 中产生长哈希,但*0在 5.6.4 中产生“失败字符串”。

阅读 crypt() 上的 PHP 文档,我仍然不太清楚为什么,尽管 Changelog 提到了*1被返回而不是*0取决于情况。( http://php.net/manual/en/function.crypt.php )

*0在这种情况下被退回的原因是什么?PHP 过去 5.4 是否停止容忍表单的坏盐$2a$07$

0 投票
2 回答
403 浏览

php - Symfony 2.6.4: Namespace Issue? Using custom validator pass throws exception on command line but works fine in browser

I tried Kevin Bond's Solution on this question. It works fine when using the application in the browser but throws the following exception on console commands. I triplechecked my syntax for typos... The code is exactly the same as in the above linked question. The only thing I changed is the bundle name.

Exception trace:

I tried any way of debugging I could imagine. Please help. Only thing I can do for now is commenting out the call in my AppBundle.php when using console and commenting it back in when using the browser.

  • The user and the file permissions don't seem to matter.
  • Emptying the cache does not help.

Things tried so far:

  • Fix permissions of class

    $ sudo chmod -R 777 src/AppBundle/DependencyInjection/ $ sudo -u daemon php app/console cache:clear --env=dev => same error.

  • Delete cache & try to warmup

    $ sudo rm -rf app/cache/* $ sudo chmod 777 app/cache $ sudo app/console cache:warmup => same error.

0 投票
1 回答
1090 浏览

php - php 5.6 更新 stream_socket_client - 不再打开套接字

已添加:www.somewhere.com ca 到服务器证书已删除 &$ 已检查 yourcert.pem 到期时间,但未将整个代码迁移到 curl,我被卡住了。它必须是像我脸上的鼻子一样明显的东西……但是什么……

0 投票
2 回答
11546 浏览

php - 将应用程序从 PHP 5.2 迁移到 5.5

我有一个当前在 PHP 5.2 服务器上运行的应用程序,我需要迁移到 PHP 5.5(或 5.6)服务器。有什么要看的,我可能会遇到什么问题?提前致谢

0 投票
1 回答
693 浏览

php - 使用 Zend Server 8.0.1 PHP 5.6.4 CLI 安装 laravel 停止工作

我已经在Windows 8.1上安装了Zend Server 8.0.1PHP 5.6.4。我已将“ E:\Program Files (x86)\Zend\ZendServer\bin ”添加到包含 PHP 二进制文件的 PATH 变量中。

我已经在全球范围内安装了 Composer。我正在尝试使用 composer 命令' composer create-project laravel/laravel '创建一个 Laravel 项目。一段时间后 PHP CLI 停止工作。屏幕截图如下。 在此处输入图像描述 下面给出的 PHP 设置的屏幕截图。在此处输入图像描述 我试了几次,但同样的错误。有没有人遇到过同样的问题。不幸的是我没有工具来分析转储。

0 投票
1 回答
698 浏览

php - 闭包中的后期静态绑定 PHP5.5 vs 5.6

为什么new static闭包(在类static方法中)在 PHP5.5 中等于new self,而在 PHP5.6 中正确绑定?

鉴于:

然后

在 5.5 中,这将按预期工作:

但为什么会这样?我没有在 php.net 上找到任何关于 5.6 中的静态绑定更改的提及。

0 投票
1 回答
121 浏览

php - 从 5.5.22 升级到 5.6.6 后,无法将变量变量传递给 PHP 中的函数?

这行代码在我升级之前运行良好,现在它没有:

我收到此错误:

一种解决方法是先手动分配它们

有没有办法让它像以前一样在一条线上工作?有谁知道为什么它不再起作用?

我应该补充一点,我尝试过使用

上一行中,它已定义,并且具有我期望的值。

我在谷歌或 SO 上找不到任何关于这种行为的提及,我想知道这是否是一个错误而不是有意的。

0 投票
0 回答
450 浏览

php - php apache的OSX yosimite curl问题

我的 apache 无法从我的网站卷曲时遇到问题。我收到以下错误

我以为我已经安装了 curl 但显然没有。可能不是网络服务器的一部分,因为当我php -icli模式下执行时,我得到以下信息

但是当我执行 phpinfo() 并转到页面时,我没有看到 curl 安装。我在这个问题的末尾添加 phpinfo

所以我尝试了很多很多东西。

我尝试通过做删除自制卷曲

brew rm curl 然后使用 openssl 选项重新安装它,

我还通过下载 5.6.5 版本的 php 并编译来进行 phpize。

我什至继续安装了 macports 程序,但这并没有帮助。

所以我的结论是curl在我的mac上以cli形式工作,但不是从网页上工作。

这是我的mac信息

这是我的phpinfo

在此处输入图像描述

0 投票
1 回答
1293 浏览

php - 如何访问常量数组中的元素

从 PHP 5.6 开始,可以像这样定义一个常量数组:

但是,我不清楚如何准确地访问使用键或索引的数组元素。当我尝试这样做时,PhpStorm 抱怨语法错误:

0 投票
1 回答
206 浏览

php - 为什么 suhosin.executor.disable_emodifier 不起作用?

我在 ubuntu12.04 上运行 PHP5.6,因为 apache 2.4 模块 Suhosin 是从源代码安装的

Suhosin 已启用,我可以在 phpinfo() 函数输出中看到它。我在 suhosin.ini 中有这些行:

而且我还可以在 phpinfo() 中看到它们已启用。全球和本地。

但由于某种原因很简单

只给我看那个该死的“5”!!!

一样

如何启用该 suhosin?