Articles of php7

Centos 6.8 serevr,apache 2.4.20,php 7.0.20

我编译Apache 2.4和PHP 7.0.20(这是我的configuration线: ./configure''–with-libdir = lib64''–prefix = / usr / local''–with-layout = PHP''–with-pear''–with-apxs2''–enable -calendar''–enable-bcmath''–with-gmp''–enable-exif''–with-mcrypt''–with-mhash''–with-zlib''–with- bz2''–enable-zip''–enable-ftp''–enable-mbstring''–with-iconv''–enable-intl''–with-icu-dir = / usr'' –with-gettext''–with-pspell''–enable-sockets''–with-openssl''–with-curl''–with-gd''–enable-gd-native- '–with-jpeg-dir = / usr''–with-png-dir = / usr''–with-zlib-dir = / usr''–with-xpm-dir = / usr' '–with-freetype-dir = / usr''–with-libxml-dir = / usr''–with-mysqli = mysqlnd''–with-pdo-mysql = mysqlnd''–enable-soap ''–with-xmlrpc''–with-xsl''–with-tidy = / usr''–with-readline''–enable-pcntl''–enable-sysvsem''–enable -sysvshm'–enable-sysvmsg''–enable-shmop''–enable-maintainer-zts''–with-tsrm-pthreads') 用pecl安装pthreads,将扩展名添加到我的php.ini文件,重新启动apache,然后apache崩溃,不再启动。 apache错误日志消息: PHP的致命错误:apache2handler SAPI不支持在线0上的未知的pthreads PHP的致命错误:无法启动线0上的未知的pthreads模块 我的问题是以最佳实践方式安装pthread的步骤是什么。 我已经尝试了一切,但没有运气.. […]

PHP-FPM 7.0 + NGINX:空闲进程

我知道有很多很好的答案这样的问题在stackoverflow或serverfault,但我无法find我的问题的答案。 我有我的php-fpm 7.0进程的以下/status输出。 pool: www process manager: dynamic start time: 04/Jul/2017:15:09:20 +0200 start since: 609 accepted conn: 6113 listen queue: 0 max listen queue: 0 listen queue len: 0 idle processes: 89 active processes: 11 total processes: 100 max active processes: 27 max children reached: 0 slow requests: 0 正如你所看到的,我有很多闲置的进程正在等待某些事情要做。 闲置的stream程是好还是不好的做法? ; The number of […]

NextCloud无限redirectlogin

login到NextCloud后,我得到了无尽的redirect,只是不断得到我的访问日志中的下面: [08/Jul/2017:00:18:49 +0100] "GET /login?redirect_url=/apps/files/ HTTP/1.1" 200 10760 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" 我使用Nginx和PHP-FPM 7运行CentOS 7 Nextcloud Nginx Conf.d文件: upstream examplecombackend { server unix:/var/run/php-fcgi-examplecom.sock; } server { listen 80; server_name example.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name example.com; access_log /var/www/vhosts/example.com/access.log; error_log /var/www/vhosts/example.com/error.log; ssl_certificate […]

Apache服务器拒绝请求

我有一台运行Ubuntu 16.0.4并运行Apache 2.4.18的服务器,它似乎拒绝来自某些客户端的请求。 我有另一台服务器与Apache 2.4.7接受相同的请求无错误。 如果我通过像Runscope这样的代理运行请求,我会得到一个结果。 如果我只是要求一个简单的PHP文件,我会得到错误。 我有loglevel设置为debugging,但服务器根本不显示请求。 我已经设置了LimitRequestLine 100000和AllowEncodedSlashes On,因为我请求的URL包含一个编码的URL。 但是,如果我删除所有传递的参数,它仍然失败。 这似乎是一个握手问题。 [MacBook-Pro-2:〜] admin%openssl s_client -connect www2.nrgsoft.com:443 CONNECTED(00000003)3519:error:140790E5:SSL例程:SSL23_WRITE:ssl握手失败:/ BuildRoot / Library / Caches / com。 apple.xbs /来源/ OpenSSL098 / OpenSSL098-59.60.1 / src目录/ SSL / s23_lib.c:185: 证书似乎是好的,当我检查像SSLLabs的网站。 https://www.ssllabs.com/ssltest/analyze.html?d=www2.nrgsoft.com 我的Mac有OpenSSL 0.9.8zh 2016年1月14日,而服务器是OpenSSL 1.0.2g 2016年3月1日。

Prestashop + Google Cloud SQL

我目前正在尝试使用Google Cloud Compute Engine和Google Cloud SQL(MySQL 5.7)来设置Prestashop 1.7实例。 我设法到达了Prestashop的安装页面,但是当我尝试将它连接到Cloud SQL时,出现以下错误: Your database login does not have the privileges to create table on the database "prestashop". Ask your hosting provider: Storage engine MyISAM is disabled (Table creation is disallowed). 我花了很多时间在这个上,我无法使它工作。 我知道Prestashop使用InnoDB作为默认的SQL引擎,Cloud SQL也是如此。 这就是为什么我不明白这个错误的来源。 谢谢你的帮助 !

在IIS上通过PHP发布一个大文件后接收404

我有一个表单,您可以上传XML文件,我的PHP文件parsing并将文件导入数据库。 当我发布一个50 MB或更less的文件,它的工作原理。 但是当我发布一些更高的东西时,它会从IIS返回“找不到404页面”。 为什么是这样? 它应该返回一个500错误呢? 在事件查看器中找不到任何内容,并且没有错误返回或logging在PHP错误日志中。 我迷路了。 Windows Server 2012 PHP 7.1.1 IIS版本6.2(内部版本9200)

PHP模块不会安装在CLI中 – 缺less目录

当试图在LAMP服务器上安装Phpmyadmin时,有“WARNING”行提示安装程序无法安装CLI版本的PHP模块。 这是Ubuntu 16.04 LTS与Apache 2.4,PHP 7.0.x和Mariadb 10。 运行sudo apt-get install phpmyadmin后,输出的后半部分引起我的关注。 有一堆这样的线: Creating config file /etc/php/7.0/mods-available/gd.ini with new version WARNING: Directory /etc/php/7.0/cli/conf.d doesn't exist, not enabling the module Setting up php-gd (1:7.0+35ubuntu6) … 事实上,/ /etc/php/7.0/cli和/etc/php/7.0/cli/conf.d都不存在。 根据我对消息的解释: 为web PHP安装了php-gd和php-mcrypt,但是不适用于CLI PHP dom,simplexml,wddx,xml,xmlreader,xmlwriter和xsl仅用于CLI,并且全部失败 php7.0-xml,php-xml,php-pear,php-gettext,php7.0-mcrypt,php-phpseclib,php-tcpdf和php-phpmyadmin只需要web模块,而且它们已经安装好了 我试过sudo apt-get install php7.0-cli ,得到: php7.0-cli is already the newest version (7.0.18-0ubuntu0.16.04.1). 所以我想我会删除并重新安装它,但似乎会撕毁所有的PHP,迫使我从本质上重新开始在这个服务器设置(很多工作): $ […]

无法加载php后,安装了PHP 7.1的dorked

在Debian 8(在Ubuntu上使用ppa)上安装了php7.1之后,我设法恢复了正确的php7.1包。 不过,我相信我缺less了几个关键模块。 问题是,从php5升级之前工作正常的WordPress的网站失败,http错误500.是的,似乎WordPress支持php7.1。 虚拟服务器由virtualminpipe理。 我的apache2日志显示: require_once(/home/example/public_html/wp-config.php): failed to open stream: Permission denied in /home/example/public_html/wp-load.php on line 37 现在,php文件正在下载到这个服务器上,而不是处理它们。 但是我没有改变权限,权限仍然是正确的。 用户和组是example.example。 在/ cat / passwd中,该用户存在。 其他网站似乎工作正常。 我已经安装了以下模块: php7.1-curl php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-xmlrpc 这是wordpress文档中记载的依赖关系。 我应该补充说只有ssl版本不起作用。 http版本显示默认的apache页面。 我的虚拟主机configuration(这可能是因为它由virtualmin生成有点麻烦)。 <VirtualHost *:80> SuexecUserGroup "#1003" "#1003" ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin.example.com ServerAlias *.example.com DocumentRoot /home/example/public_html ErrorLog […]

用nginx启用centos7上的PHP exec

我有一个运行nginx和PHP-FPM 7.1的Centos7.3 Web服务器。 我试图为PHP启用exec,但它不在/etc/php.ini或/etc/php-fpm/php-fpm.conf中的禁用function。 因为它是nginx我不能使用.htaccess强制启用它。

NextCloud和PHP-FPM作为全球别名问题

今天,我决定使用PHP-FPMtesting我的NextCloud安装为全局别名。 我目前使用mod_php7在/ var / www / cloud目录下有一个NextCloud工作实例作为别名,但是我希望切换到没有运气的PHP-FPM! 杰杰奥。 我目前的规格是: Ubuntu服务器16.04 ISPConfig 3.1.6 安装的PHP版本5.6 – 7.0和7.1 NextCloud 12.0.0 因为我想用PHP 7.0启用PHP-FPM,所以我在/etc/php/7.0/fpm/pool.d中用这个configuration文件创build了一个PHP-FPMconfiguration文件: [cloud] listen = /var/lib/php7.0-fpm/cloud.sock listen.owner = www-data listen.group = www-data listen.mode = 0660 user = www-data group = www-data pm = dynamic pm.max_children = 100 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 5 pm.max_requests = […]