My Blog (version 1.69)
Subscribe to New Releases

Please read everything but visit our forum or email me at support@fuzzymonkey.net if
(1) you do not understand
(2) you get it running (so I can check it out, put up a link to your site, and let you know when important releases come out)

If you wish to support us, please consider switching your web hosting to us. We provide strong, inexpensive individual accounts as well as powerful, managed or unmanaged dedicated servers. Also, if you have trouble getting My Blog installed, remember that we provide free installation, configuration, and support for our clients. More info here.
In this README:
REQUIRES
SUMMARY
FEATURES
DISTRIBUTION / LICENSE
INSTALLATION WITH SHELL ACCESS
INSTALLATION WITH FTP ACCESS
GETTING RSS FEED TO WORK
HOW TO USE
TROUBLESHOOTING
CHANGES
TODO
REQUIRES    back to top
  • 1. web server (tested on apache 2.2 on UNIX and LINUX)
  • 2. Perl (tested with 5.8.6).
  • 3. ImageMagick is optional.
  • 4. HTML::BBCode and HTML::Entities - included in this package.
  • 5. MySQL/DBI is optional.
  • SUMMARY    back to top
    This blog script will quickly and easily allow you to post articles and comments for your readers to keep up with. You can select an image to go along with your entry and even attach files. Your readers can also leave comments on entries they feel strongly about. RSS feed generated automatically, and CSS makes custom formatting easy.
    FEATURES    back to top
  • HTML validates as HTML 4.01 Transitional HTML.
  • Readers can leave comments about your posts.
  • Picture is automatically resized when uploaded.
  • RSS feed generated automatically.
  • Valid CSS makes customizing format and style easy.
  • Admin gets emailed when visitors leave comments.
  • Post to your blog from your email or cell phone. You can even attach pictures taken with your camera phone. This feature is still being tested.
  • Specify how many blog entries to display on one page.
  • Plugins available for use with My Calendar, My Photo Gallery, Show Blog Referrers, Due Date Countdown. More coming!
  • You set how many characters from each entry are posted on front page. The full entry is viewable by clicking "Read More" link. You can also set to view all on front page.
  • Full Admin Control Panel makes setup easy. Edit or delete your blogs or your settings from here.
  • Visitors can subscribe based on categories
  • My Blog will track where your hits come from by logging unique referrers.
  • DISTRIBUTION / LICENSE    back to top
    This software is released under the GPL. Please see the included LICENSE file. Copyright (C) 2003 Erin Spiceland 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Use this script at your own risk! I make no warranties that it is hack proof!
    INSTALLATION WITH SHELL ACCESS    back to top
    1. Upload the .zip or .tar.gz file directly into your cgi-bin directory. Almost all folders will be created automatically for you. Do this on commandline:
    $ unzip filename.zip        *** or***
    $ tar -zxvpf filename.tar.gz
    2. Check your permissions. Your directory structure will now look like this. Listed out to the side are the permissions for each file. If you used the tar.gz file, your permissions will automatically be set, because tar saves them. If you used the zip file, you will need to set these permissions yourself. A quick way to do this is with the following:
    $ chmod 755 *.cgi *.pl protected/*.cgi plugins/*.pl
    blog/comments.cgi-rwxr-xr-x-chmod   755
    blog/data/entries.dat-r-wr--r---chmod   644
    blog/data/comments/drwxr-xr-x-chmod   755
    blog/data/referrers.dat-rw-r--r---chmod   644
    blog/data/subscriptions.dat-rw-r--r---chmod   644
    blog/lib/drwxr-xr-x-chmod   755
    blog/lib/BBCode.pm-r-wr--r---chmod   644
    blog/lib/common.pm-r-wr--r---chmod   644
    blog/lib/Entities.pm-r-wr--r---chmod   644
    blog/lib/flatfile.pm-r-wr--r---chmod   644
    blog/lib/imagemagick.pm-r-wr--r---chmod   644
    blog/lib/lang.pm-r-wr--r---chmod   644
    blog/lib/mysql.pm-r-wr--r---chmod   644
    blog/lib/plugins.pm-r-wr--r---chmod   644
    blog/lib/sitevariables.pm-r-wr--r---chmod   644
    blog/index.cgi-rwxr-xr-x-chmod   755
    blog/LICENSE-r-wr--r---chmod   644
    blog/plugins/drwxr-xr-x-chmod   755
    blog/plugins/baby.pl-rxwrx-rx--chmod   755
    blog/plugins/baby.pm-r-wr--r---chmod   644
    blog/plugins/calendar.pl-rxwrx-rx--chmod   755
    blog/plugins/calendar.pm-r-wr--r---chmod   644
    blog/plugins/photo.pl-rxwrx-rx--chmod   755
    blog/plugins/photo.pm-r-wr--r---chmod   644
    blog/protected/drwxr-xr-x-chmod   755
    blog/protected/post.cgi-rwxr-xr-x-chmod   755
    blog/protected/manage.cgi-rwxr-xr-x-chmod   755
    blog/post_template.html-r-wr--r---chmod   644
    blog/post_from_email.pl-rwxr-xr-x-chmod   755
    blog/README.html-r-wr--r---chmod   644
    blog/search.cgi-rwxr-xr-x-chmod   755
    blog/subscribe.cgi-rwxr-xr-x-chmod   755
    blog/SPECIAL-NOTES.txt-r-wr--r---chmod   644
    blog/referrers.cgi-rwxr-xr-x-chmod   755
    blog/template.html-r-wr--r---chmod   644
    blog/upgrade-1.66-to-1.67.sql-r-wr--r---chmod   644

    3. Make sure all these files are owned by the right user. If you are on a server that is not your own, you are most likely ok. Ask your system administrator if you think you may need to change the ownership of these files. If you are on your own webserver, sometimes you will have to change the ownership to "apache" or "nobody" to get the scripts to run. Do this with:
    $ chown apache:apache * -R
    4. Move the "blogdata" folder outside the cgi-bin. Most webservers will not show pictures that are in the cgi-bin directory, so you will need to move the "blogdata" folder outside the cgi-bin to hold your pictures. After you move it, make sure to change the setting in the admin script to reflect the correct paths to the new location of the folder (htmlpath).

    5. Edit the settings to suit your needs. There are also two very important things in the settings that affect how your icon displaying will work. Make sure $htmlpath, and $htmlsystempath are correct for your server's directory structure. They should point to a directory NOT inside your cgi-bin directory where images and files will be stored. Change your settings at http://www.yourdomain.com/cgi-bin/blog/protected/manage.cgi. Remember to password protect the "protected" folder so others cannot tamper with your data and settings.

    6. Choose your language. My Blog is automatically set up to use English. If you are using another language that is already supported by My Blog, just rename your appropriate language file to be named "lang.pm," like this:
    $ cd lib/
    $ cp francais.pm lang.pm
    cp: overwrite 'lang.pm'?  y
    $ cd ../

    If you do not see a file with the name of your language, it is not supported yet. If you end up creating your own language file for a language that My Blog does not already have, please send me a copy of your lang.pm named according to its language (francais.pm, not french.pm, please). To create your own, open "lib/lang.pm" and only change phrases that are between quotes. If you change anything else, like the "our" or the phrase following $ , which makes up the variable name, you could break the script. Example:
    our $comments = "Comments"; # English
    our $comments = "Commentaires"; # French
    7. You may need to modify the first line of index.cgi, subscribe.cgi, comments.cgi, post_from_email.pl, the plugin scripts, protected/post.cgi, and protected/manage.cgi to point to where perl is located on your server. Basically, its just pound, exclamation point, then the path to the perl executable.
    #!/usr/bin/perl (most common, and the default for this script)
    #!/usr/local/bin/perl
    8. Password protect the "protected" directory, so others cannot post to your blog. If you are on a UNIX or Linux server, you can use htaccess to do this. Contact your system administrator or google for "htaccess" to find out how. Also, no matter what kind of server you are on, you may have a tool in your control panel to password protect files and directories. I cannot stress how important it is that you password protect the posting portion of this script. Because this script is open source, meaning anyone can see my code, anyone who has used this script will know how to access the post script. Your only hope for security is to password protect it.

    9. To use any of the plugins that come with My Blog, enable them in the administration panel and add the appropriate html tag to your template file. The admin panel will tell you exactly what to put wherever you want the plugin displayed. For instance, if you want to use the photo plugin that works with My Photo Gallery, add a tag to your template that looks like this: <!-- photo -->

    10. If you are using MySQL you will need to set up your mysql tables. You can do this by executing the following command on commandline, or using the structure in makemysqltables.sql, you can create them manually through phpMyAdmin or another MySQL tool.
    $ cd public_html/cgi-bin/blog/
    $ mysql -u username -p databasename < makemysqltables.sql
    INSTALLATION WITH FTP ACCESS    back to top
    1. Unzip or untar the archive file into a directory on your computer.

    2. Move the "blogdata" folder outside the cgi-bin. Most webservers will not show pictures that are in the cgi-bin directory, so you will need to move the "blogdata" folder outside the cgi-bin to hold your pictures. After you move it, make sure to change the setting in the admin script to reflect the correct paths to the new location of the folder ($htmlpath).

    3. Edit the settings to suit your needs. There are also two very important things in the settings that affect how your picture uploading and displaying will work. Make sure $htmlpath, and $htmlsystempath are correct for your server's directory structure. They should point to a directory NOT inside your cgi-bin directory where images and files will be stored. Change your settings at http://www.yourdomain.com/cgi-bin/blog/protected/manage.cgi. After you do this, you will need to create the directories you specified as the directories to hold the pictures and create a folder inside that directory named "big." Remember to password protect the "protected" folder so others cannot tamper with your data and settings.

    4. Choose your language. My Blog is automatically set up to use English. If you are using another language that is already supported by My Blog, just rename your appropriate language file to be named "lang.pm," like this:
    $ cd lib/
    $ cp francais.pm lang.pm
    cp: overwrite 'lang.pm'?  y
    $ cd ../

    If you do not see a file named with your language, it is not supported yet. If you end up creating your own language file for a language that My Blog does not already have, please send me a copy of your lang.pm named according to its language (francais.pm, not french.pm, please). To create your own, open "lib/lang.pm" and only change phrases that are between quotes. If you change anything else, like the "our" or the phrase following $ , which makes up the variable name, you could break the script. Example:
    our $comments = "Comments"; # English
    our $comments = "Commentaires"; # French
    5. You may need to modify the first line of index.cgi, comments.cgi, post_from_email.pl, the plugin scripts, and protected/post.cgi to point to where perl is located on your server. Basically, its just pound, exclamation point, then the path to the perl executable.
    #!/usr/bin/perl (most common, and the default for this script)
    #!/usr/local/bin/perl
    #!/soft/script/bin/perl (University of Tennesse Knoxville)
    6. Upload the files to the server. Make sure the directory structure is the same (all the folders are in the same place as they werewhen you unzipped the file.) You should put all the files in your cgi-bin directory. Make sure you upload them in ASCII mode, NOT binary mode. Uploading them in binary mode will turn all the files into useless garbly goop that cannot be executed.

    7. Make sure all the executable files have execute permissions. Use your control panel to give all .cgi and .pl files executable permissions. If you do not know how to do this, contact your system administrator.

    8. Password protect the "protected" directory, so others cannot post to your blog. If you are on a UNIX or Linux server, you can use htaccess to do this. Contact your system administrator or google for "htaccess" to find out how. Also, no matter what kind of server you are on, you may have a tool in your control panel to password protect files and directories. I cannot stress how important it is that you password protect the posting portion of this script. Anyone who has used this script will know how to access the post script. Your only hope for security is to password protect it.

    9. To use any of the plugins that come with My Blog, enable it in the admin panel and then place the html tag that it gives you into your template where you want the plugin to be displayed. For instance, if you want to use the photo plugin that works with My Photo Gallery, add a tag to your template that looks like this: <!-- photo --> 10. If you are using MySQL you will need to set up your mysql tables. You can do this by executing the following command on commandline, or using the structure in makemysqltables.sql, you can create them manually through phpMyAdmin or another MySQL tool.
    $ cd public_html/cgi-bin/blog/
    $ mysql -u username -p databasename < makemysqltables.sql
    11. Now just point your browser at it! http://fuzzymonkey.net/cgi-bin/blog/index.cgi.
    GETTING RSS FEED TO WORK    back to top
    My Blog automatically generates an RSS feed of your blog entries. The RSS feed is located in the same folder as your pictures, and it is called index.rss. For most normal installations, this file will be located at http://yourdomain.com/blog/index.rss. In order for browsers to recognize that your RSS Feed exists, you will need place a special HTML tag in the "head" section of your template, like this: <html>
    <head>
    <title>Domain.com</title>
    <link rel="alternate" title="My Blog RSS" href="//domain.com/blog/index.rss" type="application/rss+xml">
    </head>
    HOW TO USE    back to top
    To post an entry: http://www.mydomain.com/cgi-bin/blog/protected/post.cgi.
    To edit an entry: http://www.mydomain.com/cgi-bin/blog/protected/manage.cgi.
    To change your settings: edit cgi-bin/blog/lib/sitevariables.pm.
    To set up posting by email: read the top of the post_from_email.pl.

    TROUBLESHOOTING    back to top
    See our FAQ or read below.

    If you get an internal server error, run it from command line so that you can see what is going wrong and check your server logs for helpful error messages. For instance, if its index.cgi that's giving you problems, do:
    $ ./index.cgi
    If it's running correctly, it will return alot of html code. If it does anything else, its obviously broken. Look at the output and see if you can make sense of it. Here are some sample errors and explanations on what they mean and how to fix it.
    $ ./index.cgi
    Can't locate SOMETHING in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at ./index.cgi line 29. BEGIN failed--compilation aborted at ./index.cgi line 29.
    This can mean one of two things. Its looking for a perl module to load. It either means that you do not have that perl module installed, or that it is installed into the wrong directory and perl can't find it. If SOMETHING is common.pm, sitevariables.pm, or lang.pm, then you are missing the lib/ directory or one of the files in it, and you need to download and reinstall My Blog. If it is CGI.pm or Digest/MD5.pm, you do not have a perl module that is required to run My Blog. If you do not have one of these perl modules, you must install it. Contact your system administrator and request that they add that module to the server, or do a local install of it.
    $ ./index.cgi
    bash: ./index.cgi: Permission denied
    Again, this error message means one of two things. Either index.cgi does not have execute permissions, or it is not owned by the correct user. See the installation instructions above to determine which of these is the case.
    $ ./index.cgi
    bash: ./index.cgi: /usr/bin/perl: bad interpreter: No such file or directory
    This means that your shebang line (the first line in any perl script) does not point to where perl actually resides on your server. See the installation instructions on the importance of this and how to fix it.

    If you receive any other error messages, feel free to email them to me, and I will do my best to explain what they mean and how to remedy the situation. These are the three most common error messages you may get, and they are all easily fixable. There is also a forum and a FAQ.
    CHANGES    back to top
    06.30.06version 1.69Fixed bug with unsubscribe.
    05.10.06version 1.68Fixed bug with subscriptions in MySQL.
    03.20.06version 1.67Added referrer tracking, cleaned up file locations, rewrote script in valid HTML and CSS, and removed incorrectly used tables, replacing them with divs and spans.
    02.21.06version 1.66Added edit/delete comments, added category jump-to box on front page, fixed a couple of minor bugs.
    02.15.06version 1.65Fixed bug with editing categories using MySQL and bug where image thumbnail is created before script finishes writing image.
    02.14.06version 1.64Fixed cross site scripting vulnerability. Added categories for entries, and fixed a newline display bug.
    01.13.06version 1.63Fixed bug with newlines in comments.
    01.10.06version 1.62Fixed bugs with writing RSS files and subscriptions using MySQL.
    01.09.06version 1.61Added abbreviation of page numbers. Fixed bugs with subscription emails, rss when using mysql, mysql data storage, and mysql maketables file.
    01.03.06version 1.6Added plugin configuration to the admin panel. Added the ability to choose between using flatfile or MySQL data storage. Fixed a bug in which old pictures were not overwritten when a new picture was uploaded.
    12.28.05version 1.52Fixed bug with HTML::BBCode caused by posting an empty blog entry.
    10.22.05version 1.51Included HTML::BBCode and HTML::Entities with this release, instead of requiring their installation.
    10.16.05version 1.5Added complete CSS control. Fixed bugs with RSS generation and uploading pics while editing.
    08.08.05version 1.4Added automatic generation of RSS feed. Fixed a bug.
    06.20.05version 1.31Fixed a bug with the subscription feature.
    02.08.05version 1.3Added the subscription feature. Visitors can subscribe and unsubscribe from receiving notifications on new blog entries. Added some language module variables, so non-English language modules now have several English phrases that have not been translated yet.
    11.04.04version 1.23Removed HTML encoding except on comments, as it prohibited the admin from posting links. Visitors comments are still encoded.
    10.06.04version 1.22Fixed date bug in the displaying of comments.
    10.01.04version 1.21Added more checking for input fields. HTML encoding implemented. Fixed some oversights with the language module.
    03.07.04version 1.2Added ImageMagick, plugins, email admin on comments, and posting from email or cell phone. Rewrote uploading pictures and posting comments. Added Admin script.
    05.10.04version 1.1Added pagination functionality.
    03.07.04version 1.0First Release!
    COMMENTS    back to top
    Send questions or comments to support@fuzzymonkey.net

    Thanks,
    Erin Spiceland