Wiki with lighttpd (and php)

dolphs

Neuer User
Mitglied seit
26 Sep 2008
Beiträge
18
Punkte für Reaktionen
0
Punkte
0
Hi, I like to install a wiki system, ether DokuWiki or moinmoin, on my fritz 7390.

Therefore can someone guide me please building my own DokuWiki system?
Packages I most likely need to start with are PHP, currently 5.5.22 in freetz trunk, and lighttpd 1.4.35 ...

All should be lightweight as it is meant just for myself, so need to access over SSL or any database.
After compiling these packages in freetz, is there anything else to consider: like where to put webspace or are there any other packages to compile in to make things work?
Should it be just as easy compiling these packages and plumping in in to the dokuwiki-2014-09-29c.tgz file in to " the webspace ", most likely somewhere in " /var/media/ftp/ "

Did a quick search for a howto on this forum, but did not come any closer as holofox is telling he is running his system for some time already ( since 2008 as a matter of fact! ).
Anyway help would be appreciated, thanks!
 
Zuletzt bearbeitet:
Hello

Apache and/with PHP isnt "lightweight".
Therefore i suggest you make it as: External

Steps
1. make menuconfig --> Enable external processing
2. Choose your packets
3. Afterwards goto "Enable external processing" again and choose packets for external
4. Exit'n'Save menuconfig
5. make
6. Flash firmware and upload external image to USB-Storage
7. ...have fun

Also i suggest for your WiKi an installation with SQLite3 support.
...this can be done at everytime, because apache (htdocs) if configured well is on USB-Storage. ;)

:silly:
BTW apologies screwing up the thread as apache should have been lighttpd obviously, maybe mod can update?
This can also be done by yourself.

Steps
1. Edit Post #1
2. Klick on "Erweitert"
3. Change Title from "apache" to "lighthttpd"
4. save
 
Zuletzt bearbeitet:
thanks for your response, the external part I am familiar with and that is also why I am so happy using freetz in combination with the 7390.
Yet I like to add a wiki option as it has 512Mb ram, of which I am using currently just 26Mb.
Anyway basically I should RTFM @ DokuWiki as it self-explanatory, however I should consider building in SQLite3 support as well.
This is something I did not do yet as I thought DokuWiki would not make use of it, but maybe it is better to have things stored in a database instead of plain files.
As said I will not create tons of articles with multimedia, mostly plain text to keep track of my brain waves, so it it not all over the place and no cloud is not an option ... thanks
 
So once installed/flashed freetz you also able to use static binaries.
For a working webserver with allmost full working PHP as an example.
This forum has a member (radislav) with a own website for Fritz!Box called www.fritzmod.net
...there are a fine collection of needed binaries. ;)

Myself use a full featured busybox httpd and php-cgi (look at last line of signature).
For this...
sas_alle_01.jpg
...and other things.
 
Zuletzt bearbeitet:
thanks again answering, will check out the site.

Meanwhile exploring lighttpd and it came to my attention some paths are a bit strangly set initially, eg
Web server - /var/www/htdocs/ while that is in tmpfs, so I guess it is needed to copy these files for example to " /var/media/ftp/htdocs " ( which is in nand flash ):

ilesystem Size Used Available Use% Mounted on
/dev/root 12.1M 12.1M 0 100% /
tmpfs 53.5M 2.3M 51.1M 4% /var
dev 53.5M 20.0K 53.5M 0% /dev
/var/dev/nand 512.0M 34.9M 477.1M 7% /var/media/ftp


Please note I created a compress directory and htdocs in www, thus outside of external.
Just to avoid problems when the external dir gets cleaned once upgrading freetz ;)

drwxrwxr-x 1 ftpuser users 2048 Mar 10 07:37 .
drwxr-xr-x 3 root root 80 Jan 1 1970 ..
drwxrwxrwx 1 root root 2048 Jan 1 1970 FRITZ
drwxr-xr-x 1 root root 2048 Mar 10 07:30 external
drwxr-xr-x 1 root root 2048 Mar 10 07:37 www
drwx------ 1 root root 2048 Jan 1 1970 lost+found

