Skip to main content

Questions tagged [php7]

Use this tag for questions specific to PHP version 7.

Filter by
Sorted by
Tagged with
32 votes
4 answers
123k views

Switch from PHP 7.2 to 7.1 on Ubuntu 16.04, Apache

I need to downgrade PHP on one of my VMs from 7.2 to 7.1 on Ubuntu 16.0.4. The last time I tried to remove just PHP and replace it with a different version, I had all kinds of issues with Apache and ...
Pegues's user avatar
  • 901
30 votes
5 answers
75k views

Permission Denied for fastcgi_pass using PHP7

I'm running LEMP with PHP7.0. I've got this in my server block fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; But when I open the site, it returns a 502 Bad Gateway. Below is the error log. *1 ...
julio's user avatar
  • 954
20 votes
2 answers
15k views

Nginx caching symlinks

I have a deployment system on my web server, every time an app is deployed it creates a new timestamped directory and symlinks "current" to the new directory. This all workded good and great on apache,...
Auris's user avatar
  • 371
17 votes
2 answers
75k views

understand correctly pm.max_children tuning

I have done some investigations and I have found this to calculate and adjust pm.max_children value https://myshell.co.uk/blog/2012/07/adjusting-child-processes-for-php-fpm-nginx/ but for example : ...
TooNetCreation's user avatar
16 votes
2 answers
31k views

switch apache from prefork to event in Ubuntu 16, get php 7 working

Apache was running slow in production. After searching for answers for some time, I finally went to #apache IRC channel and the pros had me check the apache mode with this command: sudo apachectl -V ...
S. Imp's user avatar
  • 585
11 votes
2 answers
31k views

nginx php-fpm child exited with code 0

Anyone had a similar problem with php-fpm 7 with 11.0-RELEASE-p8 or know how to debug it? Situation starts after few minutes and show only half pages to clients. Any pages show up about ~62kb of ...
busy's user avatar
  • 291
11 votes
1 answer
24k views

How to forcibly completely clear PHP7 opcache?

The opcache on my webserver keeps hitting the limit I have set even though I feel like I don't have that much PHP code and it really ought to be enough room. This is compounded by the fact that even ...
Andrew Stine's user avatar
10 votes
1 answer
50k views

Enable error logging on PHP-FPM 7 with Nginx?

This is essentially the same as these questions: https://stackoverflow.com/questions/8677493/php-fpm-doesnt-write-to-error-log Nginx not logging PHP errors BUT the answers there don't seem to be ...
Nick's user avatar
  • 4,646
9 votes
3 answers
34k views

11: Resource temporarily unavailable, while connecting to upstream + Bad Gateway (Nginx)

For all the sites on my new server, it seems as though once nginx has served some amount of traffic, it starts serving "ERROR 502 - Bad Gateway!". Let's take a look at some logs and config... OS: ...
xendi's user avatar
  • 414
7 votes
2 answers
25k views

Start PHP-FPM with root option automatically

I was trying to get PHP-FPM running a pool as root, but I can't seem to adjust the init.d startup params. It works when starting PHP-FPM from the CLI (with sudo php-fpm7.0 -DRy /etc/php/7.0/fpm/php-...
redelschaap's user avatar
7 votes
2 answers
19k views

HTTP/2 on CentOS 7 on Apache with PHP7

After some research I cannot find answer for: How to update Apache/httpd to newest version to use HTTP/2 protocol on my VPS. I'm using PHP7 & my server based on Apache - CentOS 7. No package ...
Damian Bartelmus's user avatar
7 votes
3 answers
16k views

Error with PECL command in PHP7

I've upgraded php to version 7 and now I have problems with pecl command. When I run sudo pecl install mongo I get long list of errors: Warning: Invalid argument supplied for foreach() in Command.php ...
Alen's user avatar
  • 229
7 votes
1 answer
9k views

How to check current pm.max_children setting?

I have modified pm.max_children in /opt/plesk/php/7.0/etc/php-fpm.d/domain.com.conf file. I restarted the php70-fpm service and want to check whether my settings are enabled or not. How can I check ...
Theo's user avatar
  • 183
