All Questions
562
questions
0
votes
0
answers
44
views
Web server returning high number of 502 and 504s
We have a web application (LAMP stack) with traefik as a reverse proxy that is suddenly giving HTTP 502 and 504 errors on >50% of requests, both for static files and php scripts. In the traefik ...
0
votes
0
answers
179
views
Package 'php-pear' has no installation candidate
I am trying to install apt install php-pear and I get this error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-pear is not ...
0
votes
1
answer
304
views
PHPMyAdmin Fresh Install Error 500 Nginx
I've just done a fresh install of phpmyadmin on nginx and ubuntu 22.04, however navigating to the index page is returning HTTP 500.
My error.log:
2023/06/24 22:52:55 [error] 1448200#1448200: *1 ...
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 ...
0
votes
1
answer
405
views
Diagnosing mySQL Random CPU Spikes
Our organization has a fairly advanced (as in many moving pieces) web application that's been working great up until recently, yet no noticeable changes have been made.
There is the Apache Web Server, ...
1
vote
1
answer
194
views
PHP-FPM static max_children amount doesn't seem to matter much during stress tests
I've been stress testing PHP-FPM set up as static using wrk, with NGINX running on Ubuntu Server 22.04 for the past few days, writing down results for every scenario. When I look at them, it seems to ...
0
votes
2
answers
2k
views
error installing php dependencies on ubuntu
I have a vps with linux ubuntu 20.04 LTS installed, I also installed the lamp stack to upload my web projects, php with version 7.4, now I need to install some more php libraries for example: php-gd ...
0
votes
0
answers
276
views
Ubuntu: How to lock php to certain version?
A client running Ubuntu 18.04 wants to update php from 7.2.24-0ubuntu0.18.04.17 (cli) to the latest 7.4 version, and lock it there (the software he uses does not work with php8). I have seen other ...
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
335
views
Upgrade PHP and keep extensions and config changes
I would like to install PHP 8.2 but keep all the packages and config changes from 8.1
In a perfect world I would run one script an this would work again for 8.3 next year.
Steps:
Get all packages/...
0
votes
1
answer
6k
views
How to install PHP Sodium on Ubuntu 22.04
I'm running a Google Cloud server running Ubuntu 22.04. It's a typical LAMP stack (PHP is version 8.1.2). Some of the websites on the server are using Laravel 8.
I recently upgraded one of the ...
0
votes
0
answers
143
views
Php mail transmission error using postfix
I need your help
I am using AWS and ubuntu os 20.04.
The web server uses nginx and uses php mail
I installed php 7.3 pfm.
I used postfix for mail function and connected to SMTP. It's not Google, it's ...
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 ...
0
votes
0
answers
352
views
Create ubuntu user with home folder located in www and restrict ssh access using ChrootDirectory to that folder
I posted this on stackoverflow and was told to post here:
I am running a Ubuntu remote dev server, heavily restricted (due to compliance) environment which i previously had configured correctly for ...
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/...
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 ...
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 ...
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/...
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
2
answers
356
views
How do I install PHP 5.5 on a new version of CentOS or Amazon Linux or Redhat or Ubuntu?
I just joined a new company. I've been asked to build a CI/CD pipeline for a Laravel app. It is very fragile. It was built for PHP 5.5 and it breaks when they've tried to upgrade to 5.6 or 7. They don'...
0
votes
0
answers
1k
views
How to I setup default php-fpm service if I have two versions of php
I am having two versions of PHP on an ubuntu server that is 8.1 and 7.4 I installed both PHP-fpm extensions and I have this in /var/run/php
php7.4-fpm.pid php7.4-fpm.sock php8.1-fpm.pid php8.1-fpm....
0
votes
2
answers
563
views
Why does `apt-get -y install php8.0-dev` installs PHP 8.1
On my ubuntu 22.04, I used the PPA from LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
I ran apt-get -y install php8.0-dev, which required php8.1-phpdbg and it went ahead and installed PHP 8.1 ...
2
votes
1
answer
2k
views
How can I use Ubuntu 22.04 with OpenSSL 3 and PHP sites? Getting errors due to a conflict
I have an Ubuntu 22.04 install and it is using OpenSSL 3. When I put my site on the server, I get this error:
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:...
1
vote
1
answer
740
views
How do I pass on a custom FastCGI param value onto an NGINX variable?
Using the FastCGI module allowed me to pass on server variables directly onto my PHP application through the use of param. What I'm hoping to do next is record one of these params onto my NGINX access ...
0
votes
1
answer
490
views
How to identify cause of sudden CPU utilization
I have a production server for a web application configured in AWS EC2 instance. I was running this for years and suddenly since today morning it is showing some spikes in CPU usage and application ...
0
votes
0
answers
986
views
Slow PHP-FPM startup on new VMs
I have an Ubuntu 18.04 virtual machine that is started up automatically by an Azure VMSS.
It appears that PHP-FPM is taking up to 60 seconds to startup when the VM is turned on. I was under the ...
0
votes
1
answer
3k
views
Restart PHP FPM as root - Authentication is required to restart 'php7.4-fpm.service'
I have a www-data user, I allowed to restart PHP FPM by him in /etc/sudoers:
www-data ALL=(ALL) NOPASSWD:/usr/sbin/service php7.4-fpm restart
/etc/sudoers has right permissions
ls -la /etc/sudoers
-r-...
0
votes
0
answers
1k
views
Redirected Too Many Times on Apache2
I'm using apache2 to host a website on Ubuntu Server. When I try to load the page from a browser, I get the "this page redirected you too many times" error. I don't have any duplicate files ...
2
votes
1
answer
870
views
MYSQL is at 197% CPU usage ~ not allowing site to run
Spec: 8 GB memory / 4 vCPUs / 25 GB ssd
Ubuntu 20.04
My website got hit with a DDoS recently and had this continuous high CPU usage error for 4 days and the site will not load up, I take a look using ...
1
vote
0
answers
396
views
Can't access phpmyadmin and local localhost:8000 with two errors for each of them
Recently reinstalled Ubuntu 21.04 on my computer and installed php8 and Nginx.
I run the server for Laravel and when I go to localhost:8000 I got this error:
Illuminate\Database\QueryException
could ...
1
vote
1
answer
830
views
Cannot install lsphp74-imagick: unmet dependencies
I have an Ubuntu 20.04 LTS instance running on Amazon Lightsail and I have trouble installing lsphp74-imagick.
$ sudo apt install lsphp74-imagick
Response:
The following packages have unmet ...
2
votes
1
answer
806
views
Can't install mailparse on Ubuntu 20.04
If it weren't for the fact I had an older mailparse.so lying around on my development machine, I'd be completely without access to my own webmail app now.
root@parakeet:/home/rene/data1/htdocs/nicer....
2
votes
0
answers
1k
views
Apache2 Segmentation Fault after upgrading to PHP8.0 Ubuntu 20
I recently upgraded a production server from PHP 7.4 to PHP 8.0 (this is using the ondrej packages). As a reference, I'm using Ubuntu 20.04.3, apache2.4.46 and now PHP8.0.
After about 18 hours, the ...
0
votes
0
answers
1k
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
8k
views
Not able to install PECL for php 7.3 in ubuntu 20.04 LTS
I have a laravel project that uses firebase and I am not able to install PECL for php7.3. I tried this https://cloud.google.com/php/grpc. When I tried the following command
sudo apt-get install ...
1
vote
2
answers
13k
views
Can I install php8.0 on Ubutnu 16.04
I'm trying to install php8 on Ubuntu 16.04.5 LTS.
Here is the list of commands and output that I ran:
apt-get update
apt install software-properties-common
--- these commands went fine when ran
add-...
0
votes
0
answers
239
views
What is the correct way to enable PHP extentions, manually or via mods-available?
I am used to enabling PHP extensions by manually adding them into my php.ini file, for example: extension=x.so. But today I learned that one PHP extension failed to load because putting the extension=...
1
vote
2
answers
13k
views
stream_socket_client(): SSL operation failed with code 1
I've recently upgraded a server from Ubuntu 16.04 to 20.04 and since the upgrade I've been receiving the following error when try to send mail via SMTP or when trying to connect to an S3 bucket with ...
-2
votes
2
answers
273
views
Will increasing CPU speed up PHP tasks?
I'm running a $5/mo server on DigitalOcean - 1 GB RAM, 1 VCPU.
I have a script which contains a for loop and will take some time to run (I have disabled timeouts).
If I increase the specs of the ...
0
votes
1
answer
8k
views
file size exceeded the maximum size permitted phpmyadmin
I am getting following error while uploading file to phpmyadmin:
No data was received to import. Either no file name was submitted, or
the file size exceeded the maximum size permitted by your PHP
...
0
votes
1
answer
712
views
Why does Apache server return 404 on subfolder, when it was previously working
I just installed some new SSL from GoDaddy on my Apache Ubuntu server.
I then restarted via SSH and everything looks good.
The root site (a wordpress install) now loads fine with https.
However, there ...
-3
votes
2
answers
3k
views
PHP files displayed as plain text in browser [duplicate]
I have an ubuntu server installed with apache2 service. but when I run the index.php file its displays as it is. it means .php files are not executing
1
vote
1
answer
154
views
Can't get origin/request IP address in php from KVM apache website in bridge mode
I have a apache webserver running on ubuntu 18.04 hosted on KVM
This KVM is running on Linux Mint 20.1 host OS
The networking is setup using bridge in KVM
<network connections="1">
&...
2
votes
1
answer
2k
views
Wrong IP address on VPN with StrongSwan
I have server with Ubuntu 20.04 and installed and working IKEv2 VPN with Strongswan.
And i have one php system (installed on the same server with the VPN), that is locked by IP.
So i'm using my VPN to ...
0
votes
1
answer
2k
views
How to allow PHP exec to reload NGINX
How can I allow these commands in PHP:
$output = exec('sudo nginx -t 2>&1');
$output2 = exec('sudo /usr/sbin/service nginx reload 2>&1');
I've looked into sudo visudo in the terminal , ...
1
vote
0
answers
102
views
PHP Warning: Module 'apc' already loaded in Unknown on line 0 - Ubuntu/Nextcloud
I am seeing the following error when viewing the logs on my Ubuntu 18.04 server:
PHP Warning: Module 'apc' already loaded in Unknown on line 0
How can I begin troubleshooting this? I am running php ...
2
votes
2
answers
655
views
Error Phpmyadmin
i have this problem after updating ubuntu. It asked me if I wanted to update the configuration that it already had, and I said no. phpmyadmin was working correctly before the upgrade.
If anyone knows ...
0
votes
1
answer
649
views
Format for second drive in Linux Server and path to directory in second drive for PHP
I'm working for an office in primary education and I'm setting up a local server with Ubuntu Server 20.04. I have some web applications written in PHP for this server. I am relatively new to Linux and ...
1
vote
0
answers
763
views
AWS EFS plus PHP painfully slow possible alternatives?
i built an highly available and fault tolerant Wordpress site on AWS Cloud,
i using ubuntu 20.04 and apache2.4,
/var/www/html is mounted on EFS filesystem configured whit provisioned troughtput at ...
0
votes
1
answer
2k
views
php-fpm Detected unsafe path transition error message. How?
I know very little about linux/ubuntu, but I needed it for a webserver I am wanting to run. I got everything setup and running nice and I have been getting this for some time now. Every time I attempt ...