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
298 votes
5 answers
1.1m views

Where are the Apache and PHP log files?

I've installed Apache, PHP, and MySQL on Ubuntu 10.10 desktop edition, and it's working fine. Except I have no clue where to look for Apache or PHP log files.
Stann's user avatar
  • 15.1k
235 votes
2 answers
321k views

How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release?

I am trying to update to install PHP 5.5, 5.6 or 7.0 in Ubuntu 12.04/14.04/16.04 LTS, and I can only get PHP 5.3.10 for Ubuntu 12.04, PHP 5.5.9 for Ubuntu 14.04 or PHP 7.0.4 for Ubuntu 16.04 using ...
kavisiegel's user avatar
  • 2,507
220 votes
7 answers
951k views

Find the correct php.ini file

I am currently trying to locate the correct php.ini file to edit it and restart apache so the changes will take place and I'm stumped. I have found three different php.ini files (no idea why there ...
Michael's user avatar
  • 2,303
206 votes
7 answers
583k views

How do I install curl in php5?

I currently have PHP 5.3 installed with Apache in 10.04 Lucid. How can I add the PHP Curl libraries? Do I need to install any other dependencies for curl?
Darren Newton's user avatar
182 votes
4 answers
598k views

How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04? [duplicate]

I am trying to revert my PHP version to 5.6 from 7 and though I removed PHP 7 and then installed PHP 5.6 I still seem to be running version 7. Is there a simple method for moving through PHP versions ...
dibs's user avatar
  • 3,489
158 votes
4 answers
536k views

Installing PHP 5.6 on Xenial (16.04) [duplicate]

I need to use php5 (5.6) because I'm working on a Drupal 7 project which doesn't support php7. The problem is I recently updated to ubuntu 16.04 Xenial which seems to no longer support php5. I tried ...
Nikolai's user avatar
  • 1,683
156 votes
8 answers
705k views

How to install PHP `mbstring` extension in Ubuntu?

What is the PHP mbstring extension, and what is the best way to install it on Ubuntu 14.04?
Rohit Bind's user avatar
  • 1,693
145 votes
3 answers
406k views

What is the easiest way to enable PHP on nginx?

What is the easiest way to enable PHP on nginx on Ubuntu 12.04? Best solution is the one that request minimal work, ideally just a package installation :)
sorin's user avatar
  • 9,868
123 votes
9 answers
531k views

How to install PHP 7?

PHP 7 came out yesterday and I would like to give it a try. PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as Improved performance: PHP 7 is up to ...
hg8's user avatar
  • 13.5k
113 votes
14 answers
354k views

Mcrypt extension is missing in 14.04 server for mysql

The php mcrypt extension on ubuntu 14.04 shows that it is installed properly, but phpmyadmin says: The mcrypt extension is missing. Please check your PHP configuration. My current php config is ...
matthapkidokarate's user avatar
101 votes
2 answers
376k views

Can't find httpd.conf

I have installed Ubuntu 14.04 on a laptop and installed apache 2 (version 2.4.7) and PHP 5. I cannot find httpd.conf. I need to change it because when I try to open a .php page I see a download box. ...
fosslinux's user avatar
  • 3,821
97 votes
5 answers
603k views

How do I upgrade PHP version to the latest stable released version?

I'm using a system running on Ubuntu 12.04 LTS 64-bit OS. I'm currently using following PHP version on this machine: Command used to get the below info at terminal : php -v Details I got are as ...
PHPLover's user avatar
  • 1,787
95 votes
10 answers
665k views

How to completely remove PHP?

I need to clean up my server from PHP 5.3 packages (there are plenty of them) in order to be able to compile PHP 5.2. What is the easiest/safest method to get rid of them all?
corev's user avatar
  • 1,317
94 votes
5 answers
517k views

How to solve the phpmyadmin not found issue after upgrading php and apache?

Recently I have install the PHP, Apache, MySQL, phpMyAdmin, python in my Ubuntu Desktop 12.04.3 LTS to use it as a LAMP server. The commands I used to install these are given below: 1: sudo passwd 2: ...
Farukh's user avatar
  • 1,063
86 votes
8 answers
238k views

Global Installation of Composer (manual)

I followed composer manual (global installation of composer (manual)) to install composer on Ubuntu. $ ll /usr/local/bin/ total 4760 drwxr-xr-x 2 root root 4096 2012-03-29 08:29 ./ drwxr-xr-x 10 ...
umpirsky's user avatar
  • 4,050
77 votes
12 answers
182k views

How to have two versions of PHP installed and switch easily between them?

I want to have both PHP 5.2.17 and PHP 5.3.5 installed on my Ubuntu machine and switch as per my necessity. How can I achieve this?
Debiprasad's user avatar
75 votes
7 answers
242k views

How to have my PHP Send mail?

I installed Ubuntu 11.04, LAMP using tasksel. I find that PHP mail() does not work. I suppose I need to enable it or something? How do I do that?
JM at Work's user avatar
  • 1,965