6 votes
3 answers
36k views

How do I start php7.0-fpm with supervisord?

I am trying to build a dockerized ubuntu 16.04lts with apache2 and nginx with php7.0-fpm Commands I have used but did not work [program:php-fpm7.0] command = /usr/sbin/php-fpm7.0 --daemonize --fpm-...
uberrebu's user avatar
  • 523
6 votes
1 answer
1k views

Apache 2.4 log PHP command 200 success, but what is it doing? POST /?q=die('z!a'.'x'); etc

I am running a CentOS 7.x VPS with Apache 2.4.29 and PHP 7.0.28 and I started seeing the following in my logs. I have php.ini secured as best as I can from articles online for a while now, but I am ...
Tim's user avatar
  • 203
6 votes
1 answer
23k views

Enabling sqlite3 in php7

I want to enable sqlite3 in php.ini but when I try to load a PHP script this error happens: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/sqlite.so' - /usr/lib/php/...
user avatar
5 votes
2 answers
11k views

How to test php-fpm configuration (PHP7.0)

I am running a webserver with Ubuntu 16 and php-fpm to process PHP requests. php-fpm has been installed via apt-get from the default Ubuntu repositories. According to this reference I should be able ...
BurninLeo's user avatar
  • 910
5 votes
1 answer
4k views

MediaWiki Issue - PHP Notice: Trying to access array offset on value of type null in .../SectionProfiler.php

I'm using: MediaWiki 1.30.0 PHP 7.4.1 (apache2handler) MariaDB 10.3.21-MariaDB-1:10.3.21+maria~jessie I get this error a lot on the log: -PHP Notice: Trying to access array offset on ...
martiniturbide's user avatar
5 votes
3 answers
14k views

PHP 7.2.8 PDO Fails to Connect to MySQL 8.0.12 (GA) in AWS EC2 LEMP Stack

I'm testing a new LEMP webserver built with Ubuntu Server 18.04 LTS, NGINX 1.14, PHP 7.2.8, and MySQL 8.0.12. It is an AWS EC2 instance using the official Canonical AMI. Web and PHP work as intended ...
HumanJHawkins's user avatar
5 votes
3 answers
26k views

How to set date.timezone and what is the correct place to do it

