Table of Contents - Astroblahhh GLMP-GTK 1.0 Readme


See Also: Some Puppy Linux Basics (local file)

Or online, and possibly more up to date:
Some Puppy Linux Basics



Readme for

Astroblahhh GLMP-GTK 1.0
for Ubuntu-Based Puppy Linuxes and Slacko Puppy

Readme Last Edited: April 28, 2013
First Released: April 28, 2013

Caution: Contains Mostly Old Versions of Software


Almost a GLAMP or LAMP software bundle, with PHP** 5.2.17 and MariaDB** 5.3.12 ("a drop-in replacement for MySQL"**), but no included web server.


Also contains, among other things:

  • PHP-GTK** 2.0.1


  • The SQLite** serverless database software. PHP 5.2.17 comes with two versions of SQLite by default:

    SQLite 3.3.7 - Used by PHP's PDO_SQLITE features.

    SQLite 2.8.17 - Used by PHP's sqlite functions.

    SQLite can be used with both PHP-CGI (the CGI or web version of PHP) and PHP-CLI (the command line version of PHP).

    PHP-CLI is what runs PHP-GTK, and it also lets you use the PHP interactive shell, which is similar to the interactive shell in Python** or J**.


  • Example scripts: PHP**, PHP-GTK**, Perl**, and Python**, plus helpful tips.

  • FreeType** 2.4.11


    Works in these Ubuntu**-based Puppy Linuxes**:
    Lucid Puppy 5.2.8 versions 004 and 005 - Three Headed Dog 5.2.8 version 005 - Precise Puppy 5.4.3 - Puppy Studio 3.3 - Lucid Puppy 5.2

    Also works in: the Slackware**-based Slacko Puppy 5.3.3, and hopefully other Puppies I haven't tried


    .pet** and .sfs** packager, and author of this readme and various included scripts
    (mostly in Bash** or Perl**, but some in PHP** and Python**):

    Apollia of Astroblahhh.Com

    I offer goods and services,
    and I also welcome donations and/or microdonations.

    Request Free/Libre/Open Source Software or Documentation,
    or Ask Programming Questions




  • Copyright Notice

    The documentation I wrote and many of the scripts I wrote that are included in this package are under the GNU General Public License v3.0. There are also short, simple scripts by me which are in the public domain.

    Other things in this package that aren't by me are under other licenses - see License Info and Icon Info.

    The below copyright notice only applies to things by me, except things in the public domain.


    Copyright (C) 2013 Apollia

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


    Contact info: http://astroblahhh.com/contact-apollia.shtml

    A copy of the license is included in the section titled GNU General Public License.



    GNU General Public License

    GNU General Public License v3.0 - Home Page

    The documentation I wrote and many of the scripts I wrote that are included in this package are under the GNU General Public License v3.0. There are also short, simple scripts by me which are in the public domain.

    Other things in this package that aren't by me are under other licenses - see License Info and Icon Info.


    Why did I choose the GNU General Public License (GPL) rather than the GNU Free Documentation License (GFDL) for the documentation I wrote?

    Because the terms in the GFDL about invariant sections made me uneasy. I didn't want modified versions of this page possibly acquiring unremovable new sections. If people want to use or modify relatively small parts, I want them to be free to do so without having to also reproduce the entirety of all the invariant sections too.



    Warning: Many Security Holes Have Been Found in Web Servers and Database Servers in General, and in PHP, and Astroblahhh GLMP-GTK Uses Lots of Old Versions of Software

    So, It's Best to Avoid Being on the Internet While Running Your Web Server or Database Server

    Web server authors, database server authors, and programming language authors do their best - but, with any kind of programming at all, it's terribly easy to make mistakes, and new security holes are discovered all the time.

    Those security holes are generally plugged in updated versions of the software.

    However, one problem with Astroblahhh GLMP-GTK is that it uses old versions of software. It uses PHP** 5.2.17 because, as far as I know, no more recent version of PHP works with the latest version of PHP-GTK** - 2.0.1 - and Astroblahhh GLMP-GTK uses MariaDB** 5.3.12 for the silly reason that I found struggling with learning how to compile a later version of MariaDB with CMake** to be too much trouble.

    Also, Astroblahhh GLMP-GTK assumes you're going to just use the Hiawatha** web server that's installed in your Puppy Linux** - and that is most likely not the most recent version of Hiawatha.


    In the configuration files I included for Hiawatha and MariaDB, I attempted to make it so by default, Hiawatha and MariaDB are hopefully local only and thus will hopefully block all outside access from random people on the internet - but, I don't even know how to properly test that (I can't even figure out how to browse my own web server from another computer on my own network), and I'm worried that I might've accidentally done it wrong, so, please be careful.

    The safest thing to do (and what I recommend) would be to avoid running Hiawatha and MariaDB while you're connected to the internet.

    Security holes can be extremely severe, like this PHP security hole. And I assume Astroblahhh GLMP-GTK's PHP 5.2.17 is probably vulnerable to that, even though I wasn't able to figure out how to replicate the exploits described in that page. (I'm still quite far from being an expert on Linux, security, or computers in general.) And there are quite likely many other security holes.

    I definitely don't recommend taking the risk of running possibly misconfigured old versions of Hiawatha and MariaDB while connected to the internet, but if you do, please be extremely careful.

    If there's ever any important security-related news related to Astroblahhh GLMP-GTK, I'll point it out on the Astroblahhh GLMP-GTK home page:

    http://astroblahhh.com/software/glmp-gtk


    If you're only interested in the PHP-GTK desktop software part of Astroblahhh GLMP-GTK and don't need or want PHP for the web, nor a database server such as MariaDB, you should probably download the Astroblahhh PH-GTK package instead. With that, you can still do database stuff with the serverless SQLite**.



    Warning: Any Software Can Be Dangerous

    See: Warning: Any Software Can Be Dangerous** in the file Some Puppy Linux Basics**



    What is Astroblahhh GLMP-GTK?

    (A general introduction. Other sections are more detailed and technical.)


    Astroblahhh GLMP-GTK is a package of software for people interested in:


    If you need to actually run a web server or database server on your computer to serve stuff to random folks on the internet, I recommend NOT using Astroblahhh GLMP-GTK - see the above warning. Sorry, I don't know what would be best for that.

    I recommend Astroblahhh GLMP-GTK for local software development only, and it's safest to be disconnected from the internet while you're running your web server or database server.

    If you don't need to develop web software, nor database software for a database that runs on a server (like MariaDB or MySQL), and are only interested in PHP-GTK desktop software (and possibly using a serverless SQLite database), you'd be better off downloading Astroblahhh PH-GTK instead of Astroblahhh GLMP-GTK.


    Astroblahhh GLMP-GTK doesn't contain the newest PHP available, but instead PHP 5.2.17, because that's the newest one I know of that works with the newest version of PHP-GTK, 2.0.1.

    Astroblahhh GLMP-GTK also doesn't contain the latest database software. It has SQLite 2.8.17 and SQLite 3.3.7 because those are what came with PHP 5.2.17, and it has MariaDB 5.3.12 simply because that was the latest version that didn't make me learn how to use CMake** to compile it.

    Astroblahhh GLMP-GTK doesn't contain any web server software, and assumes you already have the Hiawatha** web server installed, because most Puppy Linuxes** do, including all of the Puppies I've seen Astroblahhh GLMP-GTK work in.


    This release of Astroblahhh GLMP-GTK was created in Lucid Puppy 5.2.8 version 004. It works in that and other Ubuntu**-based Puppy Linuxes, and somehow also works in the Slackware**-based Slacko Puppy 5.3.3. It didn't work in everything else I tried so far.

    Astroblahhh GLMP-GTK can be installed either with an .sfs file, or a .pet file. (If you don't know what those are, see What is a .pet file?** and What is an .sfs file?** in the file Some Puppy Linux Basics**.)

    .pet and .sfs files in general both have their advantages and disadvantages - see Why use a .pet file rather than an .sfs file, or vice versa?**



    About the Name

    I almost named this package something long and cumbersome:

    php-cli-and-cgi-5.2.17-with-php-gtk-2.0.1-and-mariadb-5.3.12-and-freetype-2.4.11--made-in-lucid-puppy-5.2.8-4--package-version-1.0-i686

    Then I saw in the PHP License that I couldn't use PHP**'s name in the name of my project without permission. So, I had to change the name, which I guess was probably for the best.

    So, this package became:

    Astroblahhh GLMP-GTK


    The GTK part of the name comes from the fact that Astroblahhh GLMP-GTK contains PHP-GTK** 2.0.1.

    That makes it so you can create PHP software with native Linux graphical user interfaces (GUIs) using GTK+. ** It's similar to WinBinder in Windows**. (The WinBinder FAQ explains how PHP-GTK and WinBinder compare to each other.)


    The GLMP part of the name Astroblahhh GLMP-GTK is basically inspired by GLAMP, which is a name for any AMP software bundle for Linux (also known as GNU/Linux**).

    This page from GNU.org says it would be fairer to call LAMP packages GLAMP, so, I decided to name this package GLMP-GTK instead of just LMP-GTK.

    One example of an AMP you might have already heard of is XAMPP**.


    GLAMP typically stands for:


    Astroblahhh GLMP-GTK doesn't include any web server software such as Apache or Hiawatha**, hence it's called GLMP, rather than GLAMP or GLHMP.

    Astroblahhh GLMP-GTK is intended to work with the Hiawatha web server, and it is assumed you're installing Astroblahhh GLMP-GTK in a Puppy Linux** which already has Hiawatha, but all Astroblahhh GLMP-GTK contains is a short custom Hiawatha config file.


    Also, instead of the MySQL database software, Astroblahhh GLMP-GTK has MariaDB**, known as "a drop-in replacement for MySQL". (More comments on MariaDB are below.)

    Astroblahhh GLMP-GTK also contains the tremendously smaller and serverless database software SQLite**, but, that's usually included in any LAMP which has PHP, since PHP generally has SQLite built in by default.


    In Astroblahhh GLMP-GTK's case, the P in GLMP primarily stands for PHP**, but Perl** and Python** also deserve honorable mentions, since the Hiawatha config file included in Astroblahhh GLMP-GTK lets you easily also use Perl and Python scripts on your web server.

    See: Using PHP, Perl, or Python on your Local Web Server

    Astroblahhh GLMP-GTK only really assists in using PHP for GTK** stuff, since I haven't yet figured out how to use Perl and Python to make GTK software. (Haven't tried very hard yet...)


    The Astroblahhh part of the name Astroblahhh GLMP-GTK is simply from the name of my personal website - Astroblahhh.Com.



    What Puppy Linuxes will Astroblahhh GLMP-GTK work in?

    Alas, Astroblahhh GLMP-GTK didn't work in most variants of Puppy Linux** I tried.

    But, with effort, it could be made to work. See: Making Astroblahhh GLMP-GTK Work in Other Puppies


    Happily and to my surprise, this package did work in one Puppy which wasn't Ubuntu Linux**-based: Slacko Puppy 5.3.3, which is based on Slackware Linux**.

    It worked best in Ubuntu Linux-based Puppies like Lucid, Precise, Three-Headed Dog, and Puppy Studio 3.3.

    However, I only tested it briefly in most everything, except Lucid Puppy 5.2.8 version 004, the Puppy I built Astroblahhh GLMP-GTK in - so, my apologies if you run into any problems.


    Astroblahhh GLMP-GTK assumes your Puppy has the Hiawatha** web server already installed (it's not included in the Astroblahhh GLMP-GTK package, though it could have been), and Perl** (which is used by some of the installation scripts).


    This package worked in:This package didn't work in:
    1. Lucid Puppy 5.2.8 version 004 - what I use nearly all the time. It's also the Puppy in which I compiled everything that needed to be compiled.

      However, I'm not sure if Lucid Puppy 5.2.8 version 004 is available to download anymore, since only version 005 is here:

      http://distro.ibiblio.org/puppylinux/puppy-5.2.8/

    2. Lucid Puppy 5.2.8 version 005 - Briefly tested and it seemed to work fine.

    3. Three-Headed Dog 5.2.8 version 005 - Same.

    4. Precise Puppy 5.4.3 - Same.

    5. Puppy Studio 3.3 - Same.

    6. Lucid 525 Retro-2.6.30.5 - Same.

    7. Lucid Puppy 5.2 - Same.

    8. Slacko Puppy 5.3.3 - The only problem I noticed was, shell commands such as rox "/root/Path with Spaces In It/" cause an error message to appear instead of causing the Rox-Filer file manager to open the path. Escaping the spaces doesn't help (whether or not the path is put in quotes).

      But, other than that, the rest seems to work fine. You just won't be able to use some of the convenient folder opener scripts, and after installation, you'll have to open the "Readme and Extras" folder manually.

      It's located in: /root/

    1. Wary Puppy 5.3 - After install, typing php at a shell prompt results in many repetitions of of this error: "php: /usr/lib/libxm12.so.2: no version information available (required by php)" And 1 line saying: php: /lib/libc.so.6: version `GLIBC_2.11' not found (required by php) And 1 line saying: php: /lib/libc.so.6: version `GLIBC_2.11' not found (required by /usr/local/lib/libfreetype.so.6)

    2. Racy Puppy 5.2.2 - Same.

    3. RacyPy 4** - Same.

    4. Quirky Puppy 1.4.2 - Similar. Typing php at a shell prompt results in the same last two error lines that were shown in the previous 3.

    5. Fatdog64-611 - Typing php at a shell prompt results in sh: /usr/local/bin/php: No such file or directory, even though the php file is definitely at that location after the Astroblahhh GLMP-GTK .pet installs.

      Also, Fatdog64-611 doesn't have the Hiawatha web server installed, which Astroblahhh GLMP-GTK assumes is installed. And, Fatdog64-611 doesn't have Perl installed, which is used by some of the installation scripts.

    6. Lighthouse64-5.11 F - Typing php at a shell prompt results in: php: error while loading shared libraries: libreadline.so.6: wrong ELF class: ELFCLASS64

      Lighthouse64 also doesn't have the Hiawatha web server installed, which Astroblahhh GLMP-GTK assumes is installed.

    7. BrunoPup 2.0 - a 4.31 Puppy Linux. The Astroblahhh GLMP-GTK .pet installs but PHP complains about not having "libreadline.so.6". (As of 19:30 02/17/2013, the BrunoPup ISO doesn't seem to be available for download.)

    8. Dpup 485 - Same as what happened with BrunoPup 2.0.

    9. ArchPup 13.2.1 - I couldn't figure out how to make it open and install a .pet.



    Memory Requirements

    The .pet** of Astroblahhh GLMP-GTK installs about 106 MB of files, so if you install the .pet, you'll need at least that much "personal storage space" RAM (if running Puppy in RAM), or else that much space in your Pupsave file or hard disk.

    If you use the .sfs** of Astroblahhh GLMP-GTK, somehow that doesn't use up "personal storage space" RAM, but, just watch out for the various nuisances .sfs files have. (See the .sfs**-related sections of the file Some Puppy Linux Basics**.)



    Making Astroblahhh GLMP-GTK Work in Other Puppies

    For Astroblahhh GLMP-GTK to work in any Puppies it currently doesn't work in, probably all the compiled software in Astroblahhh GLMP-GTK will need to be recompiled using each program's source code (see Package Contents section for links) and the DevX file** for the Puppy in which you want to use Astroblahhh GLMP-GTK.

    I'm unlikely to create Astroblahhh GLMP-GTK packages for other Puppies myself, unless asked, or optionally paid to do it, or unless I begin using a Puppy Linux variant that is incompatible with this Astroblahhh GLMP-GTK package.

    But, you can always build your own GLMP-GTK package, with whatever customizations you like.

    See: How to Compile Software from Source Code**

    Doing that might be a lot less troublesome and difficult than you might think. Before making Astroblahhh GLMP-GTK, I thought it might be difficult and maybe impossible for me to figure out how to do it - but, luckily, it turned out to be surprisingly easy to make. The most difficult, time-consuming thing was writing all this documentation.


    But, if you'd still rather not build your own GLMP-GTK package, you could ask me to do it, either for free, or for donations, or for upfront payment: Request Free/Libre/Open Source Software or Documentation, or Ask Programming Questions


    It should be possible to make variants of Astroblahhh GLMP-GTK that would work in Linuxes other than Puppy, and I might someday make a Windows** version or perhaps even a Mac** version, since I like the idea of being able to write PHP-GTK software that will easily run on multiple platforms.

    But, those will likely be more difficult to make than other Puppy versions of Astroblahhh GLMP-GTK.


    The compiled software in Astroblahhh GLMP-GTK includes: PHP, PHP-GTK, MariaDB, FreeType. And SQLite, but that comes with PHP, so you won't have to compile that separately.

    If your Puppy doesn't have Perl**, you could either install Perl (it's probably contained in your Puppy's DevX file**) just before running your custom GLMP-GTK installer, or replace the handful of Perl installation scripts with ones written in Bash** or some other scripting language your Puppy has.

    And if your Puppy doesn't have the Hiawatha** web server, you can try downloading and compiling it. I haven't tried doing that myself, so, I don't know how easy or difficult that will be.


    If you do compile your own GLMP-GTK package, it would probably be best to call it something other than "Astroblahhh" (even if it includes scripts or other things I wrote myself and included in Astroblahhh GLMP-GTK), since "Astroblahhh" in the name might imply I made your package (since my personal website is Astroblahhh.Com), and I'd prefer not to take the credit (or blame) for other people's work.



    Using PHP, Perl, or Python on your Local Web Server



    How to Install Python and a Full Version of Perl

    Puppy usually doesn't come with Python** built-in, and the Perl** that's built into Puppy is usually a stripped-down version rather than a full version. You can often get by just fine with the stripped-down version of Perl, but not always.

    For how to install Python and a full version of Perl, see:



    Example Scripts

    There are some PHP**, Perl**, and Python** example scripts in the Example Scripts/For Web Server/ folder inside this "Readme and Extras" folder.



    Where to Put Scripts

    First, put the PHP**, Perl**, and/or Python** scripts you want to run somewhere inside this folder:

    /root/Web-Server/

    (Alternatively, you can put symlinks** in that folder pointing at script files or folders in other locations.)

    To go there, you can click the file icon on your Puppy desktop, which will open the /root/ folder, which should contain the Web-Server folder.



    What to Name Your Scripts

    The script's name is going to be used in the script's URL on your web server, so, you should give it a name containing valid URI characters.

    Also, it's best to avoid characters you need to escape, since escaped characters aren't very readable.

    Depending on the kind of script it is, end its filename with either .php, .pl or .py.

    You can also end the filename with .phpg (the filename extension for PHP-GTK scripts) or .phpb (the filename extension I arbitrarily chose for PHP console scripts), since I put a couple lines in the Hiawatha** web server configuration file at /etc/hiawatha/hiawatha.conf to allow that.



    Required File Permissions for Scripts

    To be run by the Hiawatha** web server:

    If the required permissions aren't set, then, Hiawatha will give you a 403 Forbidden error when you try to run those scripts.

    See: How to Set File Permissions**

    The example scripts already have their permissions set properly.



    Disconnect from the Internet Before Turning On Your Servers

    Before turning on the Hiawatha** web server and (if desired) the MariaDB database server, you should disconnect from the internet. (See the above warning for why.)

    Once you're disconnected, you can turn on Hiawatha and/or MariaDB using one (or more) of the scripts in the Web Server Control Scripts/ folder.



    How to Run Scripts

    Once you've placed a script in the /root/Web-Server/ folder, disconnected from the internet and turned on your web server, you can run your script by visiting:

    http://localhost/insert-name-of-your-script-file-here.php or .pl or .py or .phpg or .phpb



    Links to Example Scripts

    Once you've placed the example scripts in the /root/Web-Server/ folder, disconnected from the internet and turned on your web server, you can run the example scripts by visiting these links:

    PHP


    Perl


    Python



    Template Scripts

    I've included some barebones template scripts for all 3 languages, both with and without comments, in Example Scripts/For Web Server/Templates with Comments/ and Example Scripts/For Web Server/Templates/.

    They contain the minimum lines you need to create a working PHP**, Perl**, or Python** web server script, and you can use them as a base for your own scripts.



    Language-Specific Tips

    For tips specific to each language, see:



    Using PHP on your Local Web Server

    Astroblahhh GLMP-GTK installs PHP 5.2.17, which is not the newest version of PHP**, but instead the newest version I know of which works with the newest version of PHP-GTK**, 2.0.1.

    So, you won't need to install anything extra to be able to use PHP on your Puppy's probably built-in Hiawatha** web server.


    Source Code of Example PHP Scripts

    For links you can click to actually run the example scripts, see: Links to Example Scripts

    The following links will let you see the source code of the PHP example scripts included in the Example Scripts/For Web Server/ folder and Example Scripts/For Both Web Server and PHP-GTK/ folder and Example Scripts/For Both Web Server and Console/ inside this "Readme and Extras" folder.

    Once you follow the links, tell your web browser to show you the source. (In the Firefox web browser, you can do that by right-clicking the page and choosing View Page Source.


    See Using PHP, Perl, or Python on your Local Web Server for how to run them.


    The PHP Template Script

    Go to Example Scripts/For Web Server/Templates with Comments/ or Example Scripts/For Web Server/Templates/ for a very short, basic, practically needless template script you can optionally use as a base for your own PHP scripts. With Comments - Without Comments

    It already has the file permissions required for PHP scripts to work in the Hiawatha** web server - Group:Read and World:Read - and it conveniently contains the minimum line that a PHP web server script needs at the top:

    <?php

    The template script omits the ?> closing tag, since it's not required at the end of a script, and there are apparently many sensible reasons to NOT use it at the end of a script.

    (The ?> closing tag is useful in the middle of a PHP script, however. It lets you write whatever text or HTML or JavaScript or whatever other non-PHP output you want in the middle of your PHP script, which can be more readable and convenient than using PHP echo statements to print code in other languages, and then having to escape quotes and so on.)


    If you want to make your own PHP script from scratch rather than using the template, just put <?php at the top, and make sure your file has at least Group:Read or World (or Other):Read permissions. (Which one you need can vary, and I haven't figured out why.)

    And follow the instructions at: Using PHP, Perl, or Python on your Local Web Server



    Using Perl on your Local Web Server

    A stripped-down version of Perl** is already installed by default in most Puppies I've tried, and all of the Puppies I've seen Astroblahhh GLMP-GTK work in. You can often get by just fine with the stripped-down version, but not always.

    If you want or need a full version of Perl rather than a stripped-down version, it's probably in the DevX development tools .sfs file** for your particular kind of Puppy.


    In many Puppies, Perl already works by default in the Hiawatha** web server without installing Astroblahhh GLMP-GTK, as you can see if you try the PPLOG personal blog software that's included with those Puppies. PPLOG might be found in the Personal menu.


    Source Code of Example Perl Script

    For links you can click to actually run the example scripts, see: Links to Example Scripts

    Click the below link to see the source code of the Perl example script included in the Example Scripts/For Web Server/ folder inside this "Readme and Extras" folder.

    See Using PHP, Perl, or Python on your Local Web Server for how to run it.


    The Perl Template Script

    Go to Example Scripts/For Web Server/Templates with Comments/ or Example Scripts/For Web Server/Templates/ for a barebones template script you can optionally use as a base for your own Perl scripts. With Comments - Without Comments

    It conveniently contains the minimum lines that a Perl web server script needs to work. Also, it already has the file permissions required for Perl scripts to work in the Hiawatha web server - World (or Other):Read and World (or Other):Exec.

    You can easily just make a copy of the template.pl file and add to it, rather than making Perl scripts for your web server utterly from scratch.


    Or, to make a Perl script for your web server from scratch, here are the important details:



    Using Python on your Local Web Server

    Python** can be easily installed using a .pet** file, or (probably) the DevX development tools .sfs file** for your particular kind of Puppy.

    I know for sure Python is in the lupu_devx_528-4.sfs DevX for Lucid Puppy 5.2.8 version 004 (and presumably also for version 005) available from: http://distro.ibiblio.org/puppylinux/puppy-5.2.8/

    I usually don't use the DevX, though - so in Lucid Puppy 5.2.8 version 004, I usually use the Python .pet from here: http://distro.ibiblio.org/puppylinux/pet-packages-lucid/Python-2.6-Lucid.pet

    If you use something other than Lucid Puppy, you might have to use a different .pet for your Puppy Linux variant. You could check your Puppy Package Manager (shell command: ppm) or look around in: http://distro.ibiblio.org/puppylinux/

    And, of course, in Linux, there's always the option of compiling (or attempting to compile) from source code and possibly having to fiddle and struggle for a long time with getting that to work. But, fortunately, you actually can get lucky and run into no significant problems doing that - and, it enables you to customize things much more than you can with most precompiled packages. And you might learn a lot in the process.


    Source Code of Example Python Script

    For links you can click to actually run the example scripts, see: Links to Example Scripts

    Click the below link to see the source code of the Python example script included in the Example Scripts/For Web Server/ folder inside this "Readme and Extras" folder.

    See Using PHP, Perl, or Python on your Local Web Server for how to run it.


    The Python Template Script

    Go to Example Scripts/For Web Server/Templates with Comments/ or Example Scripts/For Web Server/Templates/ for a barebones template script you can optionally use as a base for your own Python scripts. With Comments - Without Comments

    It conveniently contains the minimum lines that a Python web server script needs to work. Also, it already has the file permissions required for Python scripts to work in the Hiawatha web server - World (or Other):Read.

    You can easily just make a copy of the template.py file and add to it, rather than making Python scripts for your web server utterly from scratch.


    Or, to make a Python script for your web server from scratch, here are the important details:



    Astroblahhh GLMP-GTK Package Contents,
    with Comments and Tips


    Everything that needed compiling in this package was compiled in Lucid Puppy 5.2.8 version 004 using its DevX file** - lupu_devx_528-4.sfs - which contains numerous development tools such as compilers.

    That DevX is available from:

    http://distro.ibiblio.org/puppylinux/puppy-5.2.8/




    PHP 5.2.17

    Command line (CLI) version and FastCGI (web) version.


    PHP** is a well-known, very popular programming language.

    This is deliberately not the newest version, because later versions I tried didn't work with the latest PHP-GTK** version, 2.0.1.

    I compiled PHP with these options:

    ./configure --with-readline --enable-zip --enable-mbstring --enable-fastcgi --with-mysql=/usr/local --with-mysqli=/usr/local/bin/mysql_config --with-pdo-mysql=/usr/local --enable-ftp --with-gd --with-ttf --enable-gd-native-ttf --with-freetype-dir=/usr/local/lib/

    The above options are explained in greater detail below.


    PHP-CLI (the command line version of PHP) has an interactive shell, similar to the interactive shell in Python** or J**.

    You can start the PHP interactive shell by using the little Bash** script in the Interactive Shells/ folder in the same folder as this Readme, or by typing php -c /etc -a in a console.


    By default, both PHP-CLI and PHP-CGI use the php.ini file at /usr/local/lib/php.ini, but PHP-CLI needs to use the php.ini at /etc/php.ini if you want to use PHP-GTK. The PHP-GTK extension is disabled in /usr/local/lib/php.ini because it causes errors with PHP-CGI.

    The Rox-Filer** run action selector scripts in the Rox-Filer Run Actions/ folder in this "Readme and Extras" folder should take care of the php.ini issues automatically.




    PHP-GTK 2.0.1

    A PHP-CLI extension which makes it so you can create PHP software with native Linux graphical user interfaces (GUIs) using GTK+. **


    PHP-GTK** is similar to WinBinder in Windows**. (The WinBinder FAQ explains how PHP-GTK and WinBinder compare to each other.)

    In the Example Scripts/PHP-GTK folder (in the same folder as this Readme), there are some PHP-GTK example scripts which hopefully can be run just by clicking on them. (They should work that way, if you said yes to the installation of the .phpg MIME type and left its default Rox-Filer** run action alone.)




    SQLite 3.3.7 and 2.8.17

    SQLite** is serverless database software. I didn't include standalone versions of SQLite, just the two versions PHP 5.2.17 comes with by default:

    SQLite can be used with both PHP-CGI (the CGI or web version of PHP) and PHP-CLI (the command line version of PHP).




    MariaDB 5.3.12

    Database software which runs a database server.   "An enhanced, drop-in replacement for MySQL."**


    Last time I used MariaDB** extensively was in 2011, but it did seem to live up to its description in the above quote. I was able to use the exact same Astroblahhh Desktop MySQL databases in both Lucid Puppy 5.2 with MariaDB and Windows XP with MySQL, and as far as I know, this created no problems at all, and worked great.

    In 2011, in Lucid Puppy 5.2, I used an LHMP .pet (though I think it was a different LHMP .pet than the one in the previous link, which has a broken download link, as of March 2, 2013) containing MariaDB and the Hiawatha** web server, and in Windows XP, I used XAMPP** 1.6.3a, with MySQL and the Apache** web server.


    I prefer MariaDB rather than MySQL because of alarming stories like these:


    I used this older version of MariaDB rather than version 5.5.29 because I was too impatient to sit there and struggle to figure out how to use CMake** to compile it.

    So, I picked the next most modern-sounding version available - 5.3.12 - and was relieved to find I could compile it with the usual commands...

    ./configure
    make
    make install

    ...and make clean before recompiling.


    The /root/.my.cnf MariaDB configuration file I included is a slightly modified version of the .my.cnf file displayed here:

    https://kb.askmonty.org/en/running-mariadb-from-the-source-directory/

    I put in the appropriate settings for data= and language= and added skip-networking which I hope makes it impossible for anyone other than your local computer to connect to the database server. (But see the warning above for why you should probably only run your database server and web server while disconnected from the internet.)

    However, it's a very short config file, and I'm not sure it's the best configuration - I don't even know how to judge that. (But, it seems to work fine with my WordsPlatz blog software.)

    MariaDB installed a bunch of example .cnf files at:

    /usr/local/share/mysql/

    Perhaps they would be better in some ways/for some purposes.




    FreeType 2.4.11

    I think FreeType** makes it so the GD** image-making extension in PHP** can add text to images. That's the only reason I included it.




    Directory Structure of "Readme and Extras" Folder



    PHP ./configure Options I Used

    I compiled PHP with these ./configure options:

    ./configure --with-readline --enable-zip --enable-mbstring --enable-fastcgi --with-mysql=/usr/local --with-mysqli=/usr/local/bin/mysql_config --with-pdo-mysql=/usr/local --enable-ftp --with-gd --with-ttf --enable-gd-native-ttf --with-freetype-dir=/usr/local/lib/


    Explanations of the above options:



    My Changes to the php.ini Files

    The included php.ini configuration files differ from the file php.ini-recommended (from the PHP 5.2.17 tar.gz file) in the following ways:



    License Info

    The documentation I wrote and many of the scripts I wrote that are included in this package are under the GNU General Public License v3.0. There are also short, simple scripts by me which are in the public domain.

    Other things in this package that aren't by me are under other licenses - except SQLite**, which is actually public domain.

    See also: Icon Info




    Icon Info

    All of the icons I included in the Astroblahhh GLMP-GTK package were downloaded from IconArchive.com.

    Their licenses all permit usage without requesting permission, so I didn't request permission.


    None of the below are official logo icons for PHP**, Perl**, or Python**.

    I chose the clover icon only for aesthetic reasons. As far as I know, clovers have nothing to do with PHP-GTK**.

    I was inspired to use the blue elephant icon for PHP because of the unofficial elephant logo for PHP: http://www.elroubio.net/ (However, the icon I used isn't from that site - it's by Fast Icon. I prefer its colors and lack of text.)


    Note: .phpb is not an official file extension, as far as I know. I just arbitrarily wanted a separate MIME type for PHP files I wish to use as console scripts, and picked .phpb because when I searched the web, I didn't find anything already using that extension.



    .phpb (PHP Console Script)

    .php

    .phpg (PHP-GTK)

    .pl (Perl)

    .py (Python)



    Note: The "maria_dbs" folder and "Readme and Extras" Folder were installed in /root/, a location which is probably in your RAM disk

    See the section titled Beware of RAM** in the file Some Puppy Linux Basics** for a longer explanation of why this might be a problem.

    Basically, anything in a RAM disk is at great risk of being irretrievably lost, so, anything you want to keep, you should store in a (so-called) permanent storage medium, like a hard disk.

    So, you might want to move the "maria_dbs" folder and "Readme and Extras" folder to a location in a permanent storage medium.


    With the "maria_dbs" folder, you'll also need to put a symlink** at /root/maria_dbs pointing to the new location of the "maria_dbs" folder, so MariaDB** will be able to access your databases at their new location.

    To make that symlink:


    Alternatively, you could put only certain databases in a permanent storage medium, and put symlinks inside /root/maria_dbs/ pointing at those databases' folders' locations on the permanent storage medium.

    But, it's safest to move the whole "maria_dbs" folder to a permanent storage medium and symlink to that, so you won't accidentally create a database in the RAM disk and forget to save that database before shutting down.


    No worries if you accidentally lose the "Readme and Extras" folder. You can always download a fresh copy from:

    http://astroblahhh.com/software/glmp-gtk

    The Readme and Extra folder also contains a fresh copy of the "maria_dbs" folder, consisting only of default databases.

    And, of course, copies of both folders exist inside the Astroblahhh GLMP-GTK .pet** or .sfs**.



    I, Apollia of Astroblahhh.Com, offer goods and services,
    and I also welcome donations and/or microdonations.

    Request Free/Libre/Open Source Software or Documentation,
    or Ask Programming Questions


    Go to top
    Last modified: April 28, 2013
    This page uploaded to web: April 28, 2013