71 votes
7 answers
212k views

Upgrade to 16.04. php7 not working in browser

I just upgraded from 14.10 to 16.04 and am not sure how to configure PHP 7 in apache. I did modify the php7.0.conf file to uncomment that last lines, restarted apache2 and no change. Do I need to ...
David Wright's user avatar
70 votes
7 answers
382k views

PHP script not executing on Apache server

I have just reinstalled Apache and PHP5 but when I visit my doc root it just downloads a "download" file. And when I try documentroot/index.php it just downloads the PHP file. I have PHP installed ...
user2919631's user avatar
68 votes
1 answer
187k views

Upgrade to the specific php 7.1/7.2 from php 7.0 in Ubuntu 16.04 [duplicate]

How can I upgrade to php 7.1 from php 7.0 in ubuntu 16.04 ? If I do a php -v I get this message: PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, ...
Michele Carino's user avatar
55 votes
2 answers
520k views

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? [duplicate]

I am using ubuntu 13.10 on evaluation board and my internet is not working. Also i need to install softwares and apt-get install is also not working. Terminal says : E: Unable to fetch some archives,...
mong cape's user avatar
  • 559
54 votes
2 answers
300k views

Can't install php5 on Ubuntu 16.04

so I've recently installed my first Ubuntu, to be precise, a daily build of 16.04, on my new laptop since the hardware was to new for 15.10. Now I'm in the process of setting it up and I want to ...
user529857's user avatar
48 votes
5 answers
212k views

default permissions for /var/www

I was trying to open a file and write to it with PHP at /var/wwwfolder but it wasn't working so I did sudo chmod 777 /var/www now I want to set the permissions for /var/www to the default. what are ...
Hossein Hosseinvand's user avatar
46 votes
12 answers
88k views

How to upgrade PHPmyAdmin [revisited]

This question was asked previously, How to upgrade PHPmyAdmin The answer given was sudo apt-get update sudo apt-get install phpmyadmin or sudo apt-get update sudo apt-get upgrade The version of ...
Dwight Wilbanks's user avatar
41 votes
7 answers
340k views

How do I remove PHP 7 Completely?

I have upgraded PHP old version to latest php7 but unable to start its services. systemctl restart apache2.service Job for apache2.service failed. See "systemctl status apache2.service" and "...
Ramesh Chand's user avatar
  • 7,264
39 votes
4 answers
187k 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....
Evan Mattson's user avatar
37 votes
5 answers
181k views

Install PECL packages on ubuntu

I've tried it a 100 times I'm really new to Ubuntu and ended with a bunch of error that I don't even understand can any one please help me?? Here is what I did: I installed PHP I installed libcurl ...
maniteja's user avatar
  • 481
36 votes
4 answers
192k views

Installing PHP 5.3 in Ubuntu 14.04

I've just installed Ubuntu 14.04 and am trying to install php 5.3. But when I run apt-get install php5 it's installing php 5.5.9-1ubuntu4. I need to use php 5.3 in the system because the ...
Chathruaka Waas's user avatar
35 votes
10 answers
81k views

What are some good PHP editors? [closed]

I'm currently using PhpStorm by Idea JetBrains, but its buggy and I'm really looking for something that will allow me to get work done without too much hassle. Please limit one IDE/Editor an answer.
35 votes
4 answers
34k views

add-apt-repository throws Python error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5

Trying to install the latest PHP5 packages and so I add the repo ( sudo add-apt-repository ppa:ondrej/php5) I need and this is the outcome: Traceback (most recent call last): File "/usr/lib/...
James Heald's user avatar
34 votes
3 answers
257k views

PHP OpenSSL extension has a package?

I know that OpenSSL extension is in PHP source, but I can't enable it when I perform apt-get install php5. There is not even a apt-get install php5-openssl. How I must proceed?
Tasso Evangelista's user avatar
32 votes
2 answers
60k views

How to update/upgrade PHP 7.2 to latest version safely?

I am running a WordPress website over LEMP stack server on Ubuntu 18.04 on DigitalOcean. WordPress is recommending me to update my PHP to the latest version. I am running PHP 7.2.17; Please tell me ...
Brajmohan Kumar's user avatar
31 votes
1 answer
104k views

How do I enable the mod_rewrite Apache module for Ubuntu 11.04?

In other linux like CentOS, it works but i am not getting it running in Ubuntu 11.04. /var/www/html/folder/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module ...
user avatar
30 votes
4 answers
135k views

php-mcrypt package missing in Ubuntu Server 18.04 LTS

Is the php-mcrypt package missing in Ubuntu Server 18.04 LTS? apt install php-mcrypt Reading package lists... Done Building dependency tree Reading state information... Done Package php-mcrypt is not ...
Andrea Rossetti's user avatar
29 votes
5 answers
85k views

Cannot get mcrypt for PHP5

