All Questions
Tagged with php apache-2.4
431
questions
0
votes
0
answers
13
views
Apache - How to compress (gzip) only specific calls
I have PHP application served with Apache 2.4
I need the apache to compress (mod_deflate - gzip) calls for specific users. So the application should decides dynamically which calls gets gzipped.
I was ...
-2
votes
1
answer
46
views
Unable to move uploaded files with php (Apache 2.4) - Permission denied
In my project I can't use move_uploaded_file PHP function because of:
Notice: PHP Request Startup: file created in the system's temporary directory in Unknown on line 0
Warning: move_uploaded_file(.....
0
votes
0
answers
40
views
/usr/lib/apache2/modules/libphp5.6.so is missing on Ubuntu 18
I installed PHP 5.6 with:
apt install php5.6
Then I added a -s link in /etc/apache2/mods-enabled for php5.6.conf and php5.6.load
When I restarted apache2 I got this error that wasn't there before:
...
0
votes
0
answers
21
views
Installing PHP 7.3 on RHEL 7 - Angular/PHP files don't process
I've been tasked with setting up an old application on a RHEL 7 server. It has an Angular front-end (I'm unsure of the version, but it's old) with a PHP backend. However, in the browser console I can ...
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
69
views
Laravel: Logging messages generated by "error_log(...)" to terminal, while running app in Apache server
The issue is this one:
When I run a Laravel app from PHP server, that's it, with php artisan serve, I could see every message generated by "error_log(...)" printed in the terminal, like this:...
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
0
answers
75
views
Limit requests in a particular time from the same IP
I found that there is a bug in a library of an app that sends requests to my server. It sends sporadically twice the same requests instead of one in the same time. It makes the app working incorrectly....
0
votes
2
answers
96
views
Apache cannot find PHP
I have a shortcut:
c:/path/to/app1/current_php-cgi.exe.lnk
I am trying to do this:
FcgidWrapper "c:/path/to/app1/current_php-cgi.exe.lnk" .php
And Apache has no issue with the syntax but ...
0
votes
1
answer
63
views
Code Changes for Apache Server Upgrade [closed]
The security team found a loophole in Apache version 2.4.23 so we need to upgrade Apache to version at least 2.4.56 or later. However, the developers told me it required a lot of code changes (around ...
0
votes
1
answer
86
views
NGINX proxy fails to disconnect sessions on target Apache server
I have a PHP script running on an Apache server which is responsible for disconnecting all user sessions.
For that, it makes a loop that identifies itself as the session that should be disconnected ...
0
votes
0
answers
38
views
Secure location of PHP files used in LAMP stack
I'm setting up a LAMP stack on Ubuntu 20.04, and had this recent discussion with a colleague about the fact that it's better to not keep the PHP scripts of all of your stack (classes, API Controllers ...
0
votes
1
answer
426
views
Why does curl inside Docker to a subdomain in the same Host use private IP address?
Consider I have docker-subdomain.mydomain.com pointing to a website in a Docker container, and host-subdomain.mydomain.com pointing to a website in the Host itself. Both these websites are in the same ...
0
votes
0
answers
115
views
How was apache2 able to use 8+GB ram "in idle"? (oom-killer)
I bought a vps in Contabo, using ubuntu22, installed apache2, php, mariadb.Sometimes the apache2 uses all of my memory. Literally all. At idle, not really anything was running.
A php process was ...
1
vote
1
answer
146
views
What determines the name of Apache PHP Handlers?
When configuring an Apache server to use a Handler to run PHP code, I'm familiar with adding a line similar to below in httpd.conf or .htaccess:
AddHandler application/x-httpd-php81 .php
This tells ...
0
votes
0
answers
30
views
Isolating a WordPress wesbite within a sub-directory of another
Is it possible to isolate a website within a sub-directory of another on a WHM server? And by isolate, I mean in the event that website within the sub-directory is compromised any malware is contained ...
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
108
views
How to configure Lychee server? apache error 500
os AlmaLinux 9.1
Apache/2.4.53
PHP 8.2.4
try to install Lychee with postgreesql
my httpd.conf
ServerRoot "/etc/httpd"
Listen 0.0.0.0:80
Include conf.modules.d/*.conf
User apache
Group ...
0
votes
0
answers
717
views
Apache/httpd not loading php-zts.so after PHP upgrade to 8
After an upgrade to PHP 8, I can only use non-threaded PHP instead of threaded (ZTS) PHP.
The server is CentOS 7, running Apache. The Server API is Apache 2.0 Handler. I used Remi's RMP Repository ...
2
votes
1
answer
838
views
Apache2 server is down - AH00170
I have been having problems for several weeks on my Apache2 server with Ubuntu 22.04.1 + PHP 7.4
For no apparent reason, the server goes down on its own and the web is still under construction so it ...
-2
votes
1
answer
37
views
Server with scalability for real-time collaboration and editing [closed]
I am here, to ask for absolute input. I have setup a local Apache Server with PHP 7.2 (currently), I am aware newer PHP exists. I know PHP and Python, I also know Node.js (server/back-end).
With Node....
0
votes
0
answers
31
views
Apache RewriteRule losing one slash of the https://
On my apache server, I need to pass full URLs as parameters to a php function. However, when I use something like:
RewriteRule ^(.*)$ ../image.php?url=$1
$1 ends up losing one of the slashes of the ...
0
votes
1
answer
280
views
PHP exec(iptables --help) works but exec(iptables --command) doesn't work
In PHP 7.3.33 and Apache 2.4 I want to run iptables from PHP (web server enviroment) in order to block/unblock IPs, from command line, this works fine:
/usr/sbin/iptables --insert INPUT --source ...
0
votes
0
answers
95
views
PHP - Session Upload Progress produces 503 error
I've just migrated from APC to using Session Upload Progress (https://www.php.net/manual/en/session.upload-progress.php).
All was going swimmingly until some forms were mysteriously throwing up Access-...
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 ...
1
vote
0
answers
501
views
index.php displays as listing on Apache2 server
My OS is Ubuntu 22.04
I started out by installing php 8.1
I then installed Apache/2.4.52 (Ubuntu) Server
Then I added the following:
sudo apt-get install -y php php-cli php-common php-mysql php-zip ...
1
vote
1
answer
157
views
How can I locate the php script that issues outbound connections?
I have a server running httpd for several websites. Using the top command, I found many httpd processes exhaust memory. Using the netstat command, I found the httpd processes are connecting to an ...
0
votes
0
answers
100
views
server configured for SSL cert and is protected, php $_SERVER['HTTPS'] is not set
I've come across an issue I haven't seen before and am really scratching my head. We have a basic wordpress site running on a WHM/cpanel(for configuration) hosted platform. We have an SSL certificate ...
0
votes
0
answers
209
views
Can't modify header Content-Type in PHP with Nginx
I have a
nginx/1.18.0 and
php-fpm 7.4.19 (fpm-fcgi)
PHP code header('Content-Type: text/css',true) doesn't modify the header,
the same for application/javascript or image/jpg,
files are sent with ...
1
vote
1
answer
583
views
How to manage multiple environments for an app on Ubuntu with Apache server?
I have a PHP app and I would like to host staging, demo, and production servers from one instance on Linode. The challenge I am running into is loading different environment variables for each server.
...
0
votes
1
answer
164
views
browsers (librewolf & chromium tested) won't send if modified since & if none match after receiving one 304 not modified response
localhost development server :
Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1j PHP/8.0.3 mod_perl/2.0.11 Perl/v5.32.1
I'm sending etag & last modified response headers with php :
"Connection ...
0
votes
0
answers
133
views
How to disable request buffering in Apache2
I'm attempting to use PHP to show progress on uploads using apache2 (specifically 2.4.41 ubuntu). In the php manual here, it states:
The web server's request buffering has to be disabled for this to ...
0
votes
0
answers
25
views
CentOS7 VPS: Install WordPress with existing MySQL and httpd
Requirement: Install Wordpress in CentOs 7 VPS
Currently available:
Apache : Server version: Apache/2.4.35 (IUS), Server built: Dec 8 2018 02:08:22
MySQL : mysql Ver 14.14 Distrib 5.6.47, for Linux (...
0
votes
1
answer
397
views
LAMP Stack - Multiple Websites Isolation
I would like to host multiple websites on a VPS (LAMP stack - Ubuntu 20.04 LTS). For security reasons, I'd like to properly isolate each website/vhost from each other and also prevent access to other/...
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
0
answers
800
views
Change Apache root directory to another location
I'm trying to change the default Apache root location /var/www/html to /mnt/datos/mylocation. I also tried to /home/[MY USER]/mylocation, thinking it was related to mounted partition permissions.
I ...
0
votes
1
answer
204
views
How can I be sure that running background process is working without problems?
I have a php file runned throug nohup that allows sockets with php library called ratchet:
nohup php /var/www/html/bin/server.php > /dev/null 2> /dev/null & echo $!
But sometimes the file ...
0
votes
0
answers
180
views
Apache2 not working with PHP
I have Apache2 running on a Debian 11 box (x64). It was installed with an Openmediavault ISO, with nginx and PHP 7.4 installed already (for the web UI) I try to install the PHP connector for apache2 (...
0
votes
1
answer
4k
views
I can't change my php version on ubuntu/apache
I have 2 versions of php installed now:
root@ubuntu:~# sudo update-alternatives --list php
/usr/bin/php8.0
/usr/bin/php8.1
With cli the version is:
root@ubuntu:/etc/php# php -v PHP 8.1.9 (cli) (built:...
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 ...
0
votes
0
answers
158
views
$_POST is empty when obtaining in "ErrorDocument 404" (nginx + apache + mod_php)
I try to transfer website from old server to new, and stucked with one problem. PHP/JS code on both servers is the same, but on new server it is not working - $_POST data are empty in AJAX-request.
...
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
312
views
How to log PHP file name in Apache log?
I'm using Apache 2 + PHP 8, and have PHP warnings and errors written in Apache error log files. Here is an example of logs being written:
[Wed Aug 10 08:15:54.502158 2022] [php:warn] [pid 15437] [...
0
votes
1
answer
969
views
nextcloud rewrites config permissions after reboot
Heyhey!
i'm struggling with a permission-problem on my nextcloud instance.
My Setup is
Manjaro 21.0.7-210614 linux518
Nextcloud 24.0.3-1
Apache 2.4.54-1
php-sqlite 8.1.8-1
php-intl 8.1.8-1
php-...
0
votes
0
answers
23
views
reverse proxy example.com/cn to cn.example.com
I have one joomla website on amazon linux2 with apache and php 7.4 as example.com and i am managing languages with plugin, like if i open example.com/cn it opens in chinese language and example.com/fr ...
0
votes
1
answer
857
views
Nginx reverse proxy issue in redirection without trailing slash
I am running an nginx reverse proxy with apache as a backend server.
I have multiple applications running without any problems, but some php-js websites fails to redirect properly.
when I sent a ...
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
1
answer
448
views
Single Signon best practice for phpMyAdmin across multiple servers
I run a small web development company and we run multiple production servers, each with their own MySQL database server. I'm trying to figure out the best way of giving access to these separate MySQL ...
0
votes
1
answer
2k
views
Apache2 server PHP access to files outside document root
I have a Raspberry Pi that I use to host a web server. I am using apache2 2.4.38, php8.1 and MariaDB 15.1 and I wanted to add a Nextcloud server to it. I am using the web installer version. I already ...
1
vote
0
answers
878
views
Reason for servers slow response time?
I'm running Apache 2 with PHP 7.4.29 servers on Ubuntu 20.04 on AWS using AWS load balancer and auto scaling group. The servers connect to other AWS resources such as dynamodb, RDS (mysql), memcache ...