Installing PHP on Raspberry Pi(rate)Box

Posted by Bwana Honolulu 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Installing PHP on Raspberry Pi(rate)Box
October 21, 2015 05:44PM
Greetings everyone! grinning smiley

I recently built a PirateBox from a Raspberry Pi B+ with a TP-Link TL-WN823N using the pre-built image and now tried to customize it with a DokuWiki which means I need to install PHP. My attempts at doing this have failed so far since I can neither find any package manager like APT in the image nor any of the commands like make to build PHP from the source.

I've been told installing PHP on a RasPi is easy, yet... I still have no idea how to do so eye rolling smiley , so I would appreciate some help.
Re: Installing PHP on Raspberry Pi(rate)Box
October 21, 2015 06:21PM
Hi,
the pre-installed image is archlinux. Archlinux has an awesome wiki with alot of help: [wiki.archlinux.org]

The package manager is called "pacman". We are using (roughly) these steps to create the image file.
There you see the packages installed, or should additional be installed.

So connect your Pi via ethernet to the internet, run:

pacman -Sy
pacman -S  php php-cgi php-sqlite imagemagick php-gd

After you managed that, add the following line to
/opt/piratebox/lighttpd/lighttpd.conf

include "/opt/piratebox/conf/lighttpd/fastcgi.conf"

Create the file "/opt/piratebox/conf/lighttpd/fastcgi.conf"
with the following content
#-------------------- FAST CGI stuff

server.modules += ( "mod_fastcgi" )
fastcgi.server = (
        ".php" => ((
                        "bin-path" => "/usr/bin/php-cgi",
                        "socket" => "/tmp/php.socket",
                        "max-procs" => 1
                ))
)

Restart piratebox after that
systemctl restart piratebox

If lighttpd fails to start (consult the commandline tool 'journalctl' ) checkout the file /opt/piratebox/tmp/break.log & error.log which contain error messages from lighttpd.

good luck smiling smiley smoking smiley

Matthias
[


This is only my signature.
Re: Installing PHP on Raspberry Pi(rate)Box
October 21, 2015 06:35PM
Yay, thanks for the quick help, I'm gonna try it later this evening. thumbs up