Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
61 views

PHP shell_exec fails, terminal/CLI works

I have to get basic information about the operating system in PHP: $p = shell_exec('cat /etc/*-release 2>&1'); This returns: cat: '/etc/*-release': No such file or directory The command runs ...
John's user avatar
  • 136
1 vote
1 answer
42 views

phpMyAdmin Login Page Error: mysqli::real_connect(): Premature end of data in XAMPP

I'm encountering an error when logging in to phpMyAdmin on my local XAMPP setup. The login page displays the following errors: mysqli::real_connect(): Premature end of data (mysqlnd_wireprotocol.c:387)...
Misbagas's user avatar
0 votes
0 answers
63 views

Why won't the PHP cURL module load on my Windows/Apache web server?

Not sure if this is best suited to SO or here. I have an Apache 2.4 server running on Windows Server 2019 OS. I have installed PHP 8.1.29 from the Apache on Windows site and everything else about PHP ...
Paul H's user avatar
  • 1
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 ...
scott80109's user avatar
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 ...
Bryan Wright's user avatar
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, ...
Will Martin's user avatar
  • 2,523
1 vote
1 answer
459 views

What is the best way to achieve SSO for Apache 2.4 within a Windows domain? [closed]

I would like to implement an SSO authentication (without login/password prompt) on a PHP 8 intranet app, which runs under Apache 2.4 x64 for Windows. My company has an Active Directory / LDAP / ...
b126's user avatar
  • 113
0 votes
0 answers
203 views

Apache2 with GSSAPI auth, can't exclude one location from auth

We have an apache2 serving a PHP application, with kerberos authentication We developed an API within the PHP application, and we want to access it without Kerberos auth But we cannot manage to ...
Wad's user avatar
  • 1
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 ...
Łukasz Korona's user avatar
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, ...
Clovis_Sangrail's user avatar
0 votes
0 answers
73 views

Apache custom rewrite rule, using code

I would like to have Apache handle some custom URL rewrite code that I have. This code rewrites the following urls: https://www.example.com/request?data=SOMEDATABLOB into urls pointing to PHP pages. ...
andynewman's user avatar
0 votes
1 answer
97 views

Very low resource usage on Openlitespeed (LOMP) on Ubuntu 22.04

I have been testing a custom PHP script on LOMP (Ubuntu 22.04) running on VirtualBox (2GB/2Core). First, I tried Apache and upon benchmarking the script, it could complete 10K requests in ~36s - ab ...
Noob YT's user avatar
0 votes
1 answer
221 views

Apache + PHP with mod_php No timeout

I am actually working on Apache server 2.4 with PHP 8.2 (mod_php) & debian 11.2 Recently I sent a HTTP Request with more than 100 seconds without a timeout. This request executed a large MySQL ...
2Max's user avatar
  • 101
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 <...
Cologne_Muc's user avatar
0 votes
0 answers
50 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 ...
Niro's user avatar
  • 1,471
-2 votes
1 answer
461 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(.....
MHSarmadi's user avatar
1 vote
1 answer
476 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: ...
PHP Guru's user avatar
  • 121
0 votes
0 answers
50 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 ...
DysonC's user avatar
  • 1
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 ...
Luiz Otávio's user avatar
0 votes
0 answers
227 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:...
Leandro Caplan's user avatar
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 ...
David Newcomb's user avatar
0 votes
0 answers
285 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....
forsberg's user avatar
  • 101
0 votes
2 answers
182 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 ...
MonkeyZeus's user avatar
0 votes
1 answer
93 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 ...
IT Guy's user avatar
  • 1
0 votes
1 answer
222 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 ...
Tom's user avatar
  • 289
0 votes
1 answer
762 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 ...
Nuno's user avatar
  • 653
0 votes
0 answers
225 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 ...
szlev's user avatar
  • 1
1 vote
2 answers
479 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 ...
frumious's user avatar
  • 123
0 votes
0 answers
2k 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 ...
SMich's user avatar
  • 1
2 votes
1 answer
2k 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 ...
Cristian Rodríguez's user avatar
-2 votes
1 answer
41 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....
Alix Blaine's user avatar
0 votes
0 answers
34 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 ...
user59067's user avatar
  • 215
0 votes
1 answer
440 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 ...
adrianTNT's user avatar
  • 1,169
0 votes
0 answers
110 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-...
Kline's user avatar
  • 226
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 ...
Phree's user avatar
  • 21
1 vote
0 answers
660 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 ...
EastsideDev's user avatar
1 vote
1 answer
216 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 ...
peter's user avatar
  • 123
1 vote
1 answer
915 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. ...
Evan Appleby's user avatar
0 votes
1 answer
252 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 ...
mikakun's user avatar
  • 111
0 votes
0 answers
26 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 (...
Vishnu's user avatar
  • 1
0 votes
1 answer
671 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/...
Tando's user avatar
  • 1
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 ...
Aidvi's user avatar
  • 46
0 votes
0 answers
1k 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 ...
Fahed's user avatar
  • 121
0 votes
1 answer
251 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 ...
CuriousPanda's user avatar
0 votes
0 answers
228 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 (...
EnderSlayer7692's user avatar
0 votes
1 answer
7k 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:...
CuriousPanda's user avatar
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 ...
bilogic's user avatar
  • 154
0 votes
0 answers
265 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. ...
Ipromo's user avatar
  • 1
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 ...
Nando's user avatar
  • 1
0 votes
1 answer
564 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] [...
Nicolas Leroy's user avatar

1
2 3 4 5
9