(I'm trying to deploy an open source php project to nginx. The project itself does not matter.) I need to set date.timezone to my local timezone because the project uses a global setting. I found a ...
nosh's user avatar
  • 153
5 votes
1 answer
9k views

Php 7 opcache v php 5.6 xcache

We're provisioning a new server and are deciding between (php7 / opcache) and (php5.6 / xcache). We run a few chunky ecommerce sites and want the best possible performance. I'm looking for ...
Tim's user avatar
  • 53
4 votes
1 answer
11k views

PHP 7.2 yum installation on Centos 7 misses libargon2.so

Command: yum install php php-cli php-gd php-curl php-mysql php-zip php-fileinfo php-mbstring Gives following error: Error: Package: php-cli-7.2.12-1.el7.remi.x86_64 (remi-php72) Requires:...
Rauli Rajande's user avatar
4 votes
1 answer
8k views

grant PHP permission to allocate executable memory

I received this message during an iTop installation. If you google this, it appears on commercial websites above their content. Warning: filter_var(): Allocation of JIT memory failed, PCRE JIT will ...
Anthony Spano's user avatar
4 votes
5 answers
19k views

PHP "mysqli.so: undefined symbol: mysqlnd_connect in Unknown on line 0"

I have been trying to get PHP CLI (7.0.7 on Ubuntu) working together with mysqli, but without success. I keep getting the same error message when starting it: mysqli.so: undefined symbol: ...
fgblomqvist's user avatar
4 votes
2 answers
7k views

PHP/FPM/Nginx Issue: Runs fine for a hours, then maxes FPM children in a matter of seconds, resulting in 502 errors

We recently migrated a long running (without issue) Ubuntu 16.04 / nginx (1.10.3) / PHP 7.0 stack over to an Ubuntu 18.04 / nginx (1.14.0) / PHP 7.2 stack. The result has caused instability at the PHP-...
Slickrick12's user avatar
4 votes
1 answer
1k views

Apache2 + Varnish 5 + phpmyadmin causes Segmentation fault (11) - ERR_EMPTY_RESPONSE

I setup up everything the varnish book recommends for a webserver (Debian 8 (jessie), 8 GB Memory, 100GB SSD, Mysql 5.7, PHP 70.13, Apache2, opcache (256M)). Varnish uses 256 MB of RAM, Apache has no ...
Steve's user avatar
  • 61
4 votes
0 answers
690 views

Getting error “PHP Fatal error: Uncaught Zend\Uri\Exception\InvalidUriPartException” on AWS server

I am getting following error in error_log after moving the site (developed in Magento ver. 2.3.2) on new server (AWS Server): PHP Fatal error: Uncaught Zend\Uri\Exception\InvalidUriPartException: ...
Lalit Kaushik's user avatar
4 votes
1 answer
3k views

PHP7.3-FPM with Apache: Unknown script request execution timed out

I configured Apache 2.4 MPM Event with PHP7.3-FPM on a pretty busy web server as follows: Timeout 90 <Proxy "unix:/run/php/php7.3-fpm.sock|fcgi://php-fpm"> ProxySet disablereuse=on timeout=...
Alexey Ozerov's user avatar
3 votes
4 answers
20k views

check an average memory usage by single PHP-FPM process

I have tried the following command to check the an average memory usage by single PHP-FPM process ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'...
Berlin's user avatar
  • 402
3 votes
1 answer
20k views

How to downgrade PHP from 7.2 to 7.0

I am running CentOS 7.4 and HTTP 2.4.6 I installed PHP 7.2.3 I know need to downgrade to 7.0 (reason is software company initially told me to install latest/stable for PHP and now they tell me 7.2 ...
Vic's user avatar
  • 31
3 votes
1 answer
5k views

PHP slowlog empty even though PHP-FPM says it's logging

I have PHP-FPM listening on a Unix domain socket and I've configured the www pool (the only one present) with the following values: slowlog = /$pool.log.slow request_slowlog_timeout = 10s and just ...
Bratchley's user avatar
  • 241
3 votes
2 answers
12k views

Nginx 502 Bad Gateway Error

Currently have a 502 Bad Gateway Error on my Centos 6.8 Server. 2017/01/30 23:57:31 [crit] 26911#0: *1 connect() to unix:/var/run/php/php7.0-fpm.sock failed (2: No such file or directory) while ...
user397791's user avatar
3 votes
1 answer
888 views

Prestashop + Google Cloud SQL

I am currently trying to setup a Prestashop 1.7 instance using Google Cloud Compute Engine and Google Cloud SQL (MySQL 5.7). I managed to get to the installation page of Prestashop, but when I try to ...
Thien42's user avatar
  • 31
3 votes
1 answer
7k views

Redirect HTTP to HTTPS using Varnish 4.1

I have been trying to config the redirection of www HTTP to non-www HTTPS with Varnish 4.1, Nginx, PHP7.0.15, but it's not successful. Really appreciate your insight on the issue: The purpose: to ...
greentealeaf's user avatar
3 votes
2 answers
10k views

Nginx is running but not serving php files

I am trying to setup up Nginx and php 7 on ubuntu 16.0 , prior to this I have only worked with WAMP on windows , I have successfully installed nginx and php , when i run this command on the terminal : ...
ebuoe's user avatar
  • 31
3 votes
1 answer
867 views

How Apache Limit POST are set to accept Strictly local service Request?

I am trying to harden an Apache 2.4 Web server running 2 wordpress sites with separate vhost settings. Deployed on Windows 2012 r2. I was hacked a few weeks ago and the server was completely lost. On ...
Bama's user avatar
  • 133
3 votes
1 answer
4k views

"phpsessionclean" systemd service won't run on Ubuntu 18.04 (after update from Ubuntu 14.04)

After we updated all of our legacy Ubuntu 14 servers to Ubuntu 18, the PHP session files stopped getting cleaned up. I am not sure this is caused by the upgrade itself, but all of our other servers ...
Vojta Hejda's user avatar
3 votes
1 answer
12k views

PHP's MemcacheD extension DLL for Windows

On my PHP 5.6 site I have been using the Memcache extension to interface with the memcached daemon. As the extension has a matching DLL, it meant I could deploy it on my Windows dev machine as well ...
BeetleJuice's user avatar
3 votes
2 answers
5k views

Install MongoDB extension on a specific PHP version

I have a Debian web server on which I installed Apache/Mysql/PHP5 around ISPConfig 3. I manually installed an additionnal PHP version (PHP 7.0.5) in order to have one website on PHP 5, and one website ...
Lord Grosse Jeanine's user avatar
3 votes
0 answers
186 views

How does apache2.4 maintains php7.0 opcache in prefork model

Does each apache2.4 child processes maintain their own opcache or is there a global opcache shared by all children?
kalyan's user avatar
  • 249
2 votes
2 answers
8k views

Compiling PHP7 with MySQL error

I'm setting up an alt-install for PHP7 on CentOS 6.7 with the configure options that were used for the original PHP version: ./configure --disable-fileinfo --disable-opcache --disable-posix --enable-...
Neekoy's user avatar
  • 269
2 votes
2 answers
20k views

PHP files displayed as text

When I want to execute a php file it's displayed as text in my browser. I have a VPS at Hostinger I installed Ubuntu 18.04 with Webmin and LAMP(installed automatically). I checked the installation ...
adamanyn's user avatar
2 votes
1 answer
7k views

Docker - PHP 7.2 FPM Alpine - Imagick

I'm using Docker image php:7.2-fpm-alpine as base image with following command to install Imagick: RUN apk add --update --no-cache autoconf g++ imagemagick-dev libtool make pcre-dev \ && ...
CappY's user avatar
  • 513
2 votes
1 answer
2k views

Apache2 Error --- .htaccess: No comments are allowed here

Tonight I upgraded my VPS from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS. Everything worked as expected, had a little cleanup on php aisle 5.6 and some stocking shelves on php aisle 7.4. Apache restarted ...
wruckie's user avatar
  • 697
2 votes
1 answer
4k views

PHP move_uploaded_file fail

This is a common question but I double checked suggested solutions without success. These are the errors from PHP: Warning: move_uploaded_file(images/img01.jpg): failed to open stream: Permission ...
Leonardo's user avatar
2 votes
3 answers
9k views

PHP7.0-FPM and Nginx don't work using unix sockets

I have a trouble that is not described in the web. I am using VPS Debian 8 Nginx + PHP7.0-FPM. My server gives php-files in a source code and does not compile them when I configure Nginx and PHP7.0-...
tlito's user avatar
  • 131
2 votes
2 answers
5k views

Running phpMyAdmin and php-7 at the same time?

After upgrading php5 to php7, I get this error when I want to apt-get install phpmyadmin The following packages have unmet dependencies: phpmyadmin : Depends: libapache2-mod-php5 but it is not going ...
bytecode77's user avatar
2 votes
1 answer
10k views

What is PHP7 error "not found or unable to stat"?

I am receiving the following error log on my apache2 server: [Mon Dec 24 09:38:48.580631 2018] [php7:error] [pid 19547] [client 5.188.210.12:11267] script '/var/www/echo.php' not found or unable to ...
dmuensterer's user avatar
2 votes
1 answer
533 views

PHP-FPM pool user in load balancing

we know processing part is separate from database in load balancing. in processing i use php-fpm. i have to select a linux user and group in php-fpm pool. If I use root as user and group for php-...
Moin Uddin's user avatar
2 votes
1 answer
1k views

Servers crash with 3000 concurrent clients - how to config it right? PHP & Apache

I've 4 web servers, 2 database servers (read & write), Redis and a load balancer. I'm using PHP 7.0 & Apache2 & MySQL 5.7, however when I do load tests with 3000 users which surf at the ...
MyLibary's user avatar
  • 121

1
2 3 4 5
7