lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Does Pi supports PHP?

Tue Feb 25, 2014 4:06 am

I like to know if Pi can support PHP?
Or I need compile the PHP source codes targeting arm V6 processor.

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Does Pi supports PHP?

Tue Feb 25, 2014 5:47 am

PHP is supported on the Pi, both on command line (php5-cli) and web server (libapache2-mod-php5).

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: Does Pi supports PHP?

Tue Feb 25, 2014 2:26 pm

rpdom wrote:PHP is supported on the Pi, both on command line (php5-cli) and web server (libapache2-mod-php5).
I typed which php on command line , nothing found. How do I invoke it on command line?

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Does Pi supports PHP?

Tue Feb 25, 2014 4:04 pm

Did you already install php ( via "sudo apt-get install package-name") ? rpdom has already mentioned
the names of the respective PHP packages.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Does Pi supports PHP?

Tue Feb 25, 2014 5:35 pm

Yes, for command line usage you will need to install the "php5-cli" package.

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: Does Pi supports PHP?

Tue Feb 25, 2014 6:09 pm

rpdom wrote:Yes, for command line usage you will need to install the "php5-cli" package.

failed to fetch deb7u4_armhf.deb

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Does Pi supports PHP?

Tue Feb 25, 2014 6:13 pm

lilzz wrote:failed to fetch deb7u4_armhf.deb
Probably an out of date package index. Try

Code: Select all

sudo apt-get update
sudo apt-get install php5-cli
If it fails, please post all of the messages reported.

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: Does Pi supports PHP?

Wed Feb 26, 2014 6:09 am

rpdom wrote:
lilzz wrote:failed to fetch deb7u4_armhf.deb
Probably an out of date package index. Try

Code: Select all

sudo apt-get update
sudo apt-get install php5-cli
If it fails, please post all of the messages reported.
It failed. It's looking at http://mirrordirector.raspbian.org/rasp ... ts/wheezy/
but there are no php5-cli packages

it couldn't find the packages it wanted.

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Does Pi supports PHP?

Wed Feb 26, 2014 6:39 am

lilzz wrote:
rpdom wrote:If it fails, please post all of the messages reported.
It failed. It's looking at http://mirrordirector.raspbian.org/rasp ... ts/wheezy/
but there are no php5-cli packages

it couldn't find the packages it wanted.
There may be other important messages in there. We can't work out what the problem is with no information.
It should be looking for pool/main/p/php5/php5-cli_5.4.4-14+deb7u7_armhf.deb in the Rasbian Wheezy repo.

Return to “General discussion”