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.
2,182
questions
0
votes
0
answers
8
views
How to make nginx + php_fpm + cache config file more readable
I have config file like this:
server {
listen 80;
server_name domain.com;
root /var/www/domain.com/;
location ~ .\.php(/|$) {
fastcgi_pass unix:/...
0
votes
0
answers
65
views
Handleproblem with apache2 and PHP-FPM as Unix-Socket
I have been trying to encapsulate the permissions of PHP-FPM with chroot since yesterday.
The current problem is that everything runs under a single PHP-FPM pool, which has the same permissions ...
0
votes
0
answers
25
views
nginx + php-fpm + rdkafka = SIGSEGV (mac m1)
I’m facing a very strange issue that I can’t seem to understand or resolve.
Here’s the setup:
MacOS Sonoma (M1)
Tried different versions and configurations of Nginx
PHP 8.2/8.3/8.4 (the issue occurs ...
0
votes
0
answers
27
views
nginx error php8.3fpm upstream timed out on local server
2024/08/29 02:05:25 [error] 3313#3313: *153 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 194.233.87.73, server: website.ca, request: "GET / ...
1
vote
0
answers
72
views
Understanding php-fpm resources config
I currently have a stack with PHP-FPM and Nginx running on ECS EC2.
After observing some metrics, I noticed that the memory and CPU usage of my stack is low.
However, when I tried reducing my tasks ...
1
vote
0
answers
31
views
PHP-FPM: Processes open but never close nor become idle
We use php-fpm for our website with significant traffic around this time of the year.
Because there are many requests we tend to encounter some slowdown and 504 errors.
Yet we have a fairly solid php-...
0
votes
1
answer
49
views
php74-fpm and nginx "Primary script unknown" only when access status page
When I try to access
domain.com/status/show or
domain.com/status/ping,
I get following error in nginx:
2024/08/24 19:36:11 [error] 7448#0: *13203 FastCGI sent in stderr: "Primary script unknown&...
0
votes
0
answers
60
views
nginx/docker - failed (111: Connection refused) while connecting to upstream
I am trying to deploy a dockerized Laravel application via Portainer. I want the website to be accessible via port 8080
This is my docker-compose.yml file:
version: '3.8'
services:
laravel:
...
-1
votes
1
answer
68
views
Security concerns about these Web Stacks: Docker Caddy Reverse vs Nginx same host
After I got multiple sites on one host hacked at the same time, I started researching some years ago, and I read in some SF question a solution to my problem: PHP-FPM pools
Basically, this was the ...
0
votes
1
answer
145
views
Apache2 + php-fpm + DocumentRoot with spaces = AH01071: Got error 'Primary script unknown'
We're running a server with Ubuntu 20.04.6 LTS with multiple versions of php via ppa:ondrej/php.
A few weeks ago, some of the virtual hosts stopped working (Apache2 fails with "AH01071: Got error ...
0
votes
1
answer
74
views
nginx configuration for subdirectory based php websites on different php-fpm pool
I'm trying to configure my nginx server to host two php websites (with their respective php-fpm pool) on the same domain:
one on the /
and one in the /nextcloud/ subfolder
I want that each website ...
0
votes
0
answers
50
views
SELinux denying DB connections despite being enabled
I need help with SELinux, it will not allow database connections despite being enabled.
I know that SELinux is the issue as turning it off eliminates the connection error I receive: mysqli::...
0
votes
0
answers
80
views
nginx rewrite rules and PHP configuration for multiple Mediawikis
Can anyone help me set up nginx rewrite rules for multiple wikis?
I am running multiple Mediawiki wikis from a common installation, with a separate wiki for each language. E.g.
example.org/wiki/en/
...
0
votes
1
answer
78
views
Nginx + Fastcgi - adding a timeout for a specific route
I have a PHP Symfony application behind nginx/php-fpm - I would like to add a fastcgi timeout, but only for a specific endpoint. Here is what I tried.
server {
listen 80;
server_name _;
...
0
votes
0
answers
62
views
My site's own IP address showing up as an external link
I have kind of a weird problem and I would appreciate it greatly if you could help me. My site's own IP address was listed as an external linking site 1856 times in Google Search Console. I have no ...
0
votes
1
answer
109
views
How to fix Apache PHP rejecting post requests which are over 40MBs
My php Laravel API when put behind apache2 (with ssl) when making a post request which is roughly 40Mbs in size, it gives a 500 internal error with following log
[Wed Jul 10 21:08:51.397912 2024] [...
0
votes
0
answers
88
views
PHP Unable to Read /home Folder
I am having an issue with a PHP script not being able to read a user's /home folder. This is an issue on a server running AlmaLinux 9.4, my other server running CentOS can read the folder. The error ...
1
vote
1
answer
131
views
How to improve TTFB on NGINX?
I have a long TTFB (1.6 sec) and find the reason for this.
My stack is server (nginx + php-fpm) and load balancer on Hetzner and Cloudflare.
Are there too many redirects and therefore the waiting time ...
0
votes
1
answer
142
views
PHP 8.2 FPM + OPcache + multiuser environment + blank page issue (Child exited with code 70)
We are facing a weird issue for months, getting a white page for all websites with multiple errors like below
[02-Jul-2024 11:36:55] WARNING: [pool site1] child 3122781 exited with code 70 after 31....
0
votes
0
answers
44
views
How to install multiple mediawiki wikis with short URLs on Rocky Linux with nginx?
I have a Rocky Linux server using nginx/php-fpm, and I would like to run multiple Mediawiki wikis for multiple sites, with the following configuration:
Installation
Running in a subdirectory that is ...
0
votes
0
answers
121
views
apache mod_php vs php_fpm - huge difference in load time, but only for Wordpress website
I have a Wordpress website, it was set up as nginx proxy apache mod_php.
Load time was over 2.5 seconds, so I tried several ways to speed it up.
Finally I tried php_fpm and voila - the website loaded ...
0
votes
1
answer
72
views
what is the common reasong of nginx not passing request to php
In the application, we start seeing a lot of the 504 requests from Nginx, but in most cases, we see only Nginx log about the fact of 504 due to the 60-second timeout but no logs from the PHP/FPM side. ...
0
votes
0
answers
52
views
My Nginx VPS not serving any website anymore
I have an Ubuntu with nginx and a laravel app (php8.1).
It stopped serving websites after accidentally changing ownership of all folders to root.
I managed to restore cloudpanel and my domain for a ...
0
votes
0
answers
59
views
php7.4-fpm crash or not
I moved from Apache2 to PHP 7.4 FPM + Nginx, it became much better in terms of performance, but the old problem remained, the server can work fine all week, or 2-3 days. But at some point it crashes. ...
0
votes
1
answer
127
views
PHP Unable To Write To Cache Directory
I'm getting the below error on a CentOS 9 Stream server when a request comes in from PHP. It looks like the phpFastCache module can't write to the cache directory.
2024/06/19 10:06:34 [error] 4789#...
1
vote
0
answers
168
views
docker-php-ext-install recently failing in a php7.1-fpm image
Im having some issues recently .. About 3 days ago my installs just docker setup is failing each time im running it ... Its been working perfect before this, unfortauntly due to work, im unable to ...
0
votes
0
answers
86
views
php-fpm: pool domain.com memory leak
using nginx and php7.3-fpm I run into a huge problem.
Using
watch -n 1 "ps -eo rss,cmd --sort=-rss | grep 'php-fpm' | awk '{cmd=\"\"; for(i=2; i<=NF; i++) cmd = cmd \$i \" \&...
0
votes
0
answers
133
views
Nginx + php-fpm "504 Gateway Time-out"
During some long operations that generate many PDF files, the CRM application goes into "504 Gateway Time-out" for ALL people that are using the CRM (remote and local people). I'm always ...
0
votes
1
answer
245
views
Why does php-fpm always have one worker running with ondemand in Kubernetes
We're running a php-fpm container in Kubernetes. This is a test setup, so to preserve resources, php-fpm (8.1) is configured with:
pm = ondemand
pm.max_children = 5
pm.max_requests = 1000
The ...
0
votes
1
answer
206
views
nginx php-fpm redis configuration "socket error on read socket"
my localhost is on ubuntu with nginx + php-fpm 8.1
server {
server_name "~^({[a-z]}2\.)*(?<project>\w+)\.(.*)localhost$";
root /home/fw/public_html;
location ~ \.php$ {
...
0
votes
0
answers
111
views
Intermittent "File not found." nginx php (solved)
When accessing certain paths to a web application I'm working on, I am intermittently getting a "File not found." error displaying in the browser that seems to come and go indiscriminately - ...
0
votes
1
answer
415
views
PHP_FPM extensions not loading in Apache
I'm building out a web server on Rocky Linux 9 with Apache and PHP 8.3. I need the pdo_dblib extension. From the command line via "php -m" and "php-fpm -m", I see that the ...
0
votes
1
answer
117
views
Apache2 restart does't implement PHP changes, server reboot does though
on my Ubuntu 20.04.6 LTS server with Apache/2.4.41 I needed to change
post_max_size
and
upload_max_filesize
for my new PHP 8.3.4 installation
I added phpinfo(); in a file called phpinfo.php
I got the ...
1
vote
0
answers
105
views
What are some potential reasons for a PHP script terminating unexpectedly by php-fpm which trigger the 504 gateway timeout?
What are some potential reasons for intermittent PHP script termination, particularly observed after periods of inactivity or when attempting to log in through a new browser instance? The issue ...
0
votes
0
answers
268
views
Can't make Apache connect to PHP-FPM: (13)Permission denied: AH00957: FCGI: attempt to connect to 127.0.0.1:9000
I'm trying to setup Apache with FastCGI work with PHP-FPM on AlmaLinux 9.3 and I'm stuck with this error. I can't find what I'm missing. This is the error:
[Mon Mar 25 18:12:33.617487 2024] [proxy:...
0
votes
0
answers
167
views
How do I get debug logging out of php_fastcgi in a container?
I am running a container built from this Dockerfile. It's running a basic PHP application. In front of it I have Caddy. A lot of people put nginx in front of PHP. I don't and I won't. So if your ...
0
votes
0
answers
171
views
Cant build php7.0-fpm dockerfile The repository Release file
docker build -t php7-fpm-custom .
build on ubuntu 22.04 minimal
Reading package lists...
W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release ...
0
votes
0
answers
287
views
Apache & PHP-FPM: AH01144: No protocol handler was valid for the URL /index.php (scheme 'unix')
This error occurs despite all the fixes that I Googled.
Apache was loaded next modules:
# /usr/local/apache/bin/apachectl -M | grep proxy
[Thu Mar 14 22:37:35.825542 2024] [core:trace3] [pid 9087:tid ...
1
vote
0
answers
580
views
What causes "Partial results are valid but processing is incomplete" for mod_fcgi in Apache WITHOUT mod_reqtimeout
I am running Apache 2.4 to serve Nextcloud and I occasionally get the error
[proxy_fcgi:error] cloud.my-domain.tld: (70008)Partial results are valid but processing is incomplete: AH01075: Error ...
0
votes
1
answer
284
views
Run PHP-FPM as other user
I have been using a setup that I created for several years on various machines and I am now trying to run it on a Debian 12 server. The setup is similar to a forge and can be found on this URL https://...
1
vote
1
answer
43
views
Apache: Meaning, purpose and semantics of the URI after the pipe symbol within the SetHandler directive?
What is the meaning, purpose and semantics of the fcgi:// URI after the pipe symbol
within the SetHandler directive?
From my understanding of the docs, everything after the scheme part fcgi://
of the ...
0
votes
2
answers
657
views
PHP sock linked to update-alternatives choice?
In my nginx configs, I point to PHP as /var/run/php8.3-fpm.sock.
Because there is a specific version in that path, using update-alternatives does not change the PHP version my websites use.
How do I ...
1
vote
0
answers
54
views
Server forbids access to any URL ending in .php (even nonexistent ones) with "client denied by server configuration", but identical html files are OK
I'm trying to enable some php files on an Apache 2.4 machine that has no other php content. I'm finding that any php URL (even made-up URLs for nonexistent things) results in the error "client ...
0
votes
1
answer
499
views
imagick extension php loaded in command line but not load in httpd
I have installed imagick extension for php by command: pecl install imagick
After that, I restart httpd and restart php-fpm.
I checked imagick loaded in php command line but when use phpinfo() for ...
3
votes
0
answers
455
views
PHP post data lost with Transfer-Encoding: chunked; Apache regression?
I am moving a PHP application from an older CentOS 7 server with Apache 2.4.6 and PHP 7.3.33 (mod_php) to a newer Alma Linux 9 server with Apache 2.4.57 and PHP 8.0.30 (PHP-FPM). This is a back-end ...
0
votes
0
answers
195
views
FROM php:7.4-fpm-alpine app.dockerfile results in fastcgi error when adding sh file to run as an entrypoint
I am using AWS ECS Faragate to generate and deploy docker containers into tasks.
I'm using the docker image FROM php:7.4-fpm-alpine for my app container.
I have been working on a workaround for cron ...
1
vote
1
answer
420
views
Apache: 500 error, PHP fails on just one specific path
I need another pair of eyes to help debug an issue. This will be a long message. I'm going to provide a lot of context because I'm not sure which details might be important.
We have two servers: dev, ...
1
vote
1
answer
170
views
Correct way for creating apparmor hats in separate file
I'm trying to re-enforce the security of my LAMP config
In my configuration, each website consists in :
One Unix account
One MySQL database accessible only from one MySQL account
One VirtualHost ...
0
votes
1
answer
193
views
Internal Server Error on Nextcloud instance migration from Debian 12 to Rocky Linux 9 server
I've done everything by the book, according to the official guide, available here https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating.html
It is not a SELinux issue. I've tried ...
0
votes
0
answers
108
views
Make permanent changes in PHP-FPM's settings
I'm using php-fpm (php 8.2 and 8.3) under Ubuntu 22.4. I want to permanently increase the allowed max size of uploads.
I therefore didn't want to edit the php.ini, which will be reinitialized when ...