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.

PHP initially stood for Personal Home Page but as it evolved into a full-fledged server-side language, it was renamed with a recursive title "PHP Hypertext Pre-processor".

The languages uses a syntax simliar to conventional C, but it has its own set of functions.

Being a server-side language, PHP cannot receive user inputs. However, inputs sent from a program such as a web browser can be received by PHP on the server.

After PHP version 5, the language became truly object-oriented. Other languages that fall into the same category include

  • ASP (Active Server Pages) - a more Windows-oriented language.
  • JSP (Java Server Pages)

From the inception, PHP has been used with MySQL for building database applications. Both being open-source tools, have made the duo like bread and butter. However, in recent years, more DB platforms have got popular with PHP and these include MS-SQL Server, PostgreSQL and more.

2646 questions
302
votes
6 answers

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
  • 15,416
236
votes
2 answers

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 official repositories (using apt-get). I'm not…
kavisiegel
  • 2,517
224
votes
7 answers

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 are three) this is how I found the files $ sudo…
Michael
  • 2,351
206
votes
7 answers

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?
184
votes
4 answers

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

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 where apache, phpMyAdmin and co are configured…
dibs
  • 3,539
158
votes
4 answers

Installing PHP 5.6 on Xenial (16.04)

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 to install it from this repo, however when It try…
Nikolai
  • 1,683
157
votes
8 answers

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
  • 1,703
145
votes
3 answers

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
  • 10,135
124
votes
9 answers

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 twice as fast as PHP 5.6 Significantly reduced…
hg8
  • 13,582
113
votes
14 answers

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 here. If you need anymore information, please contact…
102
votes
2 answers

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. How should I proceed?
fosslinux
  • 3,881
99
votes
11 answers

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
  • 1,357
99
votes
5 answers

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 below : PHP 5.5.19-1+deb.sury.org~precise+1 (cli)…
PHPLover
  • 1,807
94
votes
5 answers

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: su 3: apt-get install php5 4: apt-get install…
Farukh
  • 1,063
  • 1
  • 8
  • 13
86
votes
8 answers

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 root root 4096 2011-04-26 00:50 ../ -rwxr-xr-x …
umpirsky
  • 3,852
1
2 3
99 100