Forum

Make a live CD with hiawatha/php7/joomla based in FatDog64

Complete Noob
9 March 2016, 13:01
Hi folks... I have tried to get things straight on my own for a few days now. First i did a success installation of xampp with php7 and joomla that supports it, but it all became to bloated, fat and heavy. Just xampp blew up to become just as big as the distro itself.

So i abandoned xampp and are hellbendt to get this up and going with Hiawatha. And that works all fine with the .conf as seen further down.

So first i try to get PHP 7 up and going. But i can not even get that straight...

Is it just to remove the # on line 51 from this:

#CGIhandler = /usr/bin/php-cgi:php

to this?

CGIhandler = /usr/bin/php-cgi:php

Here is my config file:
# Hiawatha main configuration file
#

# VARIABLES
# With 'set', you can declare a variable. Make sure the name of the
# variable doesn't conflict with any of the configuration options.
# The variables are case-sensitive and cannot be redeclared.
#
#set LOCALHOST = 127.0.0.0/8


# GENERAL SETTINGS
#
ServerId = webuser
ConnectionsTotal = 1000
ConnectionsPerIP = 25
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log


# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
}
#
#Binding {
# Port = 443
# TLScertFile = ssl/hiawatha.pem
# Interface = 127.0.0.1
# MaxRequestSize = 2048
# TimeForRequest = 30
#}


# BANNING SETTINGS
# Deny service to clients who misbehave.
#
#BanOnGarbage = 300
#BanOnMaxPerIP = 60
#BanOnMaxReqSize = 300
#KickOnBan = yes
#RebanDuringBan = yes


# COMMON GATEWAY INTERFACE (CGI) SETTINGS
# These settings can be used to run CGI applications.
#
#CGIhandler = /usr/bin/perl:pl
#CGIhandler = /usr/bin/php-cgi:php
#CGIhandler = /usr/bin/python:py
#CGIhandler = /usr/bin/ruby:rb
#CGIhandler = /usr/bin/ssi-cgi:shtml
#CGIextension = cgi
#
#FastCGIserver {
# FastCGIid = PHP5
# ConnectTo = /var/lib/hiawatha/php-fcgi.sock
# Extension = php
#}


# URL TOOLKIT
# This URL toolkit rule was made for the Banshee PHP framework,
# which can be downloaded from http://www.banshee-php.org/
#
#UrlToolkit {
# ToolkitID = banshee
# RequestURI isfile Return
# Match ^/(css|files|fonts|images|js)($|/) Return
# Match ^/(favicon.ico|robots.txt)$ Return
# Match [^?]*(\?.*)? Rewrite /index.php$1
#}


# DIRECTORY SETTINGS
# You can specify some settings per directory.
#
#Directory {
# DirectoryID = static
# Path = /css, /fonts, /images, /js
# ExpirePeriod = 2 weeks
#}
#
#Directory {
# DirectoryID = files
# Path = /files
# ShowIndex = yes
# StartFile = index.html
# ExecuteCGI = no
#}


# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = 127.0.0.1
WebsiteRoot = /var/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log


# VIRTUAL HOSTS
# Use a VirtualHost section for each website you want to host.
#
#VirtualHost {
# Hostname = www.my-domain.com
# WebsiteRoot = /var/www/my-domain/public
# AccessLogfile = /var/www/my-domain/log/access.log
# ErrorLogfile = /var/www/my-domain/log/error.log
# TimeForCGI = 5
# UseFastCGI = PHP5
# UseToolkit = banshee
# UseDirectory = static, files
#}
Complete Noob
9 March 2016, 13:20
I know the .conf is not ready for joomla, but i need to take things step by step as i create a live CD for each "goal" that is achieved for others to download and use. This is why I start off with just getting PHP7 straight first :-)
Complete Noob
9 March 2016, 13:38
In /usr/bin/ there is a file called php-cgi7.0

/usr/lib/php
/etc/php
etc/apache2/conf-available/php7.0-cgi.conf

There are the places i find "PHP stuff" in the entire filesystem.
Complete Noob
9 March 2016, 13:52
A better list and overview of PHP files

php7.0-cgi.conf /etc/apache2/conf-available/php7.0-cgi.conf
php /etc/php
.application_x-php /etc/xdg/rox.sourceforge.net/sendTo/application_x-php
php-cgi7.0 /usr/bin/php-cgi7.0
php7.0 /usr/libcgi-bin/php7.0

And then lots of php files in /usr/share and those i do not believe is of any importance?


Complete Noob
9 March 2016, 13:58
Just so its clear... i have tried to read the "how to" and googled a lot for days trying various solutions, but it comes out wrong ALL the time. I hope there is someone else that are willing to share their knowledge on the first step and that is to get php to cooperate with hiawatha and verify that somehow. Then a remaster will be made and with that i proceed with the next step and that is to get joomla to work on top of that. Some will now claim that joomla does not support PHP7 and that is correct, unless you use nightly build. The same goes for Wordpress.

Complete Noob
9 March 2016, 14:08
My objectives:

What i want to make is not a server as in a normal server that is hooked up to the internet serving 24/7 as this website is. I want to have a server where people can log into it by using hostapd in order to become a wlan hotspot. And this might seem useless to many, but its very handy and useful in parts of the world where interenet is a scarce resource, not available or very expensive.

My aim is to have a system where the joomla is organizing educational material, like free educational stuff that are gathered online, but made available offline. The general idea is to have 4 distroes that are all covering the 4 kinds of hardware, 32bits for very old computers, 32 bits for newer computers and 32 bits with PAE for more than 3gb ram.

Now i am working on the 64 bits version and its a formidable challenge to me, so please Hugo... Do have patience with me.

I could install some ready made solutions for Puppy and publish that, but i rather do it the hard way and create it from the bottom as i need to understand this and I also want it to be the latest version of everything at least in the 64 bits version.
Hugo Leisink
9 March 2016, 17:50
First, you need to make sure you have the php-cgi binary installed. You mentioned having a php-cgi7.0 binary in /usr/bin. Change your CGIhandler setting to
CGIhandler = /usr/bin/php-cgi7.0:php

In every virtual host you want to run PHP scripts, you have to set ExecuteCGI to 'yes'. That makes Hiawatha execute PHP scripts via the /usr/bin/php-cgi7.0 binary.
VirtualHost {
...
ExecuteCGI = yes
}

You can of course also set the ExecuteCGI setting for your default website.
Complete Noob
9 March 2016, 19:02
Is the virtual host something i can skip as i only want to run one server locally? No more than localhost.

And Hugo... thanks for this answer. I will try now to work my way out of the 403 wall i am facing trough google etc :-)
Complete Noob
9 March 2016, 21:00
The "Also set 'HTTPAuthToCGI = yes' in the virtual host configuration." in "HOWTO Url rewrite rules is te reason i thought this was needed. But i figure its not...
Hugo Leisink
10 March 2016, 10:27
Yes, just use those settings in the default website, as explained here.
This topic has been closed.