Questions tagged [php]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

Filter by
Sorted by
Tagged with
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 ...
raphael75's user avatar
  • 133
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....
Anonüümne Rüütel's user avatar
1 vote
0 answers
766 views

File not found Nginx PHP

I have an issue trying to create a separated demo location. I have panel.example.com on /var/www/panel. I want panel.example.com/demo to lead to /var/www/demo. I have the following configuration: ...
OpenSource's user avatar
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/...
DanC's user avatar
  • 1
0 votes
1 answer
417 views

Nginx - fastcgi cache not working for rewrite enabled php page

I've been trying to figure out why Im failing to achieve fastcgi caching for a rewrite rule applied php page. While all other request wonderfully cache, the rewrite ^(.+)/special/?$ /inc/special....
TheMonkeyKing's user avatar
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 ...
Aidvi's user avatar
  • 46
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 ...
Fahed's user avatar
  • 121
0 votes
0 answers
30 views

Session Show Up On Screen

I've worked on this problem for 3 days, and that the wording "SESSION_START();" shows up on my screen when I run the page. It doesn't matter if it's HTML or PHP, I see the word ...
timlab's user avatar
  • 1
0 votes
1 answer
237 views

How can I update php 8 on a linux server without internet access?

Operating System: Redhat 8.4 Internet access : no access to redhat server : ssl vpn Current php version : 7.4 Purpose: Make php version 8 How can I do that ?
Raafet Sword's user avatar
1 vote
1 answer
251 views

What might cause a PDO MySQL connection to be terminated?

Summarize the problem My PDO (MySQL) connection is disconnected during execution of the code. The connection is created successfully, but around 0.05% of the time the Error log reports a disconnection....
ipegasus's user avatar
  • 111
1 vote
0 answers
302 views

PAM configuration popup yes or no for answer? after sudo apt install software-properties-common

I was trying to install the latest php version and after a command not found I googled it and they say to use the following command ''sudo apt install software-properties-common'' After doing this I ...
Peter Tremblay's user avatar
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 ...
CuriousPanda's user avatar
0 votes
1 answer
34 views

Is include() cached with fastcgi?

