Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [php-fpm]

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

0
votes
2answers
301 views

add_header not working in Nginx location

So, I've been trying to figure this out for the past 8 hours, but it seems I'm stuck... I have the following Nginx config file: server_tokens off; upstream php-handler { server unix:/var/run/php5-...
-1
votes
1answer
37 views

Will apt-get upgrade modify symlinks? For example libphp7 symlinked instead of libphp5 under /etc/alternatives

I performed sudo apt-get upgrade. $ sudo apt-get upgrade After the upgrade, I noticed some php 5.7 files and folders in the etc directory For example: I saw /usr/bin/php7.1 and /etc/php/7.0, 7.1, 7....
0
votes
0answers
214 views

/php-fpm/www.sock failed after client request body is buffered

We have a php script which parse xml feeds. Time to time feeds are too big. Now we have a total dead nginx problem. steps: Big file [warn] 7972#0: *268173 a client request body is buffered to a ...
1
vote
1answer
216 views

php-fpm not generating core dump files despite being configured to

I'm running Centos 7 with php-fpm 5.4. I'm encountering a (signal 11) SIGSEGV error in my php-fpm error logs and want to debug it. I've followed the advice of php5 fpm: how do you generate core dump ...
0
votes
0answers
202 views

Nginx PHP-FPM 5.6 PATH_INFO is empty

I'm running nginx 1.14.0 and php-fpm5.6 on Ubuntu 18.04. When I look at my PHP variables with info.php, the PATH_INFO variable is empty. I wonder what could be wrong? /etc/nginx/sites-enabled/mysite....
0
votes
1answer
111 views

Wrong file owner on webserver but how?

OS: CentOS 7.1 Applications: NginX: 1.14.0 PHP-FPM: 7.1.17 I have a webserver that has NginX and PHP-FPM running. Both applications are running by the user nginx. However, when my Laravel ...
1
vote
1answer
440 views

Deploying a php/laravel app with nginx in Docker swarm yields blank page and no errors

I have a Laravel application which I plan to deploy on a Docker Swarm. The problem is that no matter what I do I get a blank page when calling localhost/index.php. I'm using 2 separate services for: ...
0
votes
0answers
429 views

Can't get PHP to parse with NGINX/FastCGI/PHP

So I spent the better part of last night trying to get my ec2 instance setup with nginx and php7.2. I got everything installed and I edited the server block in my nginx.conf with the values I thought ...
0
votes
1answer
397 views

Moodle: Error during Installation

I am trying to install Moodle and everything seems fine but then when it comes to Admin user creation process, it seems as there is no CSS file, and "update profile" button does not perform any action....
0
votes
0answers
189 views

PHP for redis not loading

Trying to get REDIS client installed correctly for use on a debian linux install. I installed redis client with PECL. When I run PHP -m from the command line it shows that the redis client is loaded ...
1
vote
1answer
62 views

PHP-FPM and PHP execution yields different results

I have used a docker container with the embedded php server for development. Now we are creating a test environment and we wanted to use php-fpm. Everything went fine and the whole thing works as ...
0
votes
1answer
68 views

Nginx downloads php files in subdirectories

I've searched all over the internet and read all questions and answers and tried them all but no help. The problem is, whenever I try loading a php file using nginx in any subdirectory it downloads ...
0
votes
0answers
26 views

nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

I am trying to set up a laravel installation in docker with php-fpm and nginx server on a separate container. The issue is the laravel is installed in a path like /home/apps/foo and the url I need is ...
1
vote
2answers
162 views

nginx server redirecting to 2 different containers based on path for laravel

I am trying to do the following: I have 2 docker php-fpm(no nginx) containers with the same directory structure but with different versions of code. Now I have another container with nginx in it. ...
2
votes
1answer
388 views

php memory_limit vs kubernetes resource memory limit

I'm new to Kubernetes and I'm trying to figure out what resource limits I should set for my php webapp. My first guess is that if I have configured php fpm to use a maximum of 256M of memory then ...
1
vote
0answers
289 views

Apache 2.4 with php-fpm ignores .htaccess

I have a VPS server with Apache, FastCGI and php-fpm installed. But, the .htaccess files seems be ignored. I have a .htaccess file that redirects http URLs to https URLs: <IfModule mod_rewrite.c&...
0
votes
0answers
335 views

trouble with installing fastcgi_cache_purge ubuntu 16.04

So I'm trying to install fastcgi_cache_purge which is supposely a third party module https://github.com/FRiCKLE/ngx_cache_purge from https://www.nginx.com/resources/wiki/modules/ but this would ...
0
votes
2answers
446 views

Apache 2.4 with PHP-FPM 5.6 on Centos 6

I'm trying to get PHP working over FPM on Centos. On the FPM side, /etc/php-fpm.d/www.conf is pretty much the default values. I'm left it using a TCP port as follows (I may want to change to a file ...
0
votes
0answers
101 views

High CPU blocking performance on SSH tunnel with PHP-FPM

I've a Debian 9 VPS set up with Apache and PHP-FPM. It connects to another VPS to access a common database server VPS via an SSH tunnel. Mostly this works fine. Running a test for broken links ...
1
vote
1answer
270 views

nginx + php5-fpm: Resource temporarily unavailable

I have an nginx (in a Debian docker container) with this config for a Symfony app: location ~ ^/api/(app|app_dev|config)\.php(/|$) { root /var/www/backend/web/; fastcgi_split_path_info ^/api/(...
0
votes
1answer
434 views

Nginx/php-fpm timeouts

I have a setup that consists of a load balancer, two web servers running nginx/php-fpm7.1 and a database server running mariadb. For the past few months I have been struggling to work out the cause ...
0
votes
0answers
608 views

504 Gateway Time-out Nginx -> PHP-FPM kubernetes

I've been trying to get my nginx connection to work with php-fpm for several days now. The problem is, he always gives me a 504 and gives me the next error log: 2018/07/09 10:57:25 [error] 5#5: *10 ...
0
votes
0answers
150 views

php-fpm cannot acess unix socket

I'm using different PHP-FPM pools with specific users each one. I just switched memcached to use a socket instead of tcp/udp ports (for many reasons including the recent attacks on the 11211 port). I’...
0
votes
2answers
5k views

NGINX+PHP-FPM7 FastCGI sent in stderr: “Primary script unknown”

Can't get it work. I've been reading the forums and trying here and there. It's a fresh installation on AWS Linux2 AMI (redhat based), installed wordpress at /var/www/wordpress, set permissions, have ...
0
votes
0answers
23 views

FPM/FastCGI where to change the max execution time for scripts

First of all i created a stack with easyengine.io on hosted on Google Cloud => Compute Engine (VM Instance) I am running FPM/FastCGI. Can somebody tell me where to change the max execution time for ...
0
votes
0answers
205 views

Nginx not executing PHP file, but executes others (shared config)

Now I know this is a common question, but I can't seem to get Nginx to execute a php file. What's funny, however, is that I'm including a common php config that works just fine for other sites/files (...
1
vote
1answer
2k views

Nginx and php-fpm wait to finish previous requests when 6+ concurrent connections

I can't figure out how to setup Nginx and php-fpm to allow more than 6 concurrent connections from single IP. I have the following simple PHP files (no FW): <?php // long-request.php sleep(15); --...
0
votes
0answers
1k views

Nginx + PhpFpm + phpmyadmin upstream timed out (110: Connection timed out) and recv() failed (104: Connection reset by peer) errors

I am having connection timed out and connection reset by peer error 503 on Nginx + Phpfpm 7.1 setup. 2018/06/28 14:32:13 [error] 2428#2428: *45 upstream timed out (110: Connection timed out) while ...
0
votes
0answers
28 views

server resource impact for using a setup with php extensions per php-fpm pool

First a bit of context: I'm running a webhosting server based on nginx with php-fpm and generally 3 flavours of php (7.0/7.1 and 7.2, disabled 5.6 since a couple of days as it wasn't used on any of ...
0
votes
0answers
43 views

URL Parameters do not appear in PHP info under Query_String

There is an issue on my server at the moment where I input: http://example.com/phpinfo.php?test=1 On the PHP Variables, it should appear with "test=1" beside "_SERVER["QUERY_STRING"]". The server ...
0
votes
1answer
1k views

What does “graceful reload” actually mean with php fpm?

The php-fpm man page states the response to a USR2 signal is: "graceful reload of all workers + reload of fpm conf/binary". However, in testing I find that a reload actually kills workers processing ...
0
votes
1answer
432 views

php-fpm ignores file .user.ini

I have the following file .user.ini in /var/www/html/nextcloud upload_max_filesize=511M post_max_size=511M memory_limit=512M mbstring.func_overload=0 always_populate_raw_post_data=-1 default_charset='...
1
vote
0answers
114 views

php.net discourages the use of threaded MPM in production with Apache 2

php.net discourages the use of threaded MPM in production with Apache 2. Use the prefork MPM, which is the default MPM with Apache 2.0 and 2.2. It doesn't mention anything about apache 2.4, I ...
0
votes
0answers
50 views

Lots of ENOENT (no such file or directory) errors in my php-fpm: pool www processes, resulting in 100% processor usage

I am running a Magento 2.2.4 installation on php 7 and apache2. I have asked this on the Magento stackexchange as well but someoone suggested it might not be a magento-specific problem. Sometimes ...
0
votes
1answer
371 views

Nginx Try_files redirection losing query string

I am trying to setup a specific redirection to force redirection to index.php (for Laravel) for a specific subdirectory, bypassing existing index.html. The url i want to catch looks like this app/kit/...
3
votes
2answers
1k views

Getting environment variables in PHP-FPM with Nginx

I've defined some environment variables like APP_ENV in my /etc/environment file, on my ArchLinux. If I type printenv, I see them. I've created this simple test file called… test.php <?php ...
0
votes
1answer
62 views

1 bad phpfpm pool.d config causes disaster

I noticed that if a pool config in pool.d has a bad path, then all the pools won't start when doing systemctl start php7.0-fpm.service - is there a way to make phpfpm gracefully continue? I've tried ...
1
vote
0answers
737 views

PHP FPM pool www - 100% spikes when executing scripts - how to debug

I am experiencing weird 100% spikes of cpu when loading drupal pages. It started several months ago and now Im trying to debug this. I moved same database and files to new hosting - everything runs ...
0
votes
0answers
21 views

phpfpm won't start if 1 pool fails

My phpfpm service (using systemctl on ubuntu xenial) will NOT start ANY pools if only 1 pool is bad. Say I have 100 pool configs in /etc/php/7.0/fpm/pool.d and just one has a weird/bad path that doesn'...
0
votes
1answer
647 views

PHP-FPM 7.1 not accepting config parameters in Docker

I am getting this error on the end of php-fpm container initialization. This one and another with upload_max_filesize as unknown entry. [04-Jun-2018 13:07:59] ERROR: [/usr/local/etc/php-fpm.d/zz-...
0
votes
0answers
297 views

The main reason for random 502 and 504 errors within PHP-FPM and NGINX setup

I am just trying to find the deeper underlying issue of 502 and 504 errors I am getting and the solution. I am running ab -n 10000 -c 1000 http://172.18.0.1/ command to send 10000 requests with a ...
0
votes
1answer
1k views

Apache2 - default php7.2-fpm.conf has to be included in every virtual host?

I'm trying to move from mod_php to php-fpm using mod_proxy_fcgi. After installing the needed modules I tried following the notice I got during install: Not enabling PHP 7.2 FPM by default. ...
0
votes
0answers
126 views

How can I force fastcgi / php-fpm to refuse connections once it reaches it's capacity?

I'm trying to figure out how to refuse / return a HTTP failure response if the php-fpm reaches it's maximum concurrent requests. I've set listen.backlog to 0, however this still seems to 'queue' ...
-1
votes
2answers
5k views

AH01071: Got error 'Primary script unknown

Debian Linux 8.10, Apache version 2.4.10, FPM/FastCGI. I have created a 1st virtual host. After hours, I could get it working. Then I have created another virtual host, with almost the same config =...
3
votes
1answer
534 views

Howto return 502 error code instead of 404 when PHP-FPM fails

My server configuration looks like this: Nginx1 (proxycache) <---------> Nginx2 <-> PHP-FPM When PHP-FPM fails because of the process is down ( errorconnect to unix:/run/php/php7.0-fpm.sock ...
0
votes
0answers
42 views

Http connection sometimes fails to reach (?) server while ICMP and ssh connection works fine

I have quite odd problem which i had for quite a time. I'm using powerful OVH dedicated server and i'm not sure what exactly is a root issue here. I've migrated out of Cloudflare cdn, so this problem ...
0
votes
1answer
115 views

Multiple Projects under single Domain Nginx

I have two projects with the different path locations that need to be configured under a single domain with separate upstream PHP 7.1 and HHVM. I am trying to achieve the goal with nginx alias ...
1
vote
0answers
370 views

How to escape/quote a dollar sign `$` in an env var in a php-fpm pool?

As symfony4 uses dotenv and environment variables for configuration, they are also needed on the server. to pass the variables it is possible to add the following to the pool config: example-pool....
0
votes
1answer
278 views

tell apache virtual hosts to connect to php-fpm sockets using different user/group each

I've been reading the php-fpm documentation and found out that I can give each socket its own user, group and mode, but how can I tell apache (per vhost I mean) to use x user and y group to connect to ...
0
votes
0answers
545 views

cannot access laravel site hosted on centos with nginx

I installed nginx + php7.0 + laravel on a remote server with os centos7. I placed my laravel project inside /usr/share/nginx/html/my-laravel/ and I modified /etc/php-fpm.d/www.conf as below: user = ...