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)

138
votes
2answers
172k 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 ...
73
votes
5answers
130k 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?
69
votes
11answers
11k 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 ...
48
votes
2answers
69k 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 :)
35
votes
3answers
89k 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.
31
votes
5answers
69k 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 ...
26
votes
5answers
73k 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?
23
votes
2answers
16k 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
1answer
12k 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 ...
22
votes
10answers
25k 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
8answers
33k 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 ...
17
votes
2answers
44k 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 ...
17
votes
5answers
22k 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?
16
votes
1answer
24k 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
2answers
29k 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 ...
14
votes
2answers
62k 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 ...
14
votes
5answers
57k 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
7answers
33k 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
5answers
29k 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 ...
12
votes
4answers
8k 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
24k 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
38k 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
339 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
2answers
997 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
3answers
17k 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 ...
10
votes
1answer
6k 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: ...
9
votes
1answer
15k 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 ...
9
votes
2answers
13k 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
2answers
3k 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
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
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
24k 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
8
votes
2answers
602 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
9k 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
2answers
26k 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: ...
7
votes
2answers
17k 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
17k 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
3answers
29k 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 ...
7
votes
4answers
14k views

downgrade php5 5.5.3 to php5 5.3 in ubuntu 13.10

I just upgraded to ubuntu 13.10.. I was working on a project that uses php 5.3 and now phpmyadmin is not working and when i try to open a page i see a ton of warning and the sign in page doesnt sign ...
7
votes
1answer
3k 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
4answers
29k 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
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
4answers
32k 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 ...
6
votes
2answers
2k 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
10k 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
3answers
26k views

Default file permissions for php user www-data

I have a php installed on my ubuntu machine. The web root is /var/www I set the permissions for this folder like so: sudo chown -R ftpuser:www-data /var/www ftpuser is the user I set up so I ...
6
votes
1answer
10k views

Installing Roundcube Web Server, gave date and time error while checking PHP configuration

Installing Roundcube Web Server, gave date and time error while checking PHP configuration. I am trying to configure the webamil using roundcube. Below is the details. pop / smtp service is working ...
6
votes
2answers
30k 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 ...
6
votes
3answers
17k views

Downgrade PHP Version from 5.5 to 5.4 on Ubuntu 14.04

First time I've ever needed to ask a question here that I don't think has already been answered. I've recently been working on transferring over a vBulletin site I run to a new server. Thinking that ...
6
votes
3answers
1k views

Can I run Rails and PHP servers from same machine?

I have a Ubuntu box 10.04 that already has a LAMP stack configured on it. I would like to play around with Rails on this machine as well. Is there a way I can install Rails without messing up the PHP ...