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.

learn more… | top users | synonyms (2)

147
votes
2answers
187k views

How do I install latest PHP in supported Ubuntu versions (like 5.4.x in Ubuntu 12.04)?

I am trying to update to php 5.4 in Ubuntu 12.04, and I can only get 5.3.6 using official repositories (using apt-get). I'm not really sure how to do a manual update – I'm sorta new to ubuntu, but I ...
91
votes
5answers
169k 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?
71
votes
12answers
13k views

What's the easiest way to set up a LAMP stack?

I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be ...
55
votes
2answers
85k 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 :)
42
votes
3answers
121k 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.
38
votes
5answers
88k 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 ...
37
votes
8answers
71k 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 ...
27
votes
5answers
86k 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?
24
votes
1answer
13k 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 ...
24
votes
2answers
18k 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 ...
23
votes
10answers
31k 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.
22
votes
2answers
92k 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. What I have done... I have found three different php.ini files ...
22
votes
5answers
28k views

How to have two version of PHP installed and switch easily?

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?
17
votes
2answers
53k 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 ...
16
votes
1answer
27k 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 ...
15
votes
5answers
37k 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 ...
15
votes
2answers
32k views

Can't use PHP extension Mcrypt in Ubuntu 13.10 (Nginx, PHP-FPM) [duplicate]

I installed a fresh Ubuntu 13.10 on my laptop. Like I usually do, I install the packages I need for Web development, which are nginx, php5-fpm, mysql, php5-mysql, php5-mcrypt and a few others. After ...
15
votes
5answers
63k views

How to downgrade from PHP 5.4 to 5.3

Recently I upgraded PHP to 5.4, but it seems to be failing on me because APC isn't working with it, however this gave me no choice but to downgrade to 5.3, how can I do this? I executed apt-get ...
13
votes
8answers
35k views

php is not working well on ubuntu 13.10 and mcrypt is missing in phpmyadmin

I've upgraded from UBUNTU 13.04 to 13.10 but I can not work with php pages or phpmyadmin . I've tried this way to install lamp on ubuntu sudo apt-get install lamp-server^ phpmyadmin and I've done all ...
12
votes
4answers
9k views

Install Apache, Php, Mysql latest versions not available via apt

I need to install the latest versions of apache, php and mysql that are available on their websites, but the problem is that apt repositories don't have these updates versions yet. Versions that I ...
11
votes
4answers
26k views

How to update to PHP 5.3.10 in 10.04?

I'm new to Linux and have only the basic experience with Ubuntu and installing LAMP Server. I've successfully installed all using the "apt-get install" method. My problem is I want to update PHP 5.3.2 ...
11
votes
3answers
18k views

Installing APC. Use pecl or apt-get?

I have seen guides that use apt-get install php-apc and guides that use pecl install apc. Is one method better then the other? Or is just two different methods of installing the same thing? What is ...
11
votes
3answers
41k views

PHP not working in Apache2 after system upgrade

Recently upgraded my system from Karmic to Lucid. This involved Apache and PHP being updated I believe. Now my server is unable to handle PHP files, any navigation to them is triggering downloading ...
11
votes
1answer
8k views

How to set environment variable before running script inside hooks/install?

I am create a simple charm to get my symfony2 webapp from git and deploy it on ec2. After getting the source from git, I want to run composer to resolve dependencies but I keep getting this error: ...
11
votes
1answer
367 views

Strange POST requests to my Ubuntu server - am I in trouble?

I have an Ubuntu Server 12.04 installed on a VM. This server has apache2-mpm-prefork and libapache2-mod-php5 installed. I was looking through the logs and recently came across these rather ...
10
votes
3answers
44k 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: ...
10
votes
1answer
17k 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 ...
10
votes
2answers
1k views

Can a server handle simultaneous shell commands?

I'm writing a very simple browser based MP3 player in PHP. Part of this project requires that every MP3 file is converted to a WAV file. There's a function in PHP called shell_exec that allows you to ...
10
votes
5answers
52k views

how to remove symbolic link

