In this README: |
REQUIRES
SUMMARY
FEATURES
DISTRIBUTION / LICENSE
INSTALLATION WITH SHELL ACCESS
INSTALLATION WITH FTP ACCESS
HOW TO USE
TROUBLESHOOTING
CHANGES
TODO
REQUIRES back to top |
1. web server (tested on apache 2.0.44 on UNIX and LINUX) 2. Perl (tested with 5.8.0)
3. ImageMagick 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.
FEATURES back to top |
You can password protection for posting feature. Readers can leave comments about your posts. Post pictures and even attach files! Picture is automatically resized when uploaded. 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. Specify how many blog entries to display on one page. Plugins available for use with My Calendar and My Photo Gallery. 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.
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***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:
$ tar -zxvpf filename.tar.gz
$ chmod 755 *.cgi *.pm protected/*.cgiIf you are on a Windows server, use your control panel to give the 755 files execute permissions.
blog/comments/ drwxr-xr-x- chmod 755 blog/comments.cgi -r-wr--r--- chmod 644 blog/data.blog -r-wr--r--- chmod 644 blog/debugemail.txt -r-wr--r--- chmod 644 blog/icons/archive.png drwxr-xr-x- chmod 755 blog/icons/audio.png -r-wr--r--- chmod 644 blog/icons/code.png -r-wr--r--- chmod 644 blog/icons/comments.gif -r-wr--r--- chmod 644 blog/icons/compressed.png -r-wr--r--- chmod 644 blog/icons/database.png -r-wr--r--- chmod 644 blog/icons/document.png -r-wr--r--- chmod 644 blog/icons/email.gif -r-wr--r--- chmod 644 blog/icons/image.png -r-wr--r--- chmod 644 blog/icons/movie.png -r-wr--r--- chmod 644 blog/icons/unknown.png -r-wr--r--- chmod 644 blog/lib/ drwxr-xr-x- chmod 755 blog/lib/common.pm -r-wr--r--- chmod 644 blog/lib/lang.pm -r-wr--r--- chmod 644 blog/lib/sitevariables.pm -r-wr--r--- chmod 644 blog/index.cgi -rwxr-xr-x- chmod 755 blog/search.cgi -rwxr-xr-x- chmod 755 blog/imagemagick.pl -r-wr--r--- chmod 644 blog/LICENSE -r-wr--r--- chmod 644 blog/plugins/ drwxr-xr-x- chmod 755 blog/plugins/calendar.pl -r-wr--r--- chmod 644 blog/plugins/photo.pl -r-wr--r--- chmod 644 blog/protected/ drwxr-xr-x- chmod 755 blog/protected/post.cgi -rwxr-xr-x- chmod 755 blog/post_template.html -r-wr--r--- chmod 644 blog/post_from_email.pl -r-wr--r--- chmod 644 blog/readme.html -r-wr--r--- chmod 644 blog/template.html -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 * -R4. Move the "icons" folder to a folder out of the cgi-bin directory. Most webservers will not show pictures that are in the cgi-bin directory, so you will need to move the icons folder to another location. After you move it, make sure to change the setting in lib/sitevariables.pm to reflect the correct paths to the new location of the folder ($htmlpicpath). You will also need to create a folder to store uploaded files in and change that setting too ($htmlpath and $htmlsystempath).
5. Edit lib/sitevariables.pm to suit your needs. You will need to specify your preferences on colors, a font, a template, and the maximum number of characters to display on front page. There are also two very important things in sitevariables.pm that affect how your icon displaying will work. Make sure $htmlpath, $htmlpicpath, 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.
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/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:
$ cp francais.pm lang.pm
cp: overwrite 'lang.pm'? y
$ cd ../
our $comments = "Comments"; # English7. You may need to modify the first line of index.cgi, imagemagick.pl, 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.
our $comments = "Commentaires"; # French
#!/usr/bin/perl (most common, and the default for this script)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.
#!/usr/local/bin/perl
INSTALLATION WITH FTP ACCESS back to top |
1. Unzip or untar the archive file into a directory on your computer.
2. Edit lib/sitevariables.pm to suit your needs. You will need to specify your preferences on colors, a font, a template, and the maximum number of characters per entry to display on the front page. There are also two very important things in sitevariables.pm that affect how your picture uploading and displaying will work. Make sure $htmlpath, $htmlpicpath, 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.
3. 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/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:
$ cp francais.pm lang.pm
cp: overwrite 'lang.pm'? y
$ cd ../
our $comments = "Comments"; # English4. You may need to modify the first line of index.cgi, imagemagick.pl, 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.
our $comments = "Commentaires"; # French
#!/usr/bin/perl (most common, and the default for this script)5. 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.
#!/usr/local/bin/perl
#!/soft/script/bin/perl (University of Tennesse Knoxville)
6. 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.
7. 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.
8. Now just point your browser at it! http://www.fuzzymonkey.org/cgi-bin/blog/index.cgi.
HOW TO USE back to top |
Go to http://www.mydomain.com/cgi-bin/blog/protected/post.cgi and start posting to your blog!
TROUBLESHOOTING back to top |
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.cgiIf 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.cgiThis 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.
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.$ ./index.cgiAgain, 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.
bash: ./index.cgi: Permission denied$ ./index.cgiThis 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.
bash: ./index.cgi: /usr/bin/perl: bad interpreter: No such file or directory
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.
CHANGES back to top |
03.07.04 version 1.2 Added ImageMagick, plugins, email admin on comments, and posting from email or cell phone. Rewrote uploading pictures and posting comments. 05.10.04 version 1.1 Added pagination functionality. 03.07.04 version 1.0 First Release!
TODO back to top |
I need to do the following items:Send questions or comments to support@fuzzymonkey.orgLet webmaster delete and edit entries. MySQL version. If you have suggestions of other features, please email me!