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,193 questions
1
vote
2
answers
123
views
Apache error log not showing error details for php files not found
I'm running Apache 2.4.62 on AlmaLinux with php-fpm 8.3.26, Zend Engine v4.3.26
I migrated this server from CentOS and I'm noticing the error logs for the web server, when an invalid php file is ...
-1
votes
0
answers
31
views
PHP-fpm and Nginx for handle big files in PHP [closed]
I am using Debian, nginx and php8.4-fpm in the newest versions.
I have to analyse a large file. The size is about 100 MB. The original file is on another server, where I have no direct access. So I ...
0
votes
1
answer
122
views
Forward Original Client IP over Apache Reverse Proxy (Docker Container 1) to PHP-FPM (Docker Container 2)
I've setup an application with two docker containers, one is apache (httpd:2.4) and one is php (php-fpm:8.2). The flow of an incoming request is customers' device > apache > php-fpm, and I need ...
0
votes
0
answers
60
views
Cannot get gettext to work in php-fpm Docker Container
I've checked on the questions regarding this issue, they did not help (see what I tried below).
I setup a multi-container app on docker with a httpd:2.4 (apache) container acting as reverse-proxy ...
3
votes
1
answer
73
views
Per-domain error log for PHP-FPM and Apache
I recently moved a PHP application to a new server. I have multiple virtual hosts, and want to keep separate error logs for each domain. For this reason, on the old server I used the ErrorLog ...
0
votes
0
answers
41
views
PHP.ini setting not in effect with FPM
I just switched my Nextcloud Apache2 install to use php8.3-fpm (from php8.2 apache module).
Everything works, except NC is giving me the warning that my opcache is nearly full. I can also that the ...
1
vote
0
answers
125
views
is it necessary to recreate the image to have the right level of log?
I’m running php-fpm and nginx in the same image, both managed by supervisord.conf, and deploying that image to a Kubernetes cluster.
Our team wants php-fpm—and especially nginx—logs to go to stdout ...
0
votes
1
answer
209
views
PHP-fpm (v 8.3) not using sqlsrv or pdo_sqlsrv on Ubuntu 24.04
My VM running Ubuntu 24.04 is giving an error that it cannot find the driver for SQLServer (aka MSSQL-Server aka sqlsrv). Sure enough, a page with phpinfo(); shows no sqlsrv or pdo_sqlsrv.
Here were ...
0
votes
0
answers
105
views
How to change PHP's $_SERVER['SERVER_PORT'] on Apache, behind an Nginx reverse proxy?
I set up Nginx and Apache2 on the same machine with Nginx functioning as a reverse proxy. Nginx uses SSL (at least for 1 of 2 domains: example.com), Apache is used for handling PHP using FPM/FastCGI. ...
0
votes
1
answer
45
views
Apache/2.4.62 server only works on localhost domain, loads "It works!" for anything else
Im going crazy here, I dont know what to do anymore
I have this Apache/2.4.62 server running on an amazonlinux:2023 container, inside a docker. Its running a PHP application, using PHP-FPM
It works ...
0
votes
0
answers
49
views
High Private Bandwidth & CPU Load in 3-5 hours interval
I'm running a Laravel application with the following architecture:
Backend server: Handles queues, jobs, emails, Horizon, cron jobs, and admin panel. Specs: 2 vCPU / 4 GB RAM.
Frontend server: ...
1
vote
1
answer
102
views
16GB Linode, Ubuntu 22.04.5 LTS, PHP8.3FPM - Configuration Recommendations
We're running about a dozen WordPress sites on this server, and performance is really slow, with 'Service Unavailable' messages popping up from time to time. Restarting Apache and PHPFPM solves that ...
1
vote
1
answer
194
views
Get php-fpm status when php-fpm's child processes are full
So normally you can get PHP FPM's status by querying the /fpmstatus endpoint (or whatever is configured). This displays info about FPM's status, threads, etc. FPM has a maximum number of child ...
0
votes
1
answer
105
views
PHP OPcache nearly immediately full after restart
While checking my server I noticed that PHP’s OPcache is completely full, despite having enough scripts stored to fill the space.
opcache_get_status returns this:
array(8) {
["opcache_enabled&...
0
votes
1
answer
539
views
WordPress + NGINX + PHP-FPM fastcgi + Memcached is extremely slow
I'm at a loss here and would love to get some pointers. I'm running AlmaLinux 9.5 with NGINX with fastcgi to PHP-FPM 8.3. WordPress is extremely slow when using more heavy plugins such as WooCommerce ...
0
votes
1
answer
85
views
Can't point nginx to correct PHP app directory
I am trying to setup a simple development endpoint for a php backend/api implementation with nginx and fastcgi. Since I have another project also running in my server on port 80, I have decided to ...
0
votes
2
answers
104
views
Get name of script from ps / in nmon
I am having a memory issue with a PHP application on a linux system and am trying to find out what specific PHP script is consuming the memory
Basically, PHP-FPM over the space of around 4 hours, goes ...
0
votes
1
answer
193
views
Docker on Synology: httpd proxy to php-fpm, php always reports 404
I'm running Apache 2.4 in a Docker container on Synology DSM 7.2.2-72806 Update 3, and I'm proxying .php requests to a separate container running the official php:8.2-fpm image. Both containers are ...
0
votes
0
answers
40
views
Site/PHP Operations goes to a Hault after a load spike
So I have been trying to go through an issue, where after a certain spike in PHP operation which exceeds in Either IOPS, CPU/RAM threshold - it brings not only the site to a complete stalemate but all ...
0
votes
1
answer
68
views
Random periods with failing communication between Nginx and PHP-FPM
Hello Serverfault Community,
we are experiencing a very strange problem. Since four weeks now we are encoutering phases of 1-2 hours duration where our Nginx containers can no longer communicate with ...
0
votes
0
answers
169
views
PHP FPM and Apache memory leak on Ubuntu 22 VM
I manage a high-traffic(1200 request per min), large-scale WordPress website with a dedicated MySQL server. The server has 32GB RAM and a 16-core CPU ubuntu 22.04 LTS.
I've configured Apache and PHP-...
0
votes
0
answers
32
views
Pass mod_proxy parameters when using SetHandler for php-fpm
I've configured Apache to serve PHP via php-fpm through a unix socket with the SetHandler directive:
<FilesMatch ".+\.php$">
SetHandler "proxy:unix:/run/php/php-fpm.sock|fcgi:/...
0
votes
0
answers
69
views
Imagick PHP Extension causing "Nginx failed (104: Connection reset by peer) while reading response header from upstream, client: request #726"
I am running a LEMP server on a Raspberry Pi 4 (aarch64) running Ubuntu Server 22.04. I just built ImageMagick from source and am currently running [ImageMagick 7.1.1-45 Q16-HDRI aarch64][1]. After ...
0
votes
1
answer
83
views
Looking a final answer abt setup of diff PHP error log files with PHP-FPM
Environment - RHEL 9.5, Apache 2.4.62 with server MPM = event, PHP 7.4.33 with PHP-FPM
Preambule - previously we could use such the settings in every .HTACCESS file to setup for every virtual host the ...
0
votes
1
answer
319
views
Where are PHP8 syntax error logged?
I installed LEMP with PHP8 on Ubuntu 24.04 and was able to host a WordPress website.
The only thing I can't figure out is where PHP errors are logged.
For example I created a PHP page with an error:
&...
0
votes
1
answer
2k
views
Nginx upstream timed out (110: Unknown error)
I own a game server (counter strike 2) in the middle east . I'm trying to set up a web panel for it which is hosted in Europe on an ubuntu 22 VPS . This website has a tool that allows remote commands ...
-1
votes
2
answers
583
views
Nginx "File not found." error
I have already read all similar topics but wasn't able to fix the issue so I posted here :
I can run a PHP file on SSH Terminal successfully :
root@skins:~/public1# php8.3 /root/public1/public/index....
1
vote
0
answers
68
views
How to Move PHP-FPM Worker Processes to User-Specific SystemD Slices
I'm trying to set up resource limits for users using systemd slices. I created a user slice with this script:
#!/bin/bash
user=$1
user_id=$(id -u "$user")
user_slice="user-${user_id}....
0
votes
0
answers
248
views
php-fpm status code 499 (client has closed connection) causes all future php requests to fail and 499 as well
One of my servers keeps having some kind of packet loss issue that occurs randomly. Traffic originating from this problematic server (when there's some kind of weird packet loss issue I haven't ...
0
votes
2
answers
347
views
Syn Flood Attack
this week I'm facing a problem with my web server. I think we are receiving a Syn flood/DDoS attack. But I don't know how to end it.
So first I think I'm under attack because in top command I have a ...
1
vote
1
answer
404
views
nginx autoindex passing php files to php-fpm, but php-fpm can’t find them
edit - see update at end, it's php-fpm (php.ini) doc_root, but how to fix?
Working with nginx version 1.27.2 and php-8.3.14 on openSUSE Tumbleweed. The problem is this. I normally have a number of ...
0
votes
0
answers
25
views
Apache: Serving "core" files between different domains AND unique files to each domain
Server: Ubuntu/Apache
Scenario I have a system that is used by different domains
I would like the "core" files to be used for all domains (to make maintenance easier)
However, each ...
0
votes
0
answers
36
views
openlitespeed server configuration for wordpress has low resource usage even with apache benchmarking tool
I have an openlitespeed server configuration for wordpress site. I am trying to simulate many user behaviour with ab but whatever I do it doesnt go over 1.5gigs of ram or %45 cpu utilization. What ...
1
vote
1
answer
715
views
php-fpm doesn't save error logs for a pool
I'm using php-fpm with Caddy and I cannot make php-fpm log errors. Previously I used nginx and nginx captures and displays php errors in its own logs quite nicely, so I never had an issue, but with ...
0
votes
2
answers
1k
views
Reverse proxy Nginx to a remote php-fpm server with fastcgi
I've got 2 AWS EC2 instances, one of which resides in a public subnet and is configured to act as a NAT instance, and runs Nginx. The other instance resides in a private subnet, but can communicate ...
0
votes
1
answer
307
views
Securly configure apache2 with mpm_event and php-fpm
I am running a small apache2 web server providing different independent PHP web applications, like nextcloud, personal PHP projects, etc. I have several instances of PHP-fpm running (different PHP ...
0
votes
0
answers
100
views
Is FilesMatch better than ProxyPassMatch for FPM in Apache?
I used to use ProxyPassMatch with a socket, worked flawlessly for years...
Recently, I have seen several posts and videos recommending the FilesMatch method, so I tried...
Haven't noticed any ...
0
votes
1
answer
130
views
Bug: `Apache2` with `PHP-FPM` picks the wrong pool
I have configured PHP and Apache so that a separate PHP-FPM pool is created for each user in a multihost system.
The web panel runs in its own pool with different rights.
Administrations-WebPanel
<...
0
votes
0
answers
109
views
www-data can't write in dir, even if write permissions are set
Debian 12
php-fpm 8.2
Apache 2.4
I have permission denied on /home/website/public_html/var/cache when website try to write or rename
The cache dir is owned by www-data and group www-data with chmod ...
0
votes
1
answer
167
views
Nginx alias for single php file returns 404 (other files are ok)
I'm trying to serve a single php file with Nginx 1.22.1. I'm using this kind of approach:
# PHP file alias:
location /netbootassets/fragment.php {
alias /opt/easy_multi_pxe/scripts/fragment.php;
...
1
vote
0
answers
118
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
264
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
130
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&...
-1
votes
1
answer
432
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
761
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
249
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
231
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
1
answer
509
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
73
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
565
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] [...