Articles of php7

IIS8 PHP7多个PHP网站

我在Windows Server 2012 R2上的IIS8上运行PHP7。 截至昨天一切都很好,因为我只有1个PHP网站托pipe,我开始主办第二个网站,现在PHP一次只能在一个网站上工作。 如果我重新启动IIS并访问一个网站它的工作,但另一个不会(错误500),所以我重新启动,先访问非工作的一个,它的工作,但另一个停止工作(错误500)。 所以这两个网站显然正确configuration…在CGI的东西也许? 我认为这可能是最大的情况下(它是se到1),所以我把它设置为0,但没有奏效。 我现在把它放回1,否则它会让Windowscaching头痛。 任何想法如何同时工作? 谢谢,詹姆斯

如何在Debian 8.7上安装PHP 7. *

我期待至less在Debian 8.7上安装PHP 7.0,但是从四处搜寻,我发现很难find一个可靠的来源,告诉我如何做到这一点。 看起来很困难,我遇到了DotDeb,但是我读了有关使用它的坏消息,我不确定在Debian上安装PHP 7.0的最佳方式是什么?

在Apache 2.4 Windows 10上未启用OpenSSL

我在Windows 10上运行php 7.1.10,到目前为止,如果我做php -m我看到扩展名列表中的openssl,我复制libssh2.dll , ssleay32.dll , libeay32.dll到apache/bin和Windows/System32重新启动apache几次,但是OpenSSL仍然是禁用的。 我错过了configuration中的东西吗?

无法在Ubuntu 16.04服务器上安装php-zip

我试图在我的服务器上安装php7.0-zip ,所以我可以在PHP脚本中使用它,但是我得到一个很大的错误: sudo apt-get install php-zip Reading package lists… Done Building dependency tree Reading state information… Done The following additional packages will be installed: libzip4 php7.0 php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-pspell php7.0-readline php7.0-soap php7.0-xml php7.0-zip The following NEW packages will be installed: libzip4 php-zip php7.0-zip […]

编译PHP7与MySQL错误

我正在CentOS 6.7上为PHP7设置一个alt-install,其中包含原始PHP版本的configuration选项: ./configure –disable-fileinfo –disable-opcache –disable-posix –enable-bcmath –enable-calendar –enable-exif –enable-ftp –enable-gd-native-ttf –enable-libxml –enable-mbstring –enable-pdo=shared –enable-soap –enable-sockets –enable-zip –prefix=/usr/local/php7 –with-bz2 –with-curl=/opt/curlssl/ –with-freetype-dir=/usr –with-gd –with-gettext –with-imap=/opt/php_with_imap_client/ –with-imap-ssl=/usr –with-jpeg-dir=/usr –with-kerberos –with-libdir=lib64 –with-libxml-dir=/opt/xml2 –with-libxml-dir=/opt/xml2/ –with-mcrypt=/opt/libmcrypt/ –with-mysql=/usr –with-mysql-sock=/var/lib/mysql/mysql.sock –with-mysqli=/usr/bin/mysql_config –with-openssl=/usr –with-openssl-dir=/usr –with-pcre-regex=/opt/pcre –with-pdo-mysql=shared –with-pdo-sqlite=shared –with-pic –with-png-dir=/usr –with-tidy=/opt/tidy/ –with-xpm-dir=/usr –with-zlib –with-zlib-dir=/usr 它抛出了以下错误: configure: WARNING: unrecognized options: –with-mysql 有谁知道什么是正确的选项是PHP7,我似乎无法在Google上find它? 谢谢 :)

PHP7.0-FPM和Nginx不能使用unix套接字

