This article serves as a comprehensive guide to getting our scripts running under a Windows
server. Ask your system administrator whether your server is a Windows or Linux/UNIX server.
All of our scripts should work out-of-the-box with Linux/UNIX servers, if you follow the
readme. This document is unique to Windows. In this document, the examples will discuss
My Photo Gallery, as it is our most popular and most complicated script. The general principles
discussed here should work with all our scripts.
|
Requirements
The following are requirements of My Photo Gallery and may not be required for other scripts we offer.
Likewise, there may be software packages or perl modules not listed here that are required by other scripts we offer.
|
1. First things first. To run a perl script, you must have perl installed. If you are hosting your website on a
professional server or one that has already been set up, you can skip this step. Otherwise, you can get more
information on installing activestate perl at
aspn.activestate.com and download it at
www.activestate.com. For
most servers, the default settings should be fine to set up a server. Those settings are beyond the scope of
this document.
2. Time for the perl modules. Some of these may already be installed on your server. To find out what modules are
installed, ask your system administrator. If you need to install any of the required perl modules, you can get
them at search.cpan.org. If you need to install Image::Magick, make sure
during the installation process you install Perl::Magick as well. This is extremely important, as perl will have
no way to talk to Image::Magick without Perl::Magick. Get more information on installing Image::Magick at
www.imagemagick.org.
3. To install IO::String and Image::Info, type this on command prompt:
> pm install Image::Info
> pm install IO::String
You will see a lot of text scroll by. As long as you don't get any errors, it should be correctly installed.
4. To test your current perl install, type the following command at command prompt:
> perl -e "use Image::Magick"
> perl -e "use IO::String"
> perl -e "use Image::Info"
If it gives no errors and you are back at a command prompt, you have successfully installed perl and the perl modules
and we can get on to actually installing the script!
7. Download the myphotogallery.zip, and extract it (using folder names) to your cgi-bin directory. You now
should have a "photo" directory in your cgi-bin directory.
8. Decide on a web accessible folder for your pictures to be in. "C:\webroot\pictures" is a pretty safe choice.
Remember this location.
9. Decide on a web accessible folder for the script's auto-generated data. Again, "C:\webroot\script_data" is a
safe choice.
10. Move the "site-images" folder from the "photo" folder in your cgi-bin directory and into your script_data
folder. This is required for the folder thumbnails to work.
11. Password protect the management interface. In your webserver's configuration,
protect the "protected" directory in the cgi-bin/photo directory. This will prevent unauthorized users
from messing with your album. Remember: Anyone who has ever downloaded My Photo Gallery knows that the
management script exists. Even if you think they can't get to it because you haven't posted a link to it,
they know it's there. So please password protect it!
12. Run the My photo gallery management by putting the above URL in your web browser:
http://www.yourdomain.com/cgi-bin/photo/protected/manage.cgi
If nothing appears at all, your cgi implementation does not work properly, and you should consult your webserver
documentation. Getting cgi/perl working with your webserver is beyond the scope of this document. If you don't currently have
a working cgi/perl implementation, you must now consult your webserver software's support. Nearly all webserver
software supports cgi/perl, it is probably the most prolific of server-side script types.
|
1. Go back to the management interface in the last step of installation.
Now, click on "setup and configuration".
2. Ignore if any of the "check for requirements" failed. They will
indeed work if the installation steps were followed. If it says failed, it's because the script wasn't
expecting to find a Windows server.
3. Scroll down, and name your gallery.
4. In directory information, this is critical. For the
"Path to root directory containing your pictures" put in the full
path, but replace all backslashes (\) with forward slashes (/).
So it would look like this if your using my example defaults:
"C:/webroot/pictures". For the "URL to root directory containing
your pictures" put in "http://www.yourdomain.com/pictures" , assuming
that the "webroot" folder above corresponds to "/" on your server.
now, for "Path to root directory where we can store thumbnails,
site-images/icons, descriptions, etc", input the full path (with
forward slashes) to your script_data folder. For my example, it
would be: "C:/webroot/script_data". Now, for "URL to root directory
where we can store thumbnails, site-images/icons, descriptions, etc",
you would put in "http://www.yourdomain.com/script_data". Everything
below this option is all user-specific things, and you can change those
however you please. Don't forget to scroll to the very bottom after
checking through all your options, and click the "save changes" button.
5. If you haven't moved your pictures to the pictures directory, please do
so now. You can also put them in subfolders in the pictures directory.
6. Test out your album. Go to the url
http://www.yourdomain.com/cgi-bin/photo/index.cgi
and you should get a pretty looking page with some thumbnails.
Depending on how many pictures you have, it may take some time to load,
as the first time each page is loaded, the thumbnails must be generated
by the program. Subsequent loadings will be much quicker. If you ever
need to delete, rename, or rotate any pictures, you can go back to the
protected management interface to administrate the albums.
Now you have all you need to get our scripts running under Windows! If you
still can't get it working, try one of our webhosting packages! We do free
installation for any of our scripts for our clients, and you'd get a Linux
server too! Good luck and send us links when you get our scripts running!
FuzzyMonkey.net
|