Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Networks and Servers using Beaglebone

You're reading from   Building Networks and Servers using Beaglebone Set up and configure a local area network and file server by building your own home-based multimedia server

Arrow left icon
Product type Paperback
Published in May 2015
Publisher
ISBN-13 9781784390204
Length 110 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
William Pretty William Pretty
Author Profile Icon William Pretty
William Pretty
Glenn Vander Veer Glenn Vander Veer
Author Profile Icon Glenn Vander Veer
Glenn Vander Veer
Arrow right icon
View More author details
Toc

Installing PHP5


Our web-based file browser is a PHP application. Therefore, our next task is to install PHP5 and PHP-FPM. PHP-FPM is a daemon process that runs a FastCGI server on port 9000. The init script for this application is stored at /etc/init.d/php5-fpm/php.ini.

To install these two programs, enter the following command:

apt-get install php5-fpm php5

Configuring Lighttpd and PHP5

To enable PHP5 in Lighttpd, we must modify /etc/php5/fpm/php.ini and uncomment the line cgi.fix_pathinfo=1:

;http://php.net/cgi.fix-pathinfo
;cgi.fix_pathinfo=1

Remove the semicolon present at the beginning of the previous line.

The Lighttpd configuration file for PHP /etc/lighttpd/conf-available/15-fastcgi-php.conf is suitable for use with spawn-fcgi. However, we want to use PHP-FPM; therefore, we create a backup of the file (named 15-fastcgi-php-spawnfcgi.conf) and modify 15-fastcgi-php.conf, as follows:

  1. cd /etc/lighttpd/conf-available/

  2. cp 15-fastcgi-php.conf 15-fastcgi-php-spawnfcgi.conf

  3. nano 15-fastcgi-php...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image