I've done this many times: sudo aptitude install php5-mcrypt sudo apache2ctl restart aptitude says mcrypt is installed. I've reinstalled it 3 times already. I've restarted apache about 20 times ...
webDeveloperDave's user avatar
27 votes
4 answers
29k views

When will PHP 5.6 be in the official Canonical repos?

I imagine it won't up until 14.10 is released, but even if that is the case, could we expect to see it show up in the repos that 14.04 uses?
rm-vanda's user avatar
  • 3,176
27 votes
6 answers
65k views

How to enable event MPM Apache 2.4 on Ubuntu 14.04 with thread safe PHP?

I upgraded to Ubuntu Server 14.04 expecting the default apache installation would use the new event MPM, but instead I find the old memory-eating prefork. I've successfully set up event MPM in Arch ...
Towerman's user avatar
  • 373
26 votes
2 answers
21k views

what happened to json_encode in 13.10 php?

Just updated to saucy 13.10 and json_encode is missing from the bundled php. json doesn't appear in the phpinfo() output and i'm getting this error in my app: PHP Fatal error: Call to undefined ...
Chris DaMour's user avatar
25 votes
5 answers
113k views

phpmyadmin throws a 404 on opening

I have installed php5 and phpMyAdmin from the Ubuntu Software Centre on a fresh install of Ubuntu 13.04. when I enter localhost in my browser the following is displayed: It works! This is the ...
Simon's user avatar
  • 4,813
25 votes
4 answers
92k views

Unable to install PHP 7.3 on Ubuntu 20.04

I want to install PHP 7.3 on Ubuntu 20.04 for my Nginx web server, when I try to install the 7.4 version everything is fine but for 7.3 I get the following error: E: Unable to locate package php7.3 ...
Farshad's user avatar
  • 361
25 votes
1 answer
14k views

Apache virtualhosts no longer working after update to 13.10

I updated my kubuntu to 13.10 today and my virtualhosts that worked perfectly before are no longer working. the s2ensite and a2dissite commands claim "site xxxxxx does not exists" even the files are ...
redanimalwar's user avatar
  • 1,550
24 votes
2 answers
244k views

How do I completely remove phpmyadmin?

I messed up my phpmyadmin, I haven't logged in phpmyadmin for a while and as a result I forgot my password. I decided to purge PHPMyAdmin: sudo apt-get purge phpmyadmin I did get some error ...
blade19899's user avatar
  • 26.7k
24 votes
3 answers
89k views

Install PHP5 on Ubuntu 18.04

I have an old PHP tool running which is not easily adaptable to PHP7. So I have to run PHP5 on my server. How can I install PHP5 on Ubuntu Bionic Beaver?
rubo77's user avatar
  • 32.4k
24 votes
3 answers
92k views

Update server php version to 5.4.10 via the command line

Im setting up a vps for the first time from scratch, the host has a one click LAMP installer which took out allot of the leg work, but running phpinfo(); i found im running 5.3.10. So id like to ...
sam's user avatar
  • 313
24 votes
2 answers
30k views

PHP and Apache2 broken after upgrade to Ubuntu 16.04

I've been having a lot of trouble fixing up the remains of my server after upgrading to Xenial yesterday. PHP apps run as a mess of code, and ownCloud 'can't be found on the server' anymore. It may ...
Nectar's user avatar
  • 1,969
23 votes
2 answers
43k views

Ubuntu php5-fpm unix socket

I have Ubuntu 11.10 and installed php5-fpm and I want to configure nginx. I want to use unix sockets instead of tcp sockets but I couldn't find the /var/run/php5-fpm.sock I have looked also /tmp/...
Gok Demir's user avatar
  • 333
22 votes
2 answers
196k views

Install php extensions in ubuntu 16.04

I need to install the following extensions with PHP 5.6 and Ubuntu 16.04, but ubuntu only installs extensions for PHP 7. Trying to install these extensions produces the following error: Installing PHP ...
Jonathan Rodriguez's user avatar
22 votes
9 answers
66k views

Install laravel 5 on Ubuntu 16.04

Anyone installed laravel 5 on Ubuntu 16.04? I've just switched to Ubuntu 16.04 and I'm trying to install laravel 5 framework on it using composer. But every time I try to create a project it gives ...
Mohammad Barhoush's user avatar
22 votes
1 answer
60k views

Ubuntu 16 php5.6 gd extension

I'm running ubuntu 16 and I'm trying to install php5.6 extension GD. I understand that php5.6 isn't available anymore in the default ubuntu repo's. I followed How can I downgrade from PHP 7 to PHP 5....
Stephan Celis's user avatar
22 votes
4 answers
58k views

Upgrade to the latest PHP version in Ubuntu

I am using NextCloud in my server and NextCloud informs me that: You are currently running PHP 7.0.32-0ubuntu0.16.04.1. Upgrade your PHP version to take advantage of performance and security ...
yaylitzis's user avatar
  • 731

1
2 3 4 5
52