Questions tagged [php7]
Use this tag for questions specific to PHP version 7.
348
questions
0
votes
0
answers
12
views
Error downloading and installing composer
I don't really know where to begin with this. I'm trying to install composer on shared hosting.
I've followed the instructions here, logged in by SSH and run:
curl -sS https://getcomposer.org/...
0
votes
0
answers
82
views
Apache 2.4 AH00687: Negotiation: discovered file(s) matching request: (None could be negotiated)
Apache 2.4 on Windows 11, thus localhost.
I'm running a Wordpress site and Apache serves all URLs correctly except for one. One URL 404s. The Apache error log contains this error:
AH00687: ...
0
votes
1
answer
33
views
PHP-Module from Apache on Windows looses ability to read from local file system (include, require, fopen fail)
I'm running Apache2.4 with php7.4 module on a virtual Windows Server 2019 system. Regularely at 01:00 AM the php module looses the ability to read includes, requires or fopen streams from the local ...
0
votes
0
answers
17
views
Different senders for different VHosts
I have Ubuntu 20.04 LTS server, with Apache2 (mpm_event), PHP 7.4 FPM, postfix (as a relay) installed. This server hosts several sites (WordPress). The problem is that the sites are sending by default ...
0
votes
0
answers
74
views
Nginx IP address www redirection happening on LEMP server without having a c-name or redirect entry in DNS records. Virus or misconfiguration?
On Oracle Cloud server, I have set up a Wireguard VPN Server running Ubuntu Server 20.04. Then, I have set up a Raspberry Pi LEMP Web server as the VPN client to the Oracle Wireguard server. My ...
0
votes
0
answers
12
views
Way to implement ramdom DIR in php
is there a way for redirect a user to a Ramdom Directory and that ramdom directory always go to a same page?
Example:
user 1 reach my site so he is redirected to https://mysite/abcdef/index.php
user 2 ...
0
votes
0
answers
19
views
PHP way to show a page depending of user PC or mobile?
i have 2 versions of a page, PC and mobile, how do a show one or other depending on User Agent?
I know that using INCLUDE but i'm a little confused so maybe a example can help me.
TY
1
vote
0
answers
294
views
Ondřej Surý's PPA - php7.4-xdebug also installs php8
OS: Ubuntu 20.04 focal (on the Windows Subsystem for Linux)
Kernel: x86_64 Linux 5.10.102.1-microsoft-standard-WSL2
Uptime: 1h 20m
Packages: 1612
Shell: bash 5.0.17
WM:
GTK Theme: Adwaita [GTK3]
Disk: ...
0
votes
0
answers
80
views
Ubuntu 20.04 - PHP 7 not executing when run from Web App
I have a Web App that's running on a LAMP Stack and it's been working fine until yesterday when a script responsible for sending OTPs via email no longer worked. Upon further investigation, it seemed ...
0
votes
0
answers
155
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
82
views
apache2 with PHP-FPM truncating error_log messages
I have an apache2 server configured to serve multiple websites with php-fpm.
Each websites has a custom error_log file
ErrorLog "/var/log/apache2/error_log-example.com"
using the following ...
1
vote
0
answers
119
views
CentOS 7 with php-fpm renders raw PHP
Summary: My CentOS 7 server with PHP 7.4 fpm is not executing PHP files instead they provide a raw PHP file to the client. In the next section, I will explain the environment.
I have set up a minimal ...
1
vote
0
answers
1k
views
Upstream prematurely closed FastCGI stdout while reading response header from
I have a setup of nginx1.20.1 + php7.3.3 on Centos7. We run those VMs beneath google cloud load balancer. Sometimes, randomly there is 502 returned to the end client. I traced one of those error ...
0
votes
0
answers
103
views
Is there a way to solve Apache HTTP Server Source Code Disclosure?
I have just received an Acunetix report from the network security section for my Apache server on 64-bit Windows 10, with Moodle 4.0 installed. Such issue is only observed in the Windows version of ...
0
votes
0
answers
272
views
Wincache stops running, with PHP and IIS
I'm running PHP 7.2.22, with Wincache 2.0.0.8 on IIS 8.5, Windows Server 2012 R2. Everything runs well most of the time. But about every few days, Wincache stops running. PHP and everything else ...
1
vote
0
answers
113
views
Octopus deployment causes 100% CPU usage in PHP-FPM
Environment: AWS
OS: GoldenImage-amazonLinuxV2-2021-01-04_19.43.07
Nginx: 1.20.0
PHP-FPM: 7.3.33
Octopus tentacle: 6.1.1351
The old method
So we currently use a simple push script to deploy a PHP site ...
-2
votes
2
answers
545
views
what the meaning of #!/usr/bin/php -q
I look at some php script in centos,I notice there is #!/usr/bin/php -q
What is the meaning of this option? because I cannot see it in php --help
1
vote
0
answers
275
views
unable to upgrade php in ubuntu 18.04
I am trying to update php from 7.2 to 7.4, but getting error. I am trying with the following command as root:
add-apt-repository ppa:ondrej/php
the error:
Error reading https://launchpad.net/api/1.0/~...
0
votes
1
answer
22
views
php memory_limity = -1 not respected?
Debian bullseye, php 7.4. One of my cron jobs has the line:
30 1 * * * www-data /usr/bin/php /my/script.php > /dev/null
I'm getting the error
PHP Fatal error: Allowed memory size of 157286400 ...
0
votes
1
answer
244
views
After upgrading Debian Buster to Bullseye, Wordpress sites no longer updating
Today I upgraded my webserver from Debian Buster to Bullseye and it was in fact a pretty straightforward upgrade. Everything seemed to work until I tried to reach a few WordPress sites on the server. ...
0
votes
1
answer
84
views
apache 2.4.6 site works on Debian 10 but not on CentOS - php 7 code
I have a bootstrap website that runs on Debian 10 - php 7.4.25, httpd 2.4.52, mysqld 15.1 Distrib 10.5.12 which works perfectly.
I copied it to my CentOS 7 box, which has selinux running as permissive ...
1
vote
0
answers
1k
views
PHP PDO Very Slow on Fetch
I have a problem with a couple of queries running in PDO on PHP connecting to MSSQL server 2019.
I have checked the time in SSMS and its fast.
I have also added some timers into my code so I can see ...
0
votes
0
answers
700
views
HTTPS POST-Request fails in connection with Content-Length
A PHP application posts XML data with curl; nothing fancy, the output looking like (c/p, but identifiers and passwords changed):
Host: foreign.host.example
Authorization: Basic dGVzdDpnZWhlaW0=
User-...
0
votes
1
answer
864
views
Nginx php-fpm 1 of 3 pools not working: returns stat() failed (13: Permission denied)
I have nginx with 3 pools for php7.4-fpm - one for each of 3 users on the system as they have their own apps and files. The setup of all 3 is completely identical, but the recently added one has some ...
0
votes
0
answers
201
views
AWS Lightsail LAMP PHP7 mod-rewrite
I just installed a fresh AWS Lightsail LAMP stack with php7.4 and a lets encrypt ssl
Docs say Mod-rewrite is installed/enabled by default however I get a 404 when I go to any url on my site that is ...
1
vote
0
answers
5k
views
Composer telling me " PHP extension ext-gmp * but it is missing" when it shouldn't be
I'm new to Composer, so be gentle!
I'm trying to install a script that uses Composer, but I get:
Problem 1
- Root composer.json requires PHP extension ext-gmp * but it is missing from your ...
0
votes
0
answers
41
views
Page Loads Error
In my production Environment I'm observing a sporadic issue where pages are taking a long time to load. In the error logs we are seeing:
PHP Fatal error: Maximum execution time of 30 seconds ...
0
votes
1
answer
367
views
PHP5 to PHP7 unexpected increase in memory usage inside container
Last week we updated several wordpress sites which are running Alpine Linux as containers inside a host (Ubuntu 20.04) through LXD.
A summary of the update is as follows:
Alpine Linux v3.8 -> 3.14
...
1
vote
1
answer
2k
views
On Apache 2.4, how can I disable the php7 module?
I want to disable the php7 module.
apache2 -M | grep php
returns:
php7_module (shared)
However, these commands fail:
a2dismod php7
a2dismod php7_module
They both return a message specifying that ...
0
votes
0
answers
265
views
NGINX liip_imagine unable to create path for ... "Get operation failed" webp - not creating .webp in media/cache/filter_name symfony
So in my liip_imagine i have something like:
webp:
generate: True
quality: 70
and it works good locally, it serves .png.webp images, but when i put it on my NGINX server i have an issue called
...
0
votes
1
answer
962
views
How to install PHP on CentOS has preinstalled Apache HTTPD?
I'm using CentOS 7. I wanted to install PHP 7 so I used remi-php (latest PHP version of yum is 5.4). Since the HTTPD version of yum is too old, I compiled the latest HTTPD version from the source code....
1
vote
2
answers
198
views
Can't change linux user password with php script [closed]
I have the following php script for password change:
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
ini_set('display_error', true);
$cmd = '...
0
votes
1
answer
152
views
OpenSUSE: PHP - Unable to execute sudo /usr/sbin/chpasswd
Could somebody give a tip, where can be a problem.
I have a Server with OpenSUSE, PHP7 and roundcube. Plugin "Password" in roundcube fire an error:
PHP Error: Password plugin: Unable to ...
0
votes
0
answers
993
views
“No input file specified” - Laravel project on CentOS
I've have VM with CentOS installed where I want to host Laravel project. I've put it on /var/www/html/project
But when I access via URL of this project like 127.0.0.1/project I get tree of document. ...
1
vote
1
answer
6k
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 ...
0
votes
2
answers
6k
views
Cannot enable php7.4 on Ubuntu 20.04
I'm trying to set up nextcloud on a home ubuntu box.
I've got php 7.4 installed, apache, etc.
However apache2ctl -M does not show php as shared. This causes (I guess) the http://localhost/nextcloud ...
0
votes
0
answers
74
views
Apache causing massive load spike after reboot
My server is running Ubuntu 18.04.5 LTS, with LAMP stack (PHP 7.4), and apache version 2.4.29 using Prefork MPM. My server has 16 CPUs and 29GB of RAM. This server hosts 258 websites.
Whenever I ...
0
votes
2
answers
922
views
Debian 9 PHP7.4 can't install curl
I already searched answer for this question and checked Bartek Chanda answer, but not working with me. I have debian 9.13 and already done what Bartek Chanda answered, but not working.
Still got this ...
0
votes
1
answer
4k
views
Apache "can't locate API module structure" with php73
newbie here. I was working on installing a LAMP environment on Manjaro for testing, trying to use older versions to match the production environment I have to work with (PHP 7.3, MySQL 5.6; got them ...
0
votes
1
answer
5k
views
How to install PHP-intl on Centos PHP 7.2
My PHP 7.2 application is giving the error Message: Class 'NumberFormatter' not found
We are running:
PHP 7.2.34
CentOS Linux release 7.9.2009 (Core)
I tried to install PHP-intl and it seemed to ...
0
votes
1
answer
782
views
Apache: phpmyadmin on sub-domain "503 Service Unavailable": php7.4-fpm
I'm having a tough time trying to fix a major problem getting phpmyadmin working again (it used to work on ubuntu 16.04). I upgraded Ubuntu 16.04 to 20.04 yesterday and got the following versions of ...
1
vote
0
answers
588
views
php-fpm status page does not display info about Idle processes
I have PHP 5.6 and PHP 7.3 running on my machine. Webserver is Nginx and is using FastCGI (php-fpm). I have setup two php-fpm status pages - one for the www pool of the php-fpm 5.6 and one for the www ...
1
vote
1
answer
7k
views
PHP-FPM workers timeout times exceeding configuration limits
We are running server with this configuration: Nginx + FastCGI (PHP-FPM) + PHP 7.3 + MySQL 5.7. However, we experience some issues with long running PHP scripts, so we have setup these restrictions:
...
1
vote
1
answer
140
views
Random Internal Server Error
We are receiving random internal server errors on one of our website.
These internal server errors can sometimes appear only on some users but other users are not receiving it (at the very same time) ...
0
votes
2
answers
548
views
RHEL PHP 7.3.5 with mysqlnd and apache
I'll start by stating I'm not a server admin by trade, so I've been struggling with this task.
PHP 7.3.5 was already installed on RHEL7 running Apache. I have installed MySQL successfully and now I am ...
1
vote
0
answers
228
views
Some PHP extensions available only for root user
I have installed PHP 7.4 (from remi) on CentOS 8 since I need that version on CLI.
The issue is with extensions, when I check modules (php -m) as root user I for example have redis enabled there, but ...
1
vote
0
answers
2k
views
Set default Php in CentOS 7
I have a centos server 7 with php 7.2 default installation. So, if I run php-v I get as output :
PHP 7.2.34 (cli) (built: Feb 3 2021 09:23:21) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend ...
1
vote
1
answer
3k
views
How to properly set specific PHP version used by Apache on Arch?
So it appears that after a recent Arch system upgrade, my NextCloud server no longer works, currently giving me "This version of Nextcloud is not compatible with > PHP 7.4. You are currently ...
2
votes
0
answers
630
views
mod_fcgid: can't apply process slot for - error repeats every 6 hour
On server, I run Apache via FastCGI using PHP 7.4.13:
/etc/httpd/conf.d/ is configured as this:
# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl
# Sane ...
2
votes
0
answers
313
views
Nextcloud internal server error after server upgrade
I upgraded my server today from Debian 9 to Debian 10 and installed PHP 7.3 with all modules needed for NC but when I try to open the website I get "internal server error. More details can be ...