All Questions
Tagged with apache-2.4 php-fpm
241
questions
0
votes
1
answer
239
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
66
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 ...
0
votes
0
answers
145
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
180
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
365
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 ...
1
vote
1
answer
36
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 ...
1
vote
0
answers
33
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 ...
2
votes
0
answers
334
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 ...
1
vote
1
answer
279
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, ...
0
votes
1
answer
147
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
178
views
Two Virtual Hosts with to disntinct PHP configurations via PHP-FPM on Ubuntu and Apache
I have to Virtual Hosts on Ubuntu 20.04. One host is test instance and one is production (I know it would be better to have it separate). Now I need to run different php config for test vhost than for ...
0
votes
1
answer
354
views
PHP curl_init(), curl_exec() work from the command line but fail when browsed/accessed from a webserver
The following PHP script (when not anonymized) runs successfully at the commandline. It uses curl_init() and curl_exec() to retrieve JSON-formatted data, converts the result into an associative array, ...
0
votes
0
answers
160
views
Limit php-fpm to a specific sub directory generally handled by apache
I am facing the following legacy setup with php-7.4 and libapache2-mod-php7.4 installed and enabled:
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/html
<...
0
votes
1
answer
299
views
Partial Results Error during File Upload – Seeking Assistance (CentOS 8.8, PHP 8.2, WordPress)
I hope you're doing well. I'm reaching out because I've hit a roadblock with my WordPress website and file uploads. Here's the error message that has been causing me headaches:
[Thu Nov 02 16:55:53....
0
votes
1
answer
419
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
1
answer
545
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
97
views
installation of apache2 + php82-fpm under macOS Ventura seems to keep php files in cache
A macports' installation of apache2 + php82-fpm under macOS Ventura seems to keep php files in cache, even before installing php82-opcache.
I don't know if this is coming from apache2 or php82-fpm, ...
2
votes
2
answers
19k
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
168
views
How to install memcashed on a LAMP stack with PHP FPM?
I have a LAMP stack with PHP FPM and multiple virtual hosts with Wordpress sites on.
I have tried to install memcashed using this tutorial.
In Wordpress sitehealth I get: "You should use a ...
0
votes
1
answer
446
views
Apache 2.4: ProxyPassMatch prevents mod_rewrite?
I try to setup a new development-environment in docker, with:
Bitnami Apache 2.4 - bitnami/apache:2.4
Bitnami PHP 8.0 - bitnami/php-fpm:8.0
Bitnami Mysql 5.7 - bitnami/mysql:5.7
The whole thing is ...
1
vote
0
answers
115
views
Reached pm.max_children, High sockets allocated, No CPU usage
The issue
I have a server that reaches pm.max_children (200) without spike in CPU usage. No network traffic (MB out / MB in) but extremely high number of socket allocated that do not get closed.
CPU: ...
1
vote
1
answer
355
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 ...
1
vote
1
answer
2k
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
379
views
Why are my 2 sites on the same server (randomly?) switching PHP versions with PHP-FPM
My issue is as follows:
1 server running Debian 11 in a virtual machine (though I've tested with 9 and 10 and they both show the same behaviour)
with 2 websites both configured to run with php-fpm &...
0
votes
0
answers
279
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 ...
1
vote
0
answers
867
views
PHP-FPM - Debian <> Apache - 504 Gateway Timeout Error
After switching to PHP-FPM with MPM Event, there are always 504 Gateway Timeout Errors. Apache no longer answers requests. Instead there is a connection timeout. In some cases, requests are answered ...
0
votes
0
answers
260
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 ...
3
votes
1
answer
33k
views
proxy_fcgi:error: The timeout specified has expired: Error dispatching request to : (polling)
my web server reaches the state of being unreachable every 1-2 days until I completely restart the server.
The server is Debian Bullseye with the newest Apache + PHP 7.4. I'm using FPM, because I want ...
0
votes
2
answers
14k
views
Getting 503 with apache proxy_fcgi_module [SOLVED]
I'm using CentOS 9 Stream on a VM, trying to setup my apache server to be able to show php content on the web. The server works fine when its just html, but I'm getting these errors (503 in the ...
0
votes
1
answer
2k
views
Apache not sending headers to PHP over FCGI/PHP-FPM
I have a virtual host configured to process PHP files over Proxy:FCGI, and it works fine, except that PHP is not receiving custom headers and others, like "Origin".
Here my Apache 2.4 ...
5
votes
4
answers
16k
views
PHP scripts suddenly load very slow on Apache
I am testing why sometimes my PHP scripts takes long to load over network (>30sec) on my Apache 2.4 Ubuntu server with PHP-FPM 7.4 using mpm_event. The server was working normally in the past few ...
1
vote
0
answers
433
views
configuring apache to not serve php files statically unless php-fpm is configured
I have a an apache 2.4 configuration section that I use to handle the rare situation where a misconfigured apache box could serve php files as static plain text, and potentially give up credentials ...
0
votes
1
answer
944
views
Why does apache work only with mpm-prefork?
I have 2 websites of wordpress on LAMP (Linux, Apache2, MariaDB and PHP-FPM).
If I disable mpm-prefork and enable either mpm-worker or mpm-event, apache shows only a blank page (I have a few wordpress ...
1
vote
0
answers
608
views
Apache setting "SetEnv PHP_ADMIN_VALUE open_basedir=path" is not restricted to its virtual host config
I have an Apache web server installed on my Ubuntu server 18.04 with many virtual hosts configured, I use different open_basedir for each vhost, recently I had to change normal php7.2 to php-fpm to be ...
1
vote
1
answer
3k
views
php7.4-fpm / Apache2: Getting PHP FPM Status Page To Load?
I'm trying to get my php7.4-fpm status page to show up on an URL. I'm running an Apache 2.4.41 server. Instead, I am getting a "File Not Found." error.
Here is what I've done. First I edited:...
0
votes
0
answers
2k
views
Large tmp file transfer hangs in nginx php-fpm proxy
We have a server that's running a WordPress site with a serverpilot-installed nginx stack on Ubuntu 20 LTS.
Very large uploads appear to get stuck in the handoff between the nginx proxy and PHP, and I ...
0
votes
0
answers
2k
views
How to correctly enable Imagick in PHP-FPM on Ubuntu 20.04 and Apache
I have PHP-FPM setup on my Ubuntu 20.04 server and have installed Imagick, but I cannot get it to be recognized by PHP 7.4. I tried following these steps, but step one returns the following error in ...
1
vote
1
answer
5k
views
PHP can't write to /tmp folder anymore after Apache update
Linux dist: Ubuntu 18.04.5 LTS
Server version: Apache/2.4.29
PHP Version: 7.4.20 with PHP-FPM
Recently this server did an automatic upgrade of Apache and ever since PHP can't write to /tmp breaking ...
1
vote
0
answers
1k
views
slow php (php-fpm) (long apache php waiting)
I have an apache with PHP-FPM module, 8 CPU cores. Average CPU all together load is around 75% CPU mainly due MySQL see the screen.
It is actually little bit smaller load now than usually.
But ...
0
votes
1
answer
584
views
Should I change the default folder for uploads?
PHP 7 uses the default system folder (/tmp) to store uploaded files. PHP allows you to change the settings and change the upload destination directory. Some sites indicate to change this folder to ...
0
votes
1
answer
1k
views
Apache: phpmyadmin on sub-domain "503 Service Unavailable": php7.4-fpm
I'm having a tough time trying to fix a major problem getting phpmyadmin working again (it used to work on ubuntu 16.04). I upgraded Ubuntu 16.04 to 20.04 yesterday and got the following versions of ...
1
vote
0
answers
580
views
PHP on VirtualHost not working but works on default site
I have a apache Server version: Apache/2.4.46 on Amazon Linux 2. PHP is working well on port 443. I added another virtualhost on port 81. PHP does not work on this port.
Config:
Listen 80
<...
0
votes
1
answer
1k
views
Use multiple PHP-FPM versions using FastCGI on same Debian/Apache server
I would like to use multiple PHP-FPM versions using FastCGI on same Debian/Apache server.
Using:
Debian v9.12,
Apache v2.4.25,
php5.6-fpm,
php7.4-fpm,
libapache2-mod-fcgid v1:2.3.9-1+b1,
libapache2-...
2
votes
1
answer
813
views
Is it possible to limit the number of concurrent requests to Apache and buffer the excess requests (instead of returning 503)?
I have a website served by Apache 2.4 with PHP-FPM. Some pages take a few seconds to be generated.
From time to time, some bot or crawler tries to download lots of these pages at once, PHP processes ...
0
votes
1
answer
364
views
PHP SERVER SSL_CLIENT_CERT disappears for when navigating pages
I am containerizing a legacy webservice that use SSL Client certificate validation. I have an apache 2.4 container and a PHP 7.4 FPM container.
My apache virtual host conf looks like
...
<...
0
votes
2
answers
5k
views
Apache PHP-FPM setup results in File not found
I have Googled a lot and there certainly are a lot of results (even on serverfault.com) about this issue.
However, I have not been able to solve my issues with it.
My setup
I have been setting up ...
8
votes
1
answer
7k
views
Syntax of Apache SetHandler directive when configuring PHP FPM
I've followed a couple of tutorials and configured Apache to use PHP FPM. However, I do not understand what part of the SetHandler line is doing and based on some of my experiments appears to be ...
0
votes
0
answers
202
views
Webserver Unresponsive
I need some assistance on a new Apache2.4 and PHP-FPM server we have running. Intermittently the website becomes unresponsive We have only just moved over to PHP-FPM and didn't have this issue with ...
2
votes
0
answers
114
views
PHP-FPM Upgrade Problems
We've recently upgraded to PHP-FPM from CGI. We're having issues on a Ubuntu server which just runs Apache and PHP-FPM controlling 5 or so sites. We've built a new server with a fresh install of ...
2
votes
0
answers
125
views
Override error_log from /etc/php-fpm.conf in /etc/php-fpm.d/www.conf
I need to configure the file for PHP's error_log in /etc/php-fpm.d/www.conf.
Everything works perfectly fine when using:
/etc/php-fpm.conf:
;error_log = /var/log/wrong-file.log
/etc/php-fpm.d/www....