i was doing sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin but i accidentally typed something else. So now I want to correct it but it says symbolic link already exist. Please help, Thanks in ...
10
votes
3answers
44k 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 ...
10
votes
2answers
4k views

What does .: mean in php include_path?

I'm trying to install Zend on a machine running xampp. Zend's help file says that in order to set up the command-line tools, I need to make sure that the contents of the /library directory are placed ...
9
votes
2answers
14k 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 ...
9
votes
4answers
5k views

How to rollback to PHP 5.2?

I have just installed a 10.04 LTS on my development server but the system that I need to run on it (Magento ecommerce) is not compatible with PHP 5.3 which ships with the newest version of Ubuntu. Is ...
8
votes
4answers
36k views

How to compelety 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. I am wondering what is the easiest/safest method to get rid of them all? Thanks
8
votes
6answers
26k views

Unable to set password for the mysql “root” user

I am new to Ubuntu. I am running Ubuntu 12.10. I am trying to install apache,php,mysql. However I have installed apache and it is running perfectly. sudo apt-get install apache2 But when I tried to ...
8
votes
4answers
2k views

Ubuntu One Oauth login from PHP

I have searched the whole internet trying to find a simple example that could point me in the right direction, but no luck, so here comes my questions: I want to log into Ubuntu One and sync (or ...
8
votes
2answers
619 views

Can I use a desktop install as a server?

I'm new to Linux and Ubuntu is my first distribution. I have chosen Ubuntu because I want to learn more about Linux. I'm under time constraints and need to setup a server as soon as possible. I have ...
8
votes
1answer
10k views

How to set up PHP with Nginx, APC and PostgreSQL?

I use Ubuntu Server 10.10 and I would like to set up a web server environment with NginX, PHP 5.3.3, PostgreSQL and preferably APC and PHP Suhosin. I have already set up PostgreSQL with apt-get ...
7
votes
3answers
4k 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?
7
votes
2answers
18k views

I cannot save php.ini in ubuntu 12.04

I want to change the upload_max_filesize = 2M to 50M, then I started edit on php.ini, but when try to save it, it displays error message below Could not create a backup file while saving ...
7
votes
1answer
22k 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 ...
7
votes
2answers
25k views

How can i install php 5.5 in ubuntu [duplicate]

How can i replace 5.3 with php 5.5 un ubuntu.I tried in google and failed to find repository. Please help me
7
votes
2answers
16k views

Sending mails with PHP, LAMPP and PostFix

I've been trying for 2 whole days now, and I just can't get the most simple thing to work. The problem: Sending eMails from PHP to my eMail address does not work I've been working with Windows and ...
7
votes
1answer
7k views

php5-imap on Ubunut 14.04 is not enabled

After apt-get install php5-imap I still have to manually do php5enmod imap which seems odd and inconsistent. Is there any particular reason for this?
7
votes
1answer
4k views

php-pear is not working after upgrading to Ubuntu 14.04 [closed]

After upgrading to Ubuntu 14.04 php-pear is failing to install any packages. sudo pear install --alldeps --force pear.phpunit.de/PHPUnit downloading PHPUnit-4.0.17.tgz ... Starting to download ...
6
votes
2answers
2k views

PHP 5.4 interactive mode on Ubuntu 12.04

I'm a big fan of PHP interactive mode (php -a). Today I decided to install PHP 5.4 to play around a little bit. It's fun to use the new built-in server and all that stuff, but I was very sad when I ...
6
votes
3answers
28k 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, so I purge it like so: sudo apt-get purge phpmyadmin. I did get some error messages asking ...
6
votes
2answers
3k views

Keep getting mails about xdebug

I'm running Oneiric as a LAMP development server, and have xdebug installed. It works fine, but since I set up my email so that root mails are forwarded to my gmail, I keep getting the following: ...
6
votes
2answers
12k views

Manually Start LAMP Server

I setup a LAMP server on my desktop Ubuntu install for testing web applications. How do I set it to only run when I tell it to rather than at startup? It is not used as a production web server but ...
6
votes
2answers
15k 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 ...