All Questions
175
questions
0
votes
1
answer
12
views
How to fix Apache PHP rejecting post requests which are over 40MBs
My php Laravel API when put behind apache2 (with ssl) when making a post request which is roughly 40Mbs in size, it gives a 500 internal error with following log
[Wed Jul 10 21:08:51.397912 2024] [...
0
votes
0
answers
19
views
Ubuntu 20.04: php lacking permissions to access /var/www/html
I'm trying to write contents to file, however I constantly receive error about lacking permission.
fopen(/var/www/html/files/l.log) Failed to open stream permission denied in /var/www/html/files/file....
1
vote
0
answers
97
views
how to install memcached via pecl?
I'm trying to install memcached and am having some difficulty. Here's what I tried:
apt-get update
apt-get install memcached libmemcached-dev libzip-dev
pecl install memcached
pecl install memcached ...
0
votes
2
answers
259
views
Running “php -f file.php” prints the file contents instead of executing it
I have new freshly installed Ubuntu Unity (23.10) OS, where I installed PHP.
Now I want to run a PHP file from the terminal, but instead of executing it, it just print it contents. (The PHP file is ...
0
votes
1
answer
511
views
Error Installing OCI8 on Ubuntu 23.10 PHP 8.2
I'm running Apache 2.4 on a Ubuntu 23.10 server with PHP 8.2 and I can't install the OCI8 extension in order to connect to Oracle.
I previously had a PHP 5.6 built from a makefile which I recently ...
0
votes
1
answer
230
views
Why is 'mime.types' required in Apaches' 'conf' directory?
I have been running Apache for around 5 years now and am going through a streamlining of my site scripts.
In this process I removed all directories and files I didn't know a use of. In my server root ...
0
votes
1
answer
110
views
Ubuntu Server 14.04 upgraded 18.04 causing PHP7.2-fpm service to time out
I have a DigitalOcean droplet which experienced a variety of issues after a dist-upgrade. Most recently I tried reinstalling php7.2fpm and was greeted with this output:
invoke-rc.d: initscript php7.2-...
1
vote
1
answer
2k
views
OOM killing my PHP FPM after upgrading LTS Ubuntu version
Yesterday I performed a release upgrade which included the upgrade from PHP 7.4 to 8.2.
At first, I thought that the problem could come from the PHP version (because was php8.2-fpm the service that ...
0
votes
2
answers
7k
views
PHP file_put_contents: Failed to open stream: Permission denied
I want to store images using PHP, so I am using the following code:
$encodedCard = isset($_POST["card"])? $_POST["card"] : null;
$name = isset($_POST["fn"]) ? $...
1
vote
0
answers
442
views
Why does CPU usage increase fourfold after upgrading PHP on Ubuntu
We have a portal that attracts high traffic. Since ubuntu's 18 has come to the end of its life, we have upgraded the servers running php 7.4 on ubuntu 18. The average load of servers running Ubuntu 18 ...
0
votes
0
answers
241
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 ...
1
vote
1
answer
201
views
How to install PHP for local development on a daily use Ubuntu machine, only running when called?
I did this years ago, but at this point I don't recall how anymore, so I know it's doable, and I've yet to find good documentation in any other way than it's possible.
I'm looking for how to install ...
0
votes
0
answers
3k
views
Cannot start Apache on Ubuntu 22.04 running PHP 8.1.2. How to install missing PHP load module?
I am on Ubuntu 22.04. I recently upgraded PHP from 7.4 to 8.1
PHP version:
PHP 8.1.2-1ubuntu2.8 (cli) (built: Nov 2 2022 13:35:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) ...
0
votes
0
answers
773
views
How to avoid permissions issues when using PHP to create folders and store files?
I have a Laravel project and part of the code creates folders and stores photos inside it.
Each user has his own folder, but if he did not upload anything yet then this folder does not exist.
Then the ...
0
votes
1
answer
726
views
PHP pages stopped working on Nginx with reverse proxy for Apache
I set up a Nginx server with reverse proxy for Apache (following this tutorial) some months ago. Everything work great, the nginx part as well as the php pages on Apache.
But I needed to use curl for ...