mkdir -p /var/media/ftp/www/
mkdir/var/media/ftp/www/htdocs
cd /var/media/ftp/htdocs
cp -R /var/www/htdocs/* .

- Updated Web Server, Document Root location in freetz
- No visual hosts
- Allow listing of Directory contents ( UTF8 )
- No SSL support
- Basic authentication access support
- Activated mod_cgi (files *.cgi and in /cgi-bin executable
- Activated mod_fastcgi for PHP (files *.php executable)
? Not sure if I need to compile in ruby-cgi support
- Activated mod_compress (Cache dir must be configured)
- Activated status display (URLs must be configured
- Activated JavaScript for sorting of status display

As said very first attempt to success, will look in to it in more depth following days. thanks so far!
 
Hello

Good start.
Very important for your WiKi is the implantation of PHP.
Therefor look how lighthttpd needs to be configured for that.

As an Example how easy that is with busybox httpd
I hope there is a similar way for lighthttpd...
busybox httpd.conf (Line for PHP)
Code:
# mime-types
.xhtml:application/xhtml+xml        # xhtml ;-)
.xml:application/xml            # extended markup language (XML)
.xsl:application/xml+xsl        # extended markup language (XML-Transformation)
.dtd:application/xml+dtd        # extended markup language (XML-DocTypeDefinition)
.svg:image/svg+xml            # scalable vector graphic
.swf:application/x-shockwave-flash    # shockwave flash
.oga:audio/ogg
.wav:audio/wav
.ogv:video/ogg
.ogg:video/ogg
.mp4:video/mp4
.txt:text/plain
.csv:text/plain
.cfg:text/plain
.conf:text/plain
.ini:text/plain
.log:text/plain
.sh:text/plain
.phps:text/plain            # PHP as delivered Sourcecode
# externals
[COLOR=red]*.php:/var/media/NEW_LINK/mips/php.sh     # run xxx.php through an interpreter[/COLOR]
*.cgi:/bin/sh                # :-)
*.lua:/var/media/NEW_LINK/mips/lua.sh    # :-)
*.pl:/var/media/NEW_LINK/mips/microperl # :-)
The mimetypes are very important for busybbox httpd.
The Skript php.sh starts/works with: php-cgi

Thats the key for a WiKi with PHP and a SQLite3 Database.
dokuwiki_koywiki_01.jpg
I installed it yesterday to see how easy it is. ;)
...but it is sensed slow, maybe lighthttpd is faster?

Perhaps, cause i dont know it, in your case its enough for lighthttpd that the php binary is in the searchpath.
I mean the environment variable: PATH
This is the case when you typing php or php-cgi in a TTY (Console, SHELL) and PHP gives you a message output.
php-cgi -v
Code:
PHP 5.5.6 (cgi-fcgi) (built: Dec 9 2013 14:56:47)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
...than its easy for you too. ;)

But it seems you have to configure mod_fastcgi in order to run PHP over lighthttpd.
 
Zuletzt bearbeitet:
OK indeed, after extracting the gzipped tar ball to " /var/media/ftp/www/htdocs/websites "
A new directory called dokuwiki appears and after restarting lighttpd the installer became accessible at: " http://fritz.box:83/dokuwiki/install.php ".
To resolve the permission problems I quickly did a chmod 777 -R, however once I will redo the whole exercise will look in to it more thoroughly as 777 is a bit too much ;-).

By the way mod_fastcgi for PHP (files *.php executable) is activated already, so I should be good.
Also executing " php-cgi -v " shows, so that is more evidence things are looking ok :

@fritz7390:/var/media/ftp/www/htdocs/websites/dokuwiki# php-cgi -v
PHP 5.5.22 (cgi-fcgi) (built: Mar 9 2015 20:42:44)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies


After creating some pages it indeed is incredibly slow and did not expect that.
Also limited the php processes to 3 but does not seem to help, high cpu load even when just accessing a page.
pity, thought it was leightweight but not that light as it appears ...
 
Zuletzt bearbeitet:
Yes, i think the WiKi Framework is not optimized for lightweight. ;)

The SensorAndSwitch project for example is incredible fast, with PHP and SQLite3.
...but it is not a CMS or WiKi.

I searched for another WiKi and found a funny JavaScript based one (clientside): TiddlyWiki
...works also without a server and is fast as your client (webbrowser, CPU). ;)
 
Zuletzt bearbeitet:

Zurzeit aktive Besucher

Statistik des Forums

Themen
244,695
Beiträge
2,216,692
Mitglieder
371,315
Neuestes Mitglied
jack-mack
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.