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
363 views

CentOS7 Remi-PHP81 Followed steps. PHP command not found

Trying to install and enable PHP in a CentOS VPS. Found repository information from Remi's RPM Repository - Configuration wizard. Followed steps to install and enable PHP81. But php -v gives command ...
  • 1
0 votes
0 answers
22 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 (...
  • 1
1 vote
0 answers
111 views

Monitoring php command line worker with Monit Ubuntu 20

Problems monitoring php script using pid method. We have a Laravel worker script that must be kept running on the server: php /data/git/site/directory/artisan queue:work --daemon when this is run on ...
  • 11
2 votes
0 answers
119 views

Webmail application (php) slow when consulting messages via IMAP. What to optimize to improve speed?

I have configured a couple of webmail applications (open source), to consult external email accounts (gmail). The applications are in Php and Mysql. Once installed, I can link my mail through IMAP. ...
  • 153
0 votes
1 answer
169 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/...
  • 9
0 votes
0 answers
53 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 ...
  • 133
0 votes
0 answers
393 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....
1 vote
0 answers
296 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: ...
0 votes
2 answers
143 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
0 votes
1 answer
180 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....
0 votes
0 answers
19 views

MAMP CGI using specific PHP version for domain but using default PHP version for CLI

I'm using MAMP's CGI PHP so that each site can use its own PHP version... however, the CLI is stuck at MAMP's default PHP version, whichever I have selected. This defeats the whole purpose of me using ...
1 vote
1 answer
126 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 ...
  • 46
0 votes
0 answers
133 views

ImageMagick With HEIC Extension Issue in Amazon Linux 2

I need to integrate HEIC extension in ImageMagick. I am using Amazon Linux 2 server. I have tried to install ImageMagick as mentioned in their documentation: https://imagemagick.org/script/install-...
0 votes
0 answers
473 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 ...
  • 121
0 votes
0 answers
24 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 ...
  • 1
0 votes
1 answer
81 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 ?
0 votes
0 answers
16 views

How do Neodynamic server / client licenses work?

I'm sorry if this isn't the correct place to ask this, but Neodynamic has no forums and support team is not very helpful. We recently purchased some software licenses from Neodynamic, 1 server license ...
0 votes
0 answers
123 views

mysqli_sql_exception: Malformed packet

Summarize the problem The error log on my app reports a mysqli_sql_exception: Malformed packet exception. I would like to know what might cause the issue. The error is triggered on mysqli_select_db ...
  • 111
1 vote
1 answer
106 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....
  • 111
0 votes
0 answers
321 views

How to determine which PHP script is running by having the PID in Linux

I have a cPanel server running LiteSpeed Web Server. There are a few Magento stores running on the server. The issue is that I am continuously receiving notification from CSF/LFD stating that a ...
0 votes
0 answers
122 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 ...
0 votes
1 answer
121 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
1 answer
24 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 $...
0 votes
0 answers
149 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
202 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 ...
  • 133
0 votes
0 answers
157 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?
  • 197
0 votes
0 answers
24 views

Munin server doawnloading html file instead of serving them [duplicate]

Munin suddenly downloading html files! Can't find why... Apache2 / Php fpm (can't see what version munin is using), there are several installed / Debian 11 File /etc/mnin/apache24.conf:
0 votes
1 answer
318 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; ...
  • 103
1 vote
0 answers
71 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;...
  • 111
0 votes
0 answers
180 views

Nginx serve mp4 files slower than PHP

Im trying understand why my Nginx serve (initialize) mp4 files slower than PHP. When I refresh (F5) page where video player is include, We can see as on image below the mp4 was finished initialize and ...
0 votes
1 answer
1k 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
30 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 ...
  • 11
1 vote
0 answers
112 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/...
  • 125
1 vote
1 answer
332 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 ...
  • 133
0 votes
0 answers
57 views

Nginx for web server on raspberry pi, I want my sub folder to connect on web server

server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.php index.html index.htm; server_name _; location / { try_files $uri/ /...
0 votes
0 answers
162 views

Linux - Set up apache2.conf for PHP Router

I would like to make a PHP router so it's important to change the .htaccess file in my root folder but it has no effect on the server. I have always used Windows for web dev but I switched to linux a ...
  • 101
2 votes
0 answers
171 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&...
0 votes
0 answers
123 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 ...
0 votes
0 answers
429 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
0 answers
159 views

Deploy VueJS and CodeIgniter applications under same virtualhost/hostname

I've a Windows Server VM in LAN named "testingserver" I've installed Xampp (Apache, PHP) to serve both, a VueJS 2 and CodeIgniter 4 apps Folder structure d - ciapp (CodeIgniter) d - dist d - ...
0 votes
1 answer
165 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-...
  • 187
0 votes
1 answer
954 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 ...
  • 125
0 votes
0 answers
19 views

Switched from prefork to event and can't find php.ini file

I was having issues and the recommended solution seems to be switching to MPM Event from Prefork. The site continues to work fine, except for our functions to upload photos, and I find that the ...
0 votes
0 answers
99 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. ...
  • 1
0 votes
1 answer
21 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 ...
0 votes
0 answers
256 views

wp-cli segmentation fault (core dumped) because of wp cron events

When I tried to see list of plugin on my WordPress website returned error like this: root@ns5008083:/home/website/webapps/wp# wp plugin list --allow-root Segmentation fault (core dumped) Also when I ...
  • 1
0 votes
0 answers
128 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
0 votes
1 answer
172 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
0 answers
37 views

why don't I see /var/ww/mysite.com/wp-content/debug.log?

I'm trying to turn on debug output for my WP site, so I do this in wp-config.php: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( '...
  • 103
0 votes
1 answer
584 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-...