All Questions
643
questions
0
votes
1
answer
38
views
installed homebrew openssl library not found when building MongoDb PHP driver on Mac
Similar to this questioner, due to a 502 Bad Gateway error, following the PHP docs I am attempting to build the PHP Mongo driver from scratch, using a modified ./config step
./configure --with-mongodb-...
0
votes
0
answers
21
views
Track down PHP crash running in lighttpd - no logs
0
Just recently I've started to see seemingly random crashes on a web server that has been stable for quite some time. I think PHP is crashing, but there are no crash logs so I'm only assuming that's ...
0
votes
0
answers
51
views
SELinux silently blocking PHP process listing
I have a system where we use PHP to run some rudimentary health checks on the server. When hitting a status page, it verifies that certain processes are running, and returns an error message if ...
0
votes
0
answers
35
views
php-fpm - How to log `NOTICE`s to stdout, everything else (`E_ALL`) to stderr?
As far as I understood the configuration docs, it is only possible to enable/disable specific log levels:
# ini, E_NOTICE disabled entirely.
error_reporting=E_ALL & ~E_NOTICE
display_errors=stderr
...
0
votes
1
answer
74
views
502 Bad Gateway nginx 1.20.1
I know why is this coming.
But I don't know how to fix it.
I was installing osticket following this article.
https://www.vultr.com/docs/how-to-install-osticket-on-centos-7/
Turns out current osticket ...
2
votes
0
answers
96
views
Docker nginx + php performance
I am using docker-compose to run an nginx container and a PHP container. I have a performance issue, where each 4th or 5th request to a simple PHP script takes several seconds (normally <<1s).
I ...
0
votes
1
answer
95
views
PHP Fatal Error: Cannot open /dev/urandom: No such file or directory when calling session_start() with manually built PHP
Problem
I built PHP8.4 manually in Ubuntu 14.04 since the OS is out of support with no ppa package available. I tested for phpinfo() web page showed correct information while adding session_start() at ...
0
votes
1
answer
78
views
503 Service Unavailable or Empty Response on specific pages over PHP (PHP-FPM) on MacOS
I've got a strange problem here involving some versions of PHP installed in my local machine (MacOS Ventura 13.5).
Certain pages (two at this moment) doesn't load in some versions of PHP. It's loads ...
0
votes
0
answers
45
views
system load spikes causing php-fpm pools to fill and cause micro outages
kind of at my wits end at this point and looking for some help.
2 physical Web servers
CentOS
NGINX
PHP5
php-fpm
2 physical DB Servers
CentOS
NGINX
elastic search
zookeeper
couchbase
as user load ...
0
votes
1
answer
94
views
How does Php-fpm access filesystem, or does it?
Background: My server has become too old to upgrade. Some software will only work on PHP 5.6 and is incompatible with newer versions of PHP. New server hosting packages do not support PHP 5.6 as it ...
0
votes
1
answer
197
views
Frequent server downtime and suspicious server hits to access random Pdf files
Our Server hosting PHP web application is facing frequent downtime
Server Information [Nginx, FreeBSD] Web application [PHP 5.6, MYsql 5.7]
I have gone through the Nginx logs and below are my findings
...
0
votes
0
answers
273
views
PHP-FPM unable to find or access status shared memory
I am running a busy magento 2 load balanced web server with 3 back-end PHP-FPM servers and a shared EFS network filesystem on AWS cloud. There are lots of concurrent users and everything works fine ...
0
votes
0
answers
177
views
NGINX + PHP + ASDF: asdf plugin is using PHP 5.6 instead of 7.4
Goal: I need to load a PHP website (7.4) running NGINX using ASDF plugin.
(Mac OS, M2 processor, NGINX and ASDF installed)
issue:
when I load the website via nginx I get this:
Fatal error: Composer ...
0
votes
1
answer
850
views
How is php-fpm socket folder ({/var,}/run/php-fpm) created on Linux?
I am setting up multiple php versions on CentOS7 (native and from remi repos). As installed, the native php-fpm ( is setup on a unix socket, while the (remi) php74-php-fpm would listen on a TCP socket....
1
vote
1
answer
122
views
Find what paths are required for open_basedir?
We have a server (running PHP-FPM 7.4 on Apache) that hosts various scripts, frameworks and applications like DokuWiki. It's grown to a pretty complex beast. We would like to apply an open_basedir ...
0
votes
0
answers
93
views
php.ini file setting being ignored - tring to change upload_max_filesize
Running php8.2 with fpm - I have rebooted server, I have restarted both php8.2-fpm and apache2. I am 100% certain I've changed the correct php.ini file - infact I have changed all 3, apache2, cli and ...
0
votes
0
answers
36
views
PHP 7.4 FPM under Nginx serves wrong class from cache
We have a Linux environment serving a few different applications, all written in PHP 7.4. They are served out of a single Nginx web server using virtual hosts, and are all using FPM.
In our code we ...
1
vote
1
answer
194
views
PHP-FPM static max_children amount doesn't seem to matter much during stress tests
I've been stress testing PHP-FPM set up as static using wrk, with NGINX running on Ubuntu Server 22.04 for the past few days, writing down results for every scenario. When I look at them, it seems to ...
0
votes
0
answers
57
views
php files serving blank pages except for the login page on nginx
I have a project that has the root directory ed_v001 and all the includes and settings are in a directory ed_v001/includes.
When i open it in a browser it displays the login page properly but when you ...
0
votes
0
answers
308
views
Cannot start the php-fpm service in Alma 9
I've compiled php 8.2.3 on Alma Linux 9 but fails php-fpm fails to start.
I was previously using Centos 7 with a slightly older php version and didn't have any issues.
The php-fpm conf file is also ...
1
vote
1
answer
2k
views
Nginx returning 404 on new installation
On Linux Mint 20.3 I had working setup for my local development of website:
server {
listen 80;
listen [::]:80;
server_name cbp.local;
root /home/gacek/html/cbp/public;
index ...
0
votes
0
answers
206
views
Poor server performance on Linux Ubuntu 20.04 with PHP-FPM, MySQL, and Redis Server installed
My client’s server has recently started having performance issues. The single website hosted on the server loads very slowly. It is built with WordPress using a custom theme. There are a minimum ...
1
vote
0
answers
143
views
Nginx - Server dead when received many requests
we have a large Woocommerce website hosted on Google VM servers (E2 4vCPU + 32 GB RAM + 100 GB SSD Storage), recently we created a mobile application using flutter and WordPress -Woocommerce- API, but ...
0
votes
1
answer
236
views
Sudden spike in PHP-FPM process CPU usage. How to track down?
I have a magento2 store(with 10609 products) running on an ec2 instance(ubuntu 20.04, 16core and 32GB ram). It is a shared server with staging and live on the same instance.
A few days ago, I got an ...
1
vote
2
answers
5k
views
Configuring PHP-FPM in Apache
I installed Apache/2.4.54, PHP72-FPM, PHP74-FPM and some other versions of PHP-FPM on Arch Linux.
Apparently there is some misconfiguration in httpd.conf, PHP can`t interpret anything and browser ...
0
votes
1
answer
128
views
Apache not serving local hosts
I have set up an Apache Server on an a VMWare hosted Linux Mint 21 Server, I have followed the instructions at this blog to run multiple PHP versions (7.4 and 8.1).
Apache is running fine and serving ...
0
votes
1
answer
1k
views
PHP8.1 FPM Crashes everyday after 12AM
From the last two to three days I noticed that my PHP8.1-FPM process crashes after around 12:00 AM-12:30 AM at night.
My server has highest traffic in morning and lowest in night. But FPM process runs ...
0
votes
2
answers
692
views
After setting up Apache it's not serving PHP files, but showing the contents of the files instead
The error I got is in this url:
url in browser:
http://localhost/
error in browser:
https://justpaste.it/d82bd
What am I missing here?
I copied the file ipconfig.php (given below) from ipconfig.php....
0
votes
1
answer
303
views
Error 502, phpinfo() directing to 7.4 when 8.1 is installed (File not found)
I'm setting up a web server. I have a freshly installed Ubuntu 22.04, Nginx (welcome page works), and php-fpm which installed php8.1 and php-fpm8.1.
To test PHP, I created a /var/www//info.php which ...
0
votes
0
answers
143
views
Php mail transmission error using postfix
I need your help
I am using AWS and ubuntu os 20.04.
The web server uses nginx and uses php mail
I installed php 7.3 pfm.
I used postfix for mail function and connected to SMTP. It's not Google, it's ...
1
vote
1
answer
286
views
keydb active-replica multi-master php session storage
I'm looking to use keydb/redis for php session storage in a HA setup. Currently, I have two keydb instances running with the following config:
Instance 1 (192.168.2.10)
requirepass pass123
masterauth ...
-1
votes
1
answer
575
views
Deployment PHP with OpCache
How do you do deployment PHP applications with enabled OpCache? My situation:
I have web server with PHP 7.4 and enabled OpCache.
Server is common virtual 4vCPU + 8GB RAM.
I use tool Deployer - ...
1
vote
1
answer
3k
views
CentOS 7 - upgrade PHP version from 7.2 to 8
CentOS 7
Nginx
Current websites run on PHP 7.2
PHP -v says
```# php -v
PHP 8.0.25 (cli) (built: Oct 25 2022 09:42:31) ( NTS gcc x86_64 )
Copyright (c) The PHP Group```
But phpinfo() in the nginx ...
0
votes
0
answers
133
views
how to stop nginx 302 error
I have a site with Ubuntu 20.04, php 8.1, and nginx 1.23.1. If I restart nginx and php-fpm I can login, browse the site, and everything works. If I wait a certain amount of time with no activity on ...
0
votes
1
answer
690
views
PHP-FPM not killing idle processes
I have a low traffic site with prestashop and set up php-fpm 7.4 as ondemand to not eat up all the resources since most of the time there isn't any high traffic, config is as follows:
pm = ondemand
pm....
0
votes
2
answers
462
views
Issues with Imagick / PHP / Windows
I'm setting up a project on a Windows server and having an issue with ImageMagick. I'm from a Linux background and struggling to get it working.
I have downloaded from http://pecl.php.net/package/...
1
vote
1
answer
259
views
Apache2 stuck after 8-12 days uptime. No errors. Stuck in null loop and Recv-Q
I have some fresh web servers with ubuntu 22 LTS runnings apache2 and php-fpm with mpm_event.
All of them behave the same. After 8-12 days of apache uptime. It suddenly stops recieving requests untill ...
0
votes
1
answer
662
views
Nginx & multiple php-fpm version
I try to serve several sites based on different versions of PHP with Nginx & Ubuntu 20.04).
So I installed php-fpm versions 5.6 and 7.4 and configured Nginx like this:
server {
root /var/www;
...
1
vote
0
answers
197
views
How to create multiple pools on LEMP Stack, PHP 8.1?
I need to optimize my web app performance, with that in mind I created two PHP-FPM pools for frontend and backend and their respective users. Both pools are listening to different sockets on /etc/php/...
1
vote
1
answer
823
views
Running different PHP CLI version depending on working path
I set up PHP-FPM to have different versions of PHP for different folders. This was necessary due to legacy code and was achieved using the apache's .htaccess.
My question is: does anyone have a simple ...
1
vote
0
answers
564
views
nginx 404 not found in subfolder
I installed a php script in /files/ subfolder on Nginx but when I access the page, it's not working. Just showing 404 not found.
I added this in the config but not working.
location ^~ /files {
if (!...
0
votes
1
answer
2k
views
PHP FPM cycles causing huge RAM consumption
A couple of ubuntu servers, using php8.0 / php8.1, with NGINX as a webserver, causing the problem, that my memory is filling up - based on the incoming traffic (req/s), so i have to restart the fpm ...
0
votes
0
answers
212
views
New server Apache 2.4 + PHP responds very slowly
a customer asked to migrate their current server with plesk to a HA infrastructure.
I've created the structure with haproxy and apache 2.4, but i can see many requests take a looooong time (some of ...
0
votes
1
answer
2k
views
WordPress with Nginx + PHP-FPM sometimes slow where slowlog pointing to wp-config.php (PHP 8.1)
I have a recent WordPress 6 installation with MariaDB and PHP 8 FPM running on Docker. Sometimes, request on the frontend have a slow response time on the main HTML document. In this example, one of ...
0
votes
1
answer
2k
views
nginx php file auto download instead execution on http and 404 Not Found on https
problem 1 : i trying to access my site under ip local address using http, everytime i access that, it will download php file meaning not execute.
problem 2: i trying access my site under my domain ...
0
votes
1
answer
2k
views
How to install mcrypt for PHP 7.4 on Aws Linux 2?
I'm trying to install mcrypt with
yum install php-mcrypt
but run into this dependency error:
Error: Package: php-mcrypt-5.4.16-9.el7.x86_64 (epel)
Requires: php(api) = 20100412-64
installed: php-...
0
votes
3
answers
3k
views
Performance tuning PHP-FPM: How to tune the number of child processes
pm = dynamic
pm.max_children = 20
pm.start_servers = 10
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.max_requests = 1000
Assume using above configuration. Is it possible to know the following?...
0
votes
0
answers
206
views
brotli on apache with proxy_fcgi for PHP-FPM is not used
I'm running an apache 2.4.54 with broti enabled.
brotli configuration as seen below and loaded before default deflate configuration.
$ cat /etc/apache2/mods-available/brotli.conf
<IfModule ...
0
votes
3
answers
535
views
Debian: how to put two versions of libcurl on one system?
I'm trying to migrate two web apps on single server(debian10), both require different versions of php, and both require cURL extensions to work properly.
php5.6-curl uses libcurl v3
php8.1-curl uses ...
1
vote
1
answer
4k
views
Ubuntu 22.04 php8.1-fpm wifth Apache - 403 Forbidden You don't have permission to access this resource
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 ...