Questions tagged [php]

PHP is a server-side scripting language, used for building browser-based applications. This includes websites as well as programs that don't really need any form of interaction with the user.

Filter by
Sorted by
Tagged with
1 vote
0 answers
1k views

PHP-FPM8.0 Fatal Error Insufficient shared memory!

I am running LAMP in VBox6.1 with Ubnutu Server 20.04. Cause This morning I removed all attachments to my vdi (optical disk & shared folders) and then used vboxmanage to --compact my vdi as ...
1 vote
0 answers
2k views

How to change php-cli to match phpinfo (7.3 => 7.4) Ubuntu

I am on Ubuntu 18.04 and I want to make my php -v match my phpinfo page. php -v from the command line: PHP 7.3.13 (cli) (built: Jan 8 2020 14:07:34) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend ...
0 votes
2 answers
798 views

php -v and phpinfo(); returns different versions

I want to use php 8.1 on Ubuntu server Currently it works with php 7.4.30 lsb_release -a returns No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18....
1 vote
1 answer
1k views

Ubuntu 20.04 has no installation candidate for php8.1-sqlite

Apparently package php8.1 is available for Ubuntu 22.04 but not available for 20.04. php7.4-sqlite is, however, available for 20.04. In particular I'd like to use PDO with sqlite on PHP8.1 on 20.04. ...
1 vote
2 answers
179 views

Uninstalled PHP and php -v always returns 7.1.4

