Page 1 of 1

Does Pi supports PHP?

Posted: Tue Feb 25, 2014 4:06 am
by lilzz
I like to know if Pi can support PHP?
Or I need compile the PHP source codes targeting arm V6 processor.

Re: Does Pi supports PHP?

Posted: Tue Feb 25, 2014 5:47 am
by rpdom
PHP is supported on the Pi, both on command line (php5-cli) and web server (libapache2-mod-php5).

Re: Does Pi supports PHP?

Posted: Tue Feb 25, 2014 2:26 pm
by lilzz
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?

Re: Does Pi supports PHP?

Posted: Tue Feb 25, 2014 4:04 pm
by ghans
Did you already install php ( via "sudo apt-get install package-name") ? rpdom has already mentioned
the names of the respective PHP packages.

ghans

Re: Does Pi supports PHP?

Posted: Tue Feb 25, 2014 5:35 pm
by rpdom
Yes, for command line usage you will need to install the "php5-cli" package.

Re: Does Pi supports PHP?

Posted: Tue Feb 25, 2014 6:09 pm
by lilzz
rpdom wrote:Yes, for command line usage you will need to install the "php5-cli" package.

failed to fetch deb7u4_armhf.deb

Re: Does Pi supports PHP?

Posted: Tue Feb 25, 2014 6:13 pm
by rpdom
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.

Re: Does Pi supports PHP?

Posted: Wed Feb 26, 2014 6:09 am
by lilzz
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.

Re: Does Pi supports PHP?

Posted: Wed Feb 26, 2014 6:39 am
by rpdom
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.