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)

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 ...
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 ...
6
votes
2answers
29k 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 ...
2
votes
9answers
14k views

How to downgrade PHP from 5.3.x to 5.2.x

I need to downgrade my PHP to 5.2.x from 5.3.x Certain software I currently use requires it. I found all these link explaining how to do it but they no longer work because they show you how to use ...
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?
14
votes
5answers
56k 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 ...
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?
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 ...
22
votes
10answers
24k 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.
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 ...
5
votes
3answers
8k views

Downgrade PHP to PHP5.2?

I want to install PHP 5.2 in Ubuntu 11.04 , I had some script that did that thing good but only on Ubuntu 9, anyone has a script / instructions how to do it?
1
vote
1answer
1k views

Apache / MySql is not running. What is wrong?

I installed lampp / xampp on my Ubuntu 12.04. After installing, Apache and MySQL were running properly. Now, they're not. Here's what I get when I try to run apache: Command: /etc/init.d/apache2 ...
0
votes
3answers
3k views

Php doesn't work on Apache server

I installed LAMP sudo tasksel install lamp-server I can run my site, but the php code is just displayed as text. I have tried this solution, but it didn't help me. When I try to run php script ...
0
votes
2answers
3k views

PHP5.4 Unable to load dynamic library gd.so undefined symbol: gdGetC

I installed PHP5.4 from PPA ppa:ondrej/php5-oldstable in my Ubuntu 12.04.2. Then all of my image processing scripts got broken. Turns out the php5-gd library isn't loaded. $ php -a PHP Warning: PHP ...
48
votes
2answers
68k 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 :)
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 ...
35
votes
3answers
88k 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.
22
votes
8answers
32k 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 ...
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 ...
17
votes
2answers
43k 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 ...
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 ...
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 ...
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 ...
5
votes
2answers
16k views

How can I configure Postfix to send all email through my Gmail account?

I'm trying to send an email through Google from my localhost. (via PHP5.3) But Google keeps on blocking my requests. I tried to follow the solutions given to a few similar questions, but for some ...
0
votes
3answers
125 views

How to access a website under Ubuntu

I am newbie to Ubuntu and trying to migrate from Windows but there is something I can't understand in web developing. In windows I just install the server and make a folder in the www folder or ...
4
votes
1answer
2k views

php 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, I have php installed but it ...
4
votes
1answer
13k views

Easiest way to upgrade php to latest version? [duplicate]

I'm seeing info on how to upgrade from a specific version to another, and that is what I want to do (currently 3.3.6), but is there a simple command to do this? I'm a complete ubuntu/linux noob so I ...
3
votes
3answers
13k 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 ...
3
votes
3answers
37k views

can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' [duplicate]

I just installed appache, MySQL and PHP, suring my installation, I was prompted for a MySQL root user password, but when I start my MySQL, it pops the error, and I just can't seem to find a way around ...
1
vote
4answers
18k views

Install php 5.3 on ubuntu 13.04

How I could install old PHP version on Ubuntu 13.04 (prefer verson 5.3.3)? I appreciate any help.
-1
votes
2answers
1k views

Php broken, “held broken packages” error on install [duplicate]

I've completely destroyed everything and now php wont install. I had php5.4 and everything was great. I then needed to run Magento locally which wasnt working. I saw one of the requirements was ...
5
votes
2answers
3k views

PHP and MySQL not communicating

I have come to the conclusion that my PHP installation and my MySQL installation are not getting along; I’m working on making my first web page that uses MySQL for content, but after two days, man ...
3
votes
2answers
10k views

Ubuntu 13.10 gives “Package 'libapache2-mod-auth-mysql' has no installation candidate” error [closed]

UPDATE: Because Apache 2.4 is the default version (instead of the previous 2.2) this error occurs. However as can be seen here all future versions of Ubuntu 13.10 and above will not support this ...
3
votes
4answers
16k views

Upgrade PHP version to 5.3 on Ubuntu

How can I do a version upgrade from 5.2 to 5.3? php update/upgrade is saying I'm using the latest version. I'm using Ubuntu Server 9.04
1
vote
2answers
1k views

500 Error on index.php file

I have found a question very similar to this, which I thought would solve my problem. However, after changing my .htaccess file, with index.php on the end of the list, and then index.php as the only ...
0
votes
3answers
8k views

phpMyAdmin login problem:

I use Ubuntu 12.04. Recently I have installed XAMPP 1.8.1 in my system. I set password to: XAMPP pages, MySQL/phpMyAdmin, MySQL root and FTP. But after that when I try to login to phpMyAdmin page ...
0
votes
3answers
776 views

Shell Scripting for Linux Server Administration

I recently started learning Linux(Ubuntu), and i'm aware that Linux has it's own form of language i.e Shell Scripting. What i'll like to know is that is this language enough to administer a Linux ...
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?
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 ...
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
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 ...
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 ...
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 ...
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 ...
5
votes
2answers
13k 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 ...
3
votes
1answer
8k views

PhpStorm theme installation

I want to install PhpStorm color scheme from XML. Official PhpStorm's IDE website says To install a theme, download the corresponging xml file, copy to ~/Library/Preferences/RubyMine10/colors/ ...
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 ...
5
votes
6answers
22k 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 ...
5
votes
3answers
2k views

How to create a new file with content using Ubuntu One API and PHP

I'm having some problems when i try to create a new file with some content (or overwrite the content of an existing one) using Ubuntu One API and PHP. I can easily create and empty file or folder ...
3
votes
1answer
8k views

Why php5-fpm is depending of a “sury.org” version of php5-common?

I try to install php5-fpm package but I have this information: The following packages have unmet dependencies: php5-fpm : Depends: php5-common (= 5.5.7+dfsg-1+sury.org~quantal+1) but ...