Questions tagged [fpm]
FastCGI Process Manager - an alternative PHP FastCGI implementation with some additional features
446
questions
0
votes
0
answers
10
views
Can I load different php extensions for each virtual host? [Apache2, php-fpm]
I want load different php extensions for each virtual host on my apache2 server. I don't now how can I do it :/
I load php extensions in php.ini file for example extension=/etc/extensions/suhosin.io
I ...
0
votes
0
answers
26
views
Show full HTTP request URI host name in PHP-FPM status page
My problem is that request URI in the PHP-FPM status page does not show the full request host, and there are multiple domains used on the server, so just showing the path to something is entirely ...
0
votes
0
answers
20
views
How do I show a banner on html website pages from the server side [closed]
I would like to add a top and footer html code that contains content to 450 pages in 22 directories. No Js files included to them.
My environment:
Apache2, with php 7.4 fpm.
Ubuntu server.
0
votes
1
answer
38
views
+50
Truncated PHP-FPM / NGINX log lines
I have a lot of lines in my PHP-FPM / NGINX logs that are truncated to 2048 bytes like this:
2022/05/15 16:06:16 [error] 899#899: *29892 FastCGI sent in stderr: "com/wordpress/wp-includes/class-...
0
votes
0
answers
15
views
Random HTTP/1.1 502 Bad Gateway in PHP REST API
I have written a REST API in PHP using slim micro framework.
Hosted on Apache (Event MPM) + PHP8.0-FPM on 2-vCPU and 4 GiB RAM and 10Gbps N/w bandwidth behind LoadBalancer.
Issue:
The test program is ...
1
vote
1
answer
38
views
Wordpress error 404 in migration from Apache to Nginx
I have a working WordPress installation on an Apache server and wanted to migrate to an NGINX server on a VPS. I've copied all the files, set up the MSQL connection, etc. and everything seems to work ...
0
votes
0
answers
21
views
Settings ServerName and ServerAdmin in apache2.conf are not shown in PHP-Variables
I was edit the apache2.conf and insert this Lines:
# Global configuration
#
ServerName server-16.******.de
ServerAdmin max.mustermann@******.de
But this values i can't see in the php variables if i ...
0
votes
0
answers
7
views
Ubuntu 22.04 php8.1-fpm wifth Apache - 403 Forbidden You don't have permission to access this resource [migrated]
I installed php8.1-fpm on Ubuntu 22.04. In principle, I set everything up, but still "403 Forbidden
You do not have permission to access this resource "error message is displayed. The system ...
1
vote
1
answer
43
views
Custom 404 page not being displayed in Apache + PHP-FPM
Context: Apache + PHP-FPM. Migrated a website to a new server. 404s stopped working. Instead of redirecting to a custom page, 404 errors now show the text "File not found."
Expectations: ...
0
votes
1
answer
45
views
Cannot find php-fpm.conf
I use php-fastcgi via nginx on Ubuntu 21.10, and I want to set the log_limit php-fpm directive to 8000 for my PHP logs not to be truncated, but I can't find php-fpm.conf anywhere.
The closest file I ...
2
votes
1
answer
83
views
php-fpm request hangs after producing output and PHP finishes
Instana trace of the problem:
The problem: randomly, some requests take an extra 20 to 60s to finish compared to normal.
Manually running CURL shows the following behaviour:
curl example.com/api
2 ...
0
votes
1
answer
40
views
Error 502 Bad Gateway while my CPU and RAM are at 50%
For a while, my server has been returning 502 Bad Gateway errors randomly during the day. Sometimes we have the same traffic and everything is fine, other times it causes 502 errors. I have a web ...
0
votes
1
answer
73
views
Does it make sense to run more PHP-FPM children than number of CPU cores?
Assuming that I have a CPU with 4 cores and 4 threads, does it make sense to run e.g. 8 PHP-FPM workers by setting pm.max_children = 8 option? As far as I'm concerned, CPU with 4 threads can only run ...
0
votes
0
answers
11
views
PHP gd-extension for php-fpm [duplicate]
I am new to php-fpm
We are using PHP with Apache 2.4. After switching from php7_module to proxy_fcgi_module the gd extension is not found anymore. How can I make sure that it is used?
Problem for ...
1
vote
0
answers
58
views
Nginx returns multiple 302 in fractions of a second headers before sending actual content with 200 response
I am stumped by this. We have setup nginx + reverse proxy with PHP as fpm, and every response to request looks something like this
>>> https://some.url/some-req/c-378
> -------------------...
0
votes
0
answers
37
views
PHP execution stops after closing browser tab
My site runs on nginx and PHP7.4 fpm. I have coded a backend script that can be called from the browser. For debug purpose I put quite a few error_log statements in the code.
I found that if I do any ...
1
vote
0
answers
79
views
Proper Usage of Kubernetes Probes
TL;DR is the last paragraph, but the rest is here for context if that's not clear enough.
I have a K8s pod running a PHP application. It's split up into an FPM container, and an Nginx container. The ...
0
votes
1
answer
32
views
502 Bad Gateway Error In Nginx using Phalcon and jQuery on submit
I'm having some trouble resolving a 502 error on an NGINX server using the Phalcon 4.0.x Framework. Specifically on forms that send Ajax data to the PHP controller. These do not seems to arrive, but ...
1
vote
3
answers
127
views
Cannot execute npm update when using a specific docker user
I have created a php fpm containers which is associated to the host user, in this way I doesn't have any issues with the file generated within the docker container (eg: when using php artisan make:...
0
votes
0
answers
106
views
The CSRF token is invalid. Please try to resubmit the form. Symfony 4 with php-fpm7.4
When I submit a form I get the following error:
"The CSRF token is invalid. Please try to resubmit the form."
It does not always happen, sometimes it is sent correctly, but no type of error ...
0
votes
0
answers
36
views
In PHP-FPM which value of php_admin_value[memory_limit] wins when defined in multiple config files
Im using the default php-fpm image php:7.4.28-fpm-buster and mount 2 config files into it. if there are multiple configurations of php_admin_value[memory_limit] in multiple config files inside php-fpm....
1
vote
1
answer
96
views
I get FastCGI "Primary script unknown" error in a NGINX / PHP-FPM containers situation
Context
I've got these two docker containers connected to a network:
php:8-fpm-alpine with my web app, exposing port 9000.
nginx:alpine serving the app.
Both containers have access to a local ...
1
vote
1
answer
93
views
PHP Error "Unknown: failed to open stream... in Unknown on line 0..." when editing php files
I get a strange php error:
2022-03-14 10:52:19: (mod_fastcgi.c.421) FastCGI-stderr: PHP message:
PHP Warning: Unknown: failed to open stream:
No such file or directory in Unknown on line 0
PHP ...
0
votes
1
answer
162
views
Why php-fpm is listening on port 9000?
➜ ~ sudo lsof -i :9000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php-fpm 23153 root 8u IPv4 0xbdb928c0ec095c13 0t0 TCP localhost:cslistener (LISTEN)
php-fpm ...
2
votes
0
answers
458
views
Configure nextcloud-fpm docker-compose with bare metal nginx
I'm trying to install Nextcloud on my server.
The nginx service is installed directly on bare metal (Ubuntu)
I starting from the docker-compose found at https://github.com/nextcloud/docker/tree/...
0
votes
0
answers
288
views
Nginx Upstream prematurely closed FastCGI stdout while reading response header from upstream
I am aware that there are many similar questions posted on stackoverflow, I have been through them but it still doesn't resolve my issue. Please read on before marking it as a similar question.
I have ...
1
vote
0
answers
51
views
Is it possible to run php-fpm with swoole?
Online search is saying php-fpm vs swoole, that swoole replaces the need for it. But I use php-fpm so that I can control which php version each directory uses via a handler. One of the php versions I'...
-1
votes
1
answer
170
views
Use local Apache to access php-fpm on docker container
I have a matomo container running with php-fpm
# docker-compose.yml
version: "3"
services:
app:
container_name: matomo
image: matomo:fpm-alpine
restart: unless-stopped
...
0
votes
0
answers
51
views
php-fpm 7.4 AND 8.1 must be running?
I just upgraded from php7.4 to php7.4-fpm on my apache to enable HTTP/2.
By running the commands to install the necessary packages. All the php8.1-fpm packages were installed too.
And now both ...
0
votes
0
answers
73
views
PHP Log includes WARNING, NOTICE, and Fatal error on same line
To test out my php error logging, I threw a random throw line into my index.php.
throw new ErrorException($message, 0, $severity, $filename, $lineno);
I literally just wanted to get some output into ...
-1
votes
1
answer
37
views
Must load PHP page twice to load session file data into an array
I am running the PHP:FPM container on Docker. I start a session, create a session ID, and then use print_r to display the session data.
<?php
session_start();
$_SESSION['id'] = session_id();
...
1
vote
1
answer
34
views
What would prevent php-fpm (8.0.16) from being able to write to an NFS mounted filesystem?
I have a php-fpm (8.0.16) instance that cannot write files to an NFS share. I am using a simple php script for testing:
<?php
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
$fp =...
0
votes
0
answers
99
views
supervisor , php7.4-fpm entered RUNNING state
I have configured supervisor with php7.4-fpm and I got these logs , it always restart
2022-02-06T10:23:08.501156489Z 2022-02-06 10:23:08,500 INFO success: php7.4-fpm entered
RUNNING state, process ...
0
votes
1
answer
191
views
Permissions for Document Files in Kubernetes Pod, with Separate Nginx and FPM Containers
Given a pod running an Nginx container, and a PHP-FPM container, what would be the best practice for the applications document permissions?
At the moment I have a volume shared between the containers ...
0
votes
0
answers
56
views
PHP-FPM - Fails for GET request larger than 16k (AH02536: couldn't encode envvar 'QUERY_STRING' in 16384 bytes)
An application I'm working on requires a lot of parameters be passed for specific responses. When the requests are larger than 16kb (16384 to be exact) PHP-FPM fails to parse the parameters to pass to ...
0
votes
0
answers
25
views
php7.2-fpm restart is not working even after adding this in the deploy file of capistrano
I have added the php7.2-fpm restart script in capistrano deploy file, but still its not restarting and everytime the code is pushed site is going down and I have to ssh and run 'sudo service php7.2-...
0
votes
0
answers
576
views
connect() to unix:/var/run/php/php7.1-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream error on high traffic
From a few days ago, there is a lot of traffic at a certain time.
The time is 22:00, 23:00, 00:00.
The server is slow down for about 10 min or response with error Too many connections.
At first, we ...
0
votes
1
answer
281
views
Cloud run fails to serve complete file - client_disconnected_after_partial_response
We have problem in our PHP application that runs in GCP Cloud run.
Environment: PHP 8 (nginx php-fpm) in docker - official image "php:8.1-fpm".
There are certain files that are failed to be ...
0
votes
1
answer
45
views
Setting nginx and apache for whm panel
(Sorry for my english, I use translator)
I have a MyBB forum with good attendance, Server: Centos 7, Whm + cpanel, Apache
Sites open for a long time, we decided to go nginx
I installed use one button ...
1
vote
0
answers
50
views
Why pdo_informix is available with php-cli but not with php-fpm?
I try to use pdo_informix in a php project, so i compiled the pdo_informix.so file (i'm on mac OS), when i try a phpinfo in a php page served by php-cli i've got a lot of results for the search "...
0
votes
0
answers
19
views
SOAP - Entity Too Large (without nginx)
I'm trying to send a request to an external SOAP api. When my request body is big, I get this error Entity Too Large.
In my app server (where it has nginx), I can add this chunk and it resolves the ...
0
votes
1
answer
121
views
Nginx return 404 when executing script
I have the php script in en /var/www/myproyect/public/scripts/myscript.php
I'm using php 7.4 with nginx and php-fpm
The file exists, if I open a txt it opens it without problem,
but when it is a .php ...
1
vote
2
answers
193
views
Nginx and PHP-FPM deployed on EFS - Improve performance
I am running an application in the EKS cluster and I have nginx pods and applications pods (php5.6-fpm, laravel framework).
Application files are on EFS, which is mounted to the EKS cluster and to the ...
0
votes
1
answer
504
views
AH00894: declining URL fcgi
I'm trying to set up a server that parses .HTML file for PHP.
Operating System: Amazon Linux 2
PHP version: 8.0.8
Apache version: 2.4.51
/etc/httpd/conf.d/php.conf
#
# Allow php to handle Multiviews
#...
1
vote
1
answer
104
views
Php-fpm docker container eventually makes web site show all post data on the web pages
We recently converted our old site into a dockerized version with a single Nginx Container and a Php-fpm Container.
We have various versions of php so had one for php5 and another for php7.
After a ...
0
votes
1
answer
199
views
Nginx with FPM and Laravel
I have a docker image with several containers (nginx, api, react, ...) and two server blocks inside nginx.conf which gives me option to access via domain.com and api.domain.com.
Everything works so ...
0
votes
0
answers
130
views
php fpm REALLY SLOW, and keep spawning children even there are many idle children
I am asking for help for my production applications. Any suggestions will be appreciated, Thanks ahead!!
I am using php7.4-fpm for back-end api requests.
At peak time, there will be 100-300 requests/...
1
vote
1
answer
399
views
502 Bad Gateway - Google Cloud Run with php-fpm (socket not found) on cold starts
I am dealing with an issue where the first request towards my Google Cloud Run container results in a 502 Bad Gateway error. The following can be seen in the logs:
[crit] 23#23: *3 connect() to unix:/...
2
votes
0
answers
80
views
Downloading files dynamically using PHP is slow
I have a PHP script like this running on PHP-fpm 7.3:
<?php
$file = './French-Stories-Martine.zip';
if (headers_sent()) {
echo 'HTTP header already sent';
} else {
if (!is_file($file)) {
...
0
votes
1
answer
33
views
PHP API - Nginx giving me invalid data type header
I have some experience with Apache but now I switched to Nginx to learn something new. Finally made it to use basic PHP and Let's encrypt on my domain. (yes I'm happy to try new things)
I'd like have ...