FPM

PHP Thread compilation not working

我的梦境 提交于 2019-12-11 14:38:32
问题 I am attempting to use pthreads with Apache FPM. Step 1. After installing and recompiling php according to: https://blog.programster.org/ubuntu16-04-compile-php-7-2-with-pthreads The server works as expected and I can run pthreads from CLI. Step 2. Then I need to run threads from a web server so I followed the instructions from: https://antrecu.com/blog/run-php7-fpm-apache-mpmevent-ubuntu-1604 After sudo service apache2 restart && sudo service php7.0-fpm restart : Job for apache2.service

error when saving php sessions in project's directory

一世执手 提交于 2019-12-11 08:39:00
问题 On my project's configuration file I have: session: handler_id: session.handler.native_file save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" "%kernel.root_dir%/../var/sessions belongs to wwww-data (and yes, php-fpm is running as www-data ). When the project runs, an ( empty ) session file is created in that dir, but apparently php/symfony have trouble actually reading/writing to it, despite being able to properly create it. Here's the empty session file, just created (no

Run PHP application in Apache server using PHP-FPM

拜拜、爱过 提交于 2019-12-11 07:33:35
问题 We have a php application which was running fine using Docker Image : php:7.2-apache-stretch We now have to make use of the below image for better performance and make the application work as it was before . php:7.2.17-fpm-stretch As this image does not have apache in it . I updated the Dockerfile starting from the installation of apache2 and related packages based on various forums . There is many other steps . I have just added the instructions which I have updated in the Dockerfile. FROM

502 Bad Gateway

ⅰ亾dé卋堺 提交于 2019-12-11 05:28:11
问题 I'm having the problem that more often than not, if I go to a page on my server that uses php, I get the "502 Bad Gateway" error. Error logs: /var/log/nginx/error.log shows about 3 copies of this error per minute: 2016/08/27 15:07:22 [error] 17309#0: *53554 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: [dedicated server], server: localhost, request: "POST /xmlrpc.php HTTP/1.0", upstream: "fastcgi://unix:/var/run

How does one enable the OCI8 PHP extension, using the Oracle Instant Client, in Ubuntu 18.04 LTS with PHP-FPM and NGINX?

时光毁灭记忆、已成空白 提交于 2019-12-06 03:02:38
问题 I'm using the latest PHP packages available from https://launchpad.net/~ondrej/+archive/ubuntu/php . When I build and install the OCI8 extension, everything appears to be in order, but despite enabling the extension in the PHP-FPM configuration, its presence is not reflected in the output from phpinfo() . The following Gist details the exact process that I'm using to configure, build, and install the OCI8 PHP extension: https://gist.github.com/cbj4074/fa761f60b6f8db431539d76ebfba828e The very

Can not set error_log option in PHP with ini_set

二次信任 提交于 2019-12-02 02:53:15
I'm running PHP 7 on Ubuntu Xenial, and bumped into a weird situation with WordPress. I was attempting to enable WP_DEBUG_LOG and it wasn't writing out to the debug log file. I wrote up a small test case and I can't figure out why this is happening. I do not change the default config for safe_mode or open_basedir which my Googling led me to believe would be the culprits. Script <?php header('Content-Type: text/plain'); define('DEBUG_LOG', '/www/wp-content/debug.log'); echo "PHP Version: " . phpversion() . "\n"; echo "PHP SAPI: " . php_sapi_name() . "\n"; echo "safe_mode: "; var_dump(ini_get(

Different Php-Fpm containers with Apache

偶尔善良 提交于 2019-12-01 14:22:46
my production server is running Docker with a classic structure Db-Container, Server-Container and Php-Fpm container. What i would like to do is to split the sources in order to have different containers for the 3 main parts of the project. Now they work the old way like mydomain.com/index for the main site, mydomain.com/api and mydomain.com/adm for other services. How i have to setup the Apache virtual host in order to map requests like this? mydomain.com -> fcgi://siteFpm:9000 mydomain.com/api -> fcgi://apiFpm:9000 mydomain.com/cms -> fcgi://cmsFpm:9000 Thanks Use docker-compose expose and

给PHPSTORM添加XDEBUG调试功能

强颜欢笑 提交于 2019-11-29 20:42:28
1、运行环境 nginx 1.0.14 php with fpm-cgi 5.5.9 mac os X 2、安装步骤 1)install xdebug wget http://xdebug.org/files/xdebug-2.2.3.tgz tar xzvf xdebug-2.2.3.tgz && cd xdebug-2.2.3 /path-to-your-php-root/bin/phpize ./configure –enable-xdebug –with-php-config=/path-to-your-php-root/bin/php-config 修改你的php.ini配置,添加: zend_extension=/server/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so xdebug.idekey=”PHPSTORM” xdebug.remote_host=127.0.0.1 ;注意端口为9001,默认为9000,因为跟fpm冲突所以要修改 xdebug.remote_port=9001 xdebug.remote_enable=on */path-to-your-php-root/ 指你电脑里php的安装根目录,注意替换。 2)重启fpm和nginx kill -USR2 fpm主进程id

CentOS安装Apache的FastCGI模块(mod_fastcgi)

可紊 提交于 2019-11-29 18:27:40
网上有很多篇关于Apache的fastcgi模块安装说明的文章,大部分都是基于Apache源码编译的,如果是通过yum install方式安装httpd的话,直接依葫芦画瓢必然会遇到各种各样的编译问题,通过查阅老外写的一些安装文档,我大致重新整理了一下。 1. 安装编译相关的依赖包 # yum install httpd-devel apr apr-devel libtool 2. 下载 mod_fastcgi源代码 # wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz 3. 解压并进行编译安装 # tar zxvf mod_fastcgi-2.4.6.tar.gz # cd mod_fastcgi-2.4.6 # cp Makefile.AP2 Makefile # vim Makefile 修改top_dir目录,64位系统的路径为lib64,32位系统的路径为 /usr/lib/httpd top_dir = /usr/lib64/httpd 保存退出后,开始进行编译安装。 # make # make install 4. 加载模块 # vim /etc/httpd/conf/httpd.conf 找到LoadModule部分,添加一行加载语句 ... LoadModule fastcgi_module