我有一个麻烦,没有在networking上描述。 我正在使用VPS Debian 8 Nginx + PHP7.0-FPM 。 我的服务器在源代码中提供了php文件,当我configurationNginx和PHP7.0-FPM使用unix套接字 (我这样做,因为我读它工作得更快,然后TCP连接),它不编译。 所以我真的做了什么,这是行不通的 : 编辑/etc/nginx/fastcgi_params来注释fastcgi_pass参数使用unix套接字文件: #fastcgi_pass 127.0.0.1:9000; 我所有的主机都包含这个文件,所以我需要在每个主机文件中configuration自己的套接字。 我这样做: 编辑/etc/nginx/sites-available/example.com我在那里inputfastcgi_pass参数 location ~ '\.php$|^/update.php' { fastcgi_split_path_info ^(.+?\.php)(|/.*)$; fastcgi_pass unix:/var/run/php/example.com.php7.0-fpm.conf; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME /var/www/example.com/www$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT /var/www/example.com/www; fastcgi_param PHP_ADMIN_VALUE upload_tmp_dir=/var/www/example.com/tmp/upload; fastcgi_param PHP_ADMIN_VALUE session.save_path=/var/www/example.com/tmp/sessions; } 编辑主php7.0-fpm池文件/etc/php/7.0/fpm/pool.d/www.conf来监听套接字(但现在我不明白为什么我需要在这里): listen = /var/run/php/php7.0-fpm.sock 编辑我的网站的池文件/etc/php/7.0/fpm/pool.d/example.com.conf设置它自己的套接字(所以这里有必要,我想): listen = /var/run/php/example.com.php7.0-fpm.sock 重启服务: 服务nginx重启&&服务php7.0-fpm重启 所以这得到我的index.php下载,因为它是当我访问任何网站页面。 但是如果我使用tcp socket fastcgi_pass […]

PHP 7 opcache v php 5.6 xcache

我们正在configuration一个新的服务器,并决定(php7 / opcache)和(php5.6 / xcache)。 我们运行几个矮胖的电子商务网站,并希望获得最佳的性能。 我正在寻找两者之间的比较结果,但无法find任何地方。 有没有人有两个并排的经验?

如何使用puppetlabs-apache在Ubuntu 16.04上安装PHP 7.0的Apache

我想使用Puppet Labs Apache模块在Ubuntu 16.04上安装PHP 7.0的Apache 。 按照文档模块支持Ubuntu 16.04 。 有一个与PHP 7.0支持相关的票据,并且有一个接受的合并请求应该添加PHP 7.0的支持。 它看起来像合并中提供的修复不包含在模块1.9.0版本。 问题是 有没有什么办法可以使用build议的修补程序并使用PHP 7.0安装Apache? 我应该在清单中写什么? 以下代码(来自Puppet清单)在Ubuntu 16.04上不起作用 class { 'apache': mpm_module => 'prefork', } include apache::mod::php 我有以下错误 Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=–force-confold install libapache2-mod-php5' returned 100: Reading package lists… Building dependency tree… Reading state information… Package libapache2-mod-php5 is not available, […]

PHP“mysqli.so:undefined symbol:mysqlnd_connect in Unknown on line 0”

我一直试图让PHP CLI(Ubuntu上的7.0.7)与mysqli一起工作,但没有成功。 我在启动时收到相同的错误信息: mysqli.so: undefined symbol: mysqlnd_connect in Unknown on line 0 这是来自php -i的一些输出(清楚地显示两者都被加载): mysqli MysqlI Support => enabled Client API library version => mysqlnd 5.0.12-dev – 20150407 – $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $ Active Persistent Links => 0 Inactive Persistent Links => 0 Active Links => 0 Directive => Local Value => Master Value mysqli.allow_local_infile => […]

为什么Ubuntu的默认PHP 7.0.13几乎是ppa的两倍:ondrej / php PHP 7.0.15?

所以我的意图是真正的基准如何我们目前的应用程序生成的报告在php5,php7和php7-fpm。 我使用Ubuntu 16.04在DigitalOcean上启动了一个2gb实例,并安装了apache2和php7。 testing运行约9秒,并生成一个报告10次(ab -k -c 2 -n 10)。 然后我安装了ppa:ondrej / php并升级并再次运行(仍然在php7.0上,但现在从ppa)。 16秒的结果有点令人惊讶。 我切换到php5.6,它运行了18秒。 然后我清除了ppa,并从ubuntu的repo中恢复了php7,并在大约10秒钟内再次运行。 那为什么这么慢?