问题标签 [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 投票
2 回答
12217 浏览

linux - Vesta CP升级PHP版本到5.6(CentOS 64bit)

默认 Vesta CP 0.9.8 附带 PHP5.4,这导致我的 Laravel 4.2 网站出现问题。如何将自托管 Vesta CP 的 php 版本从 5.4 升级到最新的 5.6?

0 投票
1 回答
612 浏览

php - 如果将键值设置为 NULL,PHP 5.6 中的 PHP-Redis 会崩溃,这是一个已知的错误吗?

此 PHP 代码使用段错误使主机(Apache)崩溃:

这对我来说很麻烦,因为 PHP 应该是一种高级语言,它不会取消引用 NULL 指针,而是将它们作为“空值”接受或抛出异常。

我是唯一一个看到这个的吗?(此代码在 PHP 5.3 和 5.5 中运行良好)

0 投票
1 回答
556 浏览

php - 如何让 __debugInfo 与 XDebug 一起工作?

当 xdebug 覆盖时,它似乎__debugInfo不起作用var_dump

有没有办法使这项工作?

我正在使用 PHP 5.6.0 和 XDebug 2.2.5

0 投票
4 回答
46893 浏览

php - Xampp MS SQL 服务器 PHP 5.6

我有一个运行 PHP 5.6 的 xampp。通常我使用 mysql 服务器,但对于已经存在的脚本,我需要一个 MS SQL 服务器。

我在网上搜索并安装了SQL Server 2012。

但现在我需要 PHP 的驱动程序。可惜我只能找到支持5.4、5.5的版本..

( http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx )

有没有办法让它与 5.6 一起工作?

0 投票
11 回答
54770 浏览

php - 从 packagegist 更新时 Composer 更新失败

在执行 composer install/update 时,我从 openssl 收到以下错误:

无法下载“ https://packagist.org/packages.json ”文件:SSL 操作失败,代码为 1。OpenSSL 错误消息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 无法启用加密无法打开流:操作失败 https://packagist.org无法完全加载,包信息是从本地缓存加载的,可能已过期

我在用:

  1. PHP 5.6.3 (cli)(构建时间:2014 年 11 月 17 日 15:16:53)
  2. XAMPP 堆栈 5.6.3-0
  3. Ubuntu 14.04

作曲家诊断显示:

[Composer\Downloader\TransportException]无法下载
https://getcomposer.org/version
”文件:SSL 操作失败,代码为 1。OpenSSL 错误消息: 错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证
失败启用加密
未能打开流:操作失败

php -r 'var_dump(openssl_get_cert_locations());' 显示:

对于 php 5.5.19,一切正常。

0 投票
1 回答
953 浏览

curl - Debian Wheezy 上的 php5-curl、php5-common 和 PHP 5.6.3-1~dotdeb.1

我正在使用带有 Nginx 和PHP 5.6.3-1~dotdeb.1的Debian 7 Wheezy。尝试安装php5-curl时时apt-get 告诉我它需要php5-common (= 5.4.35-0+deb7u2) but 5.6.3-1~dotdeb.1 ...并且安装失败。当我尝试安装 php5-common 时,我的 apt-get 告诉我它已安装在最新版本中。

我在我的开发 PC 上遇到了上述错误。奇怪,但在具有相同配置(完全相同的 Debian、Nginx、PHP 5.6.3-1~dotdeb.1)的生产 VPS 服务器上安装成功。

任何想法如何在我的电脑上安装 php5-curl?

0 投票
2 回答
2694 浏览

php - PHP 5.6 会话 + Memcache(d)

我有一个奇怪的问题,因为我已将 PHP 从 5.4 升级到 5.6。我自己从未见过该错误,但每天都会记录此消息:

session_write_close():写入会话数据失败(memcached)。请验证 session.save_path 的当前设置是否正确 (127.0.0.1:11211)

这并不总是发生,但仅适用于某些用户。这发生在三个不同的服务器上,它们在最新的 Debian 上具有 PHP ~5.6 和 Memcached。我尝试将 Memcached 扩展切换到 Memcache(当然是在 php.ini 中更改 save_handler),但问题仍然存在。我还尝试在 php.ini 中禁用会话锁定。这个问题肯定和 PHP 有关,因为我已经用 Perl 脚本测试过 Memcached 守护进程本身,并且没有一个连接错误。

很长一段时间以来,一切都很好,我在 PHP 升级后就开始遇到这个问题,所以它与 memcached 配置或类似的东西无关。也许我错过了什么?也许 5.6 在它的 ini 文件中需要一些额外的配置?我就是想不通。

目前我有点卡住了,我希望任何人都可以帮助我提供建议。我可以尝试切换回 5.4 或 5.5,但这不是一个真正的选择,我真的很想坚持使用 5.6。

0 投票
2 回答
130 浏览

php - 检查从哪里访问页面

我有两个 PHP 页面,一个 index.php 和一个 content.php。我正在使用include("content.php");index.php 文件中的代码。是否可以检查用户是在 index.php 上还是直接访问 content.php ?

基本上我想要做的是在 index.php 上显示 content.php 但如果用户直接转到 content.php 那么我不希望脚本做任何事情。

0 投票
7 回答
12875 浏览

macos - brew install php56 后库未加载错误

我正在使用自制软件在 OSX Mavericks 上从 php5.5 升级到 php5.6。我跑

一切运行并正常完成,但是当我运行时php -v出现以下错误

我该如何解决?

0 投票
2 回答
1009 浏览

laravel-4 - Hosting a Laravel 4.2 project with PHP 5.6 on a hosting server 500 Internal Server Error

/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 411

This error above I've faced on a free hosting service that uses PHP 5.3

I'm trying also on another paid service with PHP 5.3 and I'm getting the 500 Internal Server Error, and I made sure my routes and paths are good to go. (The index.php in the public folder, and the /bootstrap/path.php files are good to go with DIR URIs).

Now I'm sure I will keep getting these kind of errors and my app won't work unless I host it on a service with PHP 5.6, but I was hoping there would be a way that I could downgrade my Laravel version or PHP version for some kind of Backward Compatibility.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

My files are in the root directory, and there isn't any folder named public_html and so the files originally in the Laravel/public folder are dispersed in the root directory and my other application files and folders are in a folder in the root directory.

Any suggestions or help would really be much appreciated.