I have installed php from ondrej. I followed many answers about removing it. However, the apache does not able load php but everytime I try to use php -v from the terminal it returns : PHP 7.1.4 (...
0 votes
1 answer
35 views

Setting variable for execution both from web and from php CLI Ubuntu

So I have a web script that I need a little help with. While accessing the script from the web I use faucet?id=1467 in the web address. The code on the script then reads $id = getiparam('id'); and ...
1 vote
1 answer
2k views

Removed /usr/bin/php

I've made a stupid mistake on a live webserver and need some help to recover. While logged in as root ( mistake #1 ) I did a wget of a file to /usr/bin/php which created the directory /usr/bin/php ...
16 votes
5 answers
49k views

How to change PHP version in Ubuntu 20.04 console?

How can I change the PHP version used in console on Ubuntu 20.04? I have all versions in the /etc/php folder, but I don't know where the configuration for the command line version is.
0 votes
2 answers
772 views

Uninstalled PHP5.6 not working

I've uninstalled php5.6 on my PC then I upgrade to PHP7.2 but when I checked php cli php -v, it's show me like this, it's still show me PHP 5.6 Anyone can help me out ?
1 vote
1 answer
1k views

Upgrade php command line to 5.5.9

I am using Ubuntu 14.04. I have PHP installed. When I check phpinfo() from browser I get 5.5.9. But when I check from command line, I get 5.3.28. How can I make the command line PHP also to 5.5.9 ? I ...
1 vote
2 answers
5k views

Can I install the ordinary php and php-cli on the same machine?

I want to install php5 on my machine and also php5-cli. I want to first install the ordinary php5 package and then php5-cli. Are there likely to be any conflicts if I do this: sudo apt-get install ...
2 votes
2 answers
9k views

I can't run php on CLI

When I install it again it says php is already the newest version. when I run php -v the out put is this: The program 'php' can be found in the following packages: * php7.0-cli * hhvm Try: sudo apt ...
1 vote
1 answer
1k views

What is the purpose of the php-cli package?

During the process of setting up a new development workstation (Kubuntu 18.10), I discovered that the php-cli package was not installed. Nevertheless, all PHP scripts are working fine, whether they ...
1 vote
1 answer
850 views

PHP CLI version not getting updated

I have updated the PHP Version to 5.6.9-1+deb.sury.org~vivid+2 but on command line when I type php - v, it shows PHP 5.3.29 (cli) (built: Aug 21 2014 14:53:07) Copyright (c) 1997-2014 The PHP Group ...
5 votes
1 answer
24k views

How to enable OpenSSL for PHP Cli?

There is no major difference in the php.ini files located at /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini. But <?php phpinfo(); ?> when accessed from a browser says OpenSSL support ...
2 votes
1 answer
3k views

PHP Environment Variables in CLI

Environment Variables are used to set up the PHP application and the application runs smoothly. The issue that I'm facing is when I'm trying to reference the application's database connection file and ...
3 votes
1 answer
31k views

How to Fix Could not open input file in php CLI 7.0

How to run php cli right in Ubuntu 16.04? When I enter the command php file.php always out the error Could not open input file: file.php How can I fix it?
2 votes
1 answer
3k views

Running PHP-CLI server

I recently got interested in the WebSocket technology. I built myself a server using PHP which I ran on Windows using the PHP CLI. That was fine for development, but now I need to think about ...
7 votes
2 answers
31k views

configure: error: jpeglib.h not found

I am trying to compile php 5.3.29 on Ubuntu 14.04. I am getting an error - configure: error: jpeglib.h not found. Here is my options.sh: #!/bin/bash # You can override config options very easily. # ...
14 votes
2 answers
53k views

Nginx/PHP-FPM "Access denied." error

I'm trying to set up a freshly installed Ubuntu (12.04) server, but I can't get PHP files running through php-fpm. No matter what I do, I always get a "Access denied." page (plain text, not html or ...
1 vote
0 answers
2k views

How to setup cron job

I am using Ubuntu 22.04 and have php-fpm, so I am using php8.2 and php7.3. I use 7.3 for Interspire Email Marketer, (IEM). In IEM, it found the cron path to be: /usr/bin/php -f /var/www/mail.domain....
1 vote
1 answer
2k views

php8.1 does not work with the php handler php8.1-fpm : the browser displays the php source code

I have installed the following Ubuntu repository packages on Ubuntu 22.04.1 LTS: dpkg -l apache2 php php-fpm libapache2-mod-php libapache2-mod-fcgid Desired=Unknown/Install/Remove/Purge/Hold | Status=...
9 votes
1 answer
5k views

Can't get nginx to run php on ubuntu 16.04 server

Edit. Question already got an answer here: https://serverfault.com/questions/889334/cant-get-nginx-to-run-php-on-ubuntu-16-04-server I am setting up a server running nginx and I'm trying to get it to ...
1 vote
3 answers
8k views

php does not parse using nginx & phpfm

I am setting up a VPS and followed the nginx, PHP, MySQL instructions for WordPress from this tutorial http://tutspundit.com/howto-install-nginx-php-fpm-mysql-php533-wordpress-ubuntu-part-1/ and then ...
2 votes
2 answers
3k views

Install php7-fpm in Ubuntu

I'm trying to install php7-fpm in my Ubuntu VPS. I've tried sudo apt-add-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.0 Then, I did service php7-fpm status ● php7-fpm....
1 vote
1 answer
1k views

NGINX virtual subdirectory is serving PHP files as downloads

My server answers to the following virtual subdirectory paths: www.domain.com/us www.domain.com/ca www.domain.com/fr-ca www.domain.com/spa Each of these is an alias for www.domain.com. If I attempt ...
6 votes
2 answers
35k views

How to install php IMAP for php5-fpm?

I'm trying to install Vtiger CRM on Ubuntu. This require IMAP. How to install PHP IMAP for php5-fpm?
2 votes
3 answers
10k views

PHP5-FPM (PHP 5.5) won't install - can't install libsystemd-daemon0

My server is down because I don't know how to fix this. I'm on Ubuntu 12.04 I use this PHP5 repository: http://ppa.launchpad.net/ondrej/php5/ubuntu precise main I've never had a problem until today. A ...
0 votes
2 answers
2k views

PHP code is not rendered properly on web browser

I've just installed Apache with PHP-FPM based on the following tutorial How to Setup Apache with PHP-FPM on Ubuntu 20.04 wolf@linux:~$ dpkg -l apache2 libapache2-mod-fcgid software-properties-common ...
0 votes
2 answers
1k views

PHP 7.2-FPM error

Honestly this is so frustrating . I don't know what am i doing wrong. I want to set up a virtual host/service block. When I browse www.example.com, it should show me This is a test page www.example....
2 votes
2 answers
1k views

How to use different versions of PHP? [duplicate]

I am using Ubuntu 16.04. I have several virtualhosts, and I need to run different PHP versions. I have php-fpm and FastCgi installed, but how can I configure it?
2 votes
1 answer
2k views

php5-fpm incomplete install - no config file

I've set up a server with Ubuntu 11.04 and Nginx + PHP-FPM + Varnish + APC + MySQL + Memcached + WordPress. Everything runs pretty nice, but there is a tiny problem with the PHP-FPM service. Install ...
-1 votes
2 answers
1k views

Need to install PHP 5.6

I have tried these below commands to install PHP 5.6 while installing Lampp: sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php5.6 sudo apt-get install php5....
3 votes
3 answers
10k views

phpinfo() showing blank page on ubuntu18.04

I installed phppgadmin using this tutorial. How to Install PostgreSQL and phpPgAdmin on Ubuntu 18.04 The index.html file is showing fine that comes already installed. But when I made a php file to ...
4 votes
0 answers
19k views

php-fpm not creating /run/php/php7.2-fpm.sock (ubuntu 18.04 server)

error log ERROR: unable to bind listening socket for address '/run/php/php7.2-fpm.sock': No such file or directory Could someone help me find the problem with this as I run out of ideas below is what ...
11 votes
2 answers
20k views

How do I install PHP-FPM 5.4 on 12.04?

I would like to install PHP 5.4 with FPM on a 12.04 virtual machine. The popular PPA solution for installing PHP 5.4 doesn't seem to include the php5-fpm package. What's the best way to install this ...
5 votes
2 answers
25k views

Unable to get error stack trace or error log while using php-fpm + nginx on Ubuntu 14.04

I am using php-fpm 5.5.9 along with nginx 1.4.6 on my Ubuntu 14.04 machine. I have installed them using apt-get package manager. I am unable to get a stack trace of the error that my index.php script ...
3 votes
1 answer
12k views

How to install PHP-FPM on Clean Install of Ubuntu 18.04 Server

I am trying to install a LEMP stack on a clean install of Ubuntu Server 18.04. I was able to get through installing everything except php-fpm. It does not appear to be in the package repository even ...
39 votes
4 answers
188k views

How to configure Apache to run PHP as FastCGI on Ubuntu 12.04 via terminal?

I'm relatively new to the world of unix command line web server management/administration. Many hosts with control panel administration options allow you to change how PHP is run with a simple option....
1 vote
0 answers
3k views

PHP-FPM error log /var/log/fpm-php.www.log Which system user writes the file?

PHP-FPM error log is saved to /var/log/fpm-php.www.log. Which system user writes to this file? The file permissions are set to this: $ sudo chmod 666 /var/log/fpm-php.www.log I would like to change ...
2 votes
1 answer
150 views

Upgrade php-fpm package without restarting service

I've looked around here and the manual pages for apt-get, apt, and dpkg. I would like to upgrade the php-fpm package without triggering an immediate restart of the service. I realize of course that a ...
2 votes
1 answer
2k views

How to set up PHP-FPM on Apache?

I have a server with Ubuntu 18.04 and PHP 7.2 My site is with Drupal 8 How to set up PHP-FPM on Apache? I find only tutorial for NGINX or are outdated.
4 votes
2 answers
11k views

PHP-FPM Constantly Restarting Pools - Zombie's Everywhere!

After a recent incident in which I ran chown -R root:root on my entire /var directory on accident, I've been dealing with php-fpm issues. I've tried fixing permissions in a number of ways with no ...
1 vote
0 answers
261 views

PHP FPM crashes server

I have a LAMP stack on a droplet with all the latest specs. My PHP FPM settings: pm.max_children = 45 pm.start_servers = 15 pm.min_spare_servers = 15 pm.max_spare_servers = 20 I have 4GB memory and ...
1 vote
1 answer
316 views

Version agnostic PHP-FPM restart

This is how I restart PHP-FPM in Debian oriented systems: /etc/init.d/php7.0-fpm restart Is there a version agnostic way? All ways I tried from here (besides the one above), failed.
6 votes
2 answers
19k views

PHP-FPM eating memory & Creating many Pools

I set up my nginx with php-fpm. Each vhost has its own unix-socket and separate POOL. But the problem is that php-fpm is creating 7 thread for each config pool that I created in /etc/php5/fpm/pool.d/ ...
1 vote
1 answer
2k views

Error while installing phpmyadmin package in ubuntu 14.04 [closed]

root@anonymous-20-a213l:~# apt-get -y install phpmyadmin Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may ...
2 votes
0 answers
1k views

php5-fpm tuning - why do I have too many sleeping php-fpm processes?

So I recently went from Apache2 with mod_php to Apache2 with fastcgi and php5-fpm. (still same prefork module). But I am not sure if we have configured php5-fpm properly. We don't run a website but it ...
2 votes
1 answer
2k views

Can logrotate suffer race conditions?

I have a PHP application that can generate quite a lot of log information. I'd like to use logrotate to make sure these logs don't get out of hand over time. However, I'm concerned about race ...
3 votes
1 answer
3k views

How to allow php5-fpm to execute user files without implicitly changing permissions every time?

I recently switched to Ubuntu. One of the tools I frequently used was XAMPP. When I installed LAMP stack on Ubuntu I noticed a major performance increase and was quite please with it. However, after ...

1 2 3
4
5
53