I have a script like this script.php <?php include "data/package.php"; echo $package[0]["name"]; echo "Hello World"; ?> and i do cache false with this map $...
yvgwxgtyowvaiqndwo's user avatar
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 (...
EnderSlayer7692's user avatar
0 votes
1 answer
348 views

MySQL + php due to high CPU usage app crashing

Just recently the application that I maintain started crashing, mysql's CPU usage is 100%... or more :) The application itself is quite old and has a lot of slow queries but before blaming it I want ...
Maarduk's user avatar
  • 133
0 votes
0 answers
334 views

Why are there many PHP-CGI processes?

My webmin server has been running into a memory issue, when I check the memory usage, I found this Why are there so many php-cgi7.4 processes? Is this normal?
shenkwen's user avatar
  • 199
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; ...
Joulss's user avatar
  • 103
1 vote
0 answers
127 views

File in Nginx alias location accessible, but PHP file_exists returns false

I add an alias location in Nginx. All files accessible in the browser but when I check in PHP file_exists return false. My Nginx video location configuration: location /videos { alias D:/avan/film1;...
Hosein's user avatar
  • 111
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:...
CuriousPanda's user avatar
1 vote
1 answer
73 views

Hosting resource intensive PHP cron jobs

My website is currently running on a VPS. To make the site work, I have a number of resource intensive cron jobs - and when they are running, my site stop responding/becomes incredible slow. I'm ...
Mads's user avatar
  • 11
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/...
AtomX's user avatar
  • 125
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 ...
bilogic's user avatar
  • 155
2 votes
0 answers
297 views

httpd on OpenBSD: How to Redirect URLs Ending In '.php'?

I am running an httpd(8) web server on OpenBSD. php-8.1.9 is used to serve php. In /etc/httpd.conf I have the following (example.com is a placeholder for the actual domain): server "example.com&...
Matthew Carlson's user avatar
0 votes
0 answers
179 views

how to write nginx rewrite rule to direct to another server that work on python

I have the following scenario I have a domain name that is connected to machine X which has Nginx and PHP I have multiple machines 1 to n who are not exposed public and only accessed by VPN ...
Amira Elsayed Ismail's user avatar
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 (!...
Genisys Mythic's user avatar
0 votes
1 answer
314 views

Simple and secure way to display error page with IP address of visitor? With python?

Fail2ban is used to block users on certain patterns via reject command. Sometimes, especially when users are behind a NAT with a lot of users they get blocked unintendely. The user then writes an E-...
Hannes's user avatar
  • 307
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 ...
Tyralcori's user avatar
  • 125
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. ...
Ipromo's user avatar
  • 1
0 votes
1 answer
22 views

Apache2 Virtualization For A File

My folder stracture like that; system core bootstrap run In run folder I have a file php file. I can include other files like; include '../core/...php' But I want to block that. Can I set it apart ...
Ömer Faruk Demirel's user avatar
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 ...
Nando's user avatar
  • 1
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] [...
Nicolas Leroy's user avatar
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-...
bitdruid's user avatar
-1 votes
2 answers
457 views

Unable to access phpMyAdmin

Anyone can help me unable to access phpMyAdmin → http://34.100.189.79/phpmyadmin/ Regards
Faraz Sayyed's user avatar
0 votes
0 answers
152 views

URL Shows 404 but adding .php at the end displays

I have set up this website and it's working perfectly, however, extensions such as domain.com/dashboard will display a 404 but when I add .PHP at the back -> domain.com/dashboard.php it displays. ...
Brun0L3z's user avatar
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 ...
Lion's user avatar
  • 506
0 votes
0 answers
142 views

Blank page with 500.0 response for index.php when loging it

The page will work normally but as soon as you press login or sign-up, goes to a blank page and in element inspect you can see a 500 response from the server I've tried many different login/sign-up ...
SoapierGlobe421's user avatar
0 votes
0 answers
33 views

Two same pages www.example.com and www.example.com/index.php

Can someone help me how to fix this problem, seobility shows me that i have two same pages www.example.com and www.example.com/index.php
Branka Tomic's user avatar
0 votes
0 answers
94 views

Why nginx return 200 status code?

I have two servers (test and production), nginx configuration is the same, CMS joomla. On the test server everything works correctly. For some reason the production is returning a 200 code when it ...
Андрей Курочкин's user avatar
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 ...
Sukhjinder Singh's user avatar
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 ...
Media Posternet1's user avatar
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-...
Xander's user avatar
  • 101
0 votes
1 answer
672 views

Building PHP 8.1.8 with open SSL, failing unable to find package. Lambda Layer

I'm trying to build a PHP8.1.8 lambda layer however i was following https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/ And just using the correct version, so the ...
Martin Barker's user avatar
1 vote
1 answer
45 views

Php Server Side Security

I try to code new application. User's uploading their php script and all scripts stored in 1 folder like that; Some folder Another System Folder Projects Folder project 1 index.php project 2 ...
Ömer Faruk Demirel's user avatar
1 vote
0 answers
571 views

IIS 10 - Setting up PHP Application behind Reverse Proxy

I am currently struggling to get the right config in IIS, as I am normally using Unix servers and nginx. I have a reverse proxy (nginx) that forwards all requests to subdomain.domain.com/xxx to my IIS ...
T.Bremkes's user avatar
0 votes
0 answers
307 views

Understanding slow queries from mysqldumpslow

I'm maintaining a system which sporadically (no exact time) but only at night causes the entire server to crash for a few seconds and the users seeing "Error Connection Refused" until the ...
Marcus Christiansen's user avatar
0 votes
1 answer
113 views

Cannot get FFMPEG in SNAP to convert videos to MP4

I recently installed FFMPEG with SNAP. For some reason, the regular ffmpeg install isn't working on this particular server. The file path that I have been using with my previous ffmpeg installation is ...
Charlie's user avatar
1 vote
2 answers
7k views

Unable to bind to server: Can't contact LDAP server

Environment: LDAP Server Type: ActiveDirectory LdapRecord-Laravel Major Version: v2.5 PHP Version: 8.0 I'm using ldaprecord and I'm getting "ldap_bind(): Unable to bind to server: Can't contact ...
ZOHBOU's user avatar
  • 11
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?...
Ryan's user avatar
  • 5,871
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 ...
A. Bader's user avatar
0 votes
1 answer
2k views

centos 7 php https port 443 Connection refused

centos 7 php https port 443 Connection refused i try to open port 443 https on my centos vps i have open port in firewall-cmd but on i open url https port 443 i have error Connection refused firewall-...
smo zain's user avatar

1
3 4
5
6 7
158