Questions tagged [php7]

Use this tag for questions specific to PHP version 7.

346 questions
32
votes
4 answers

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 MySQL. Is there a quick way to downgrade PHP from…
Pegues
  • 901
  • 1
  • 7
  • 9
27
votes
5 answers

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 connect() to unix:/var/run/php/php7.0-fpm.sock failed…
julio
  • 894
  • 1
  • 9
  • 13
14
votes
2 answers

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 : I have 8Gb on my server I'm hosting 30…
TooNetCreation
  • 153
  • 1
  • 2
  • 8
14
votes
2 answers

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 and were alarmed to find that Server MPM is…
S. Imp
  • 506
  • 1
  • 3
  • 17
14
votes
2 answers

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, but on the new nginx server I've set up, it…
Auris
  • 311
  • 1
  • 3
  • 14
10
votes
1 answer

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 when clearing the opcache, it immediately shows…
Andrew Stine
  • 101
  • 1
  • 1
  • 4
10
votes
1 answer

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 working on Ubuntu 16.04 with PHP…
Nick
  • 4,433
  • 29
  • 67
  • 95
9
votes
2 answers

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 content with ending ��������� 4. Log file of…
busy
  • 271
  • 1
  • 2
  • 7
7
votes
3 answers

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: Ubuntu 16.04 (Server) Hardware: 6 cores, 12GB…
xendi
  • 374
  • 5
  • 8
  • 21
7
votes
2 answers

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 updates on CentOS defaults repo. [root@vps270238 ~]# httpd…
Damian Bartelmus
  • 101
  • 2
  • 2
  • 5
7
votes
3 answers

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 on line 249 Warning: Invalid argument supplied…
Alen
  • 229
  • 3
  • 4
  • 6
6
votes
1 answer

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/20151012/sqlite.so: cannot open shared object…
user472823
6
votes
1 answer

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 wondering why I am seeing an HTTP status code of…
Tim
  • 191
  • 8
6
votes
1 answer

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 this setting?
Theo
  • 143
  • 1
  • 11
6
votes
2 answers

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-fpm.conf, but I can't get this to work with the…
redelschaap
  • 235
  • 1
  • 3
  • 14
1
2 3
23 24