Hello all
I had so much trouble installing this program that I started to keep notes. I think I installed and removed it 16 times before I finally got it to install properly. So I decided to share my notes on this forum for anybody else to use. This is what I had to do to install this script, if it doesn’t work for you I’m sorry, no guarantees. If this post is helpful to you I would appreciate a simple thanks. I would like any input on improving these instructions, just post below and I will try to incorporate the improvements.
Hopefully the moderators will pin this post up high and allow me to keep on editing and improving this post for all to use.
I will use some abbreviations, YC = Your Computer that you are sitting in front of, YW = Your Website.
1) Create a temp folder on YC, for this example I will use C:\1\
2) Download 4images1.7.zip from
http://www.4homepages.de/4images/download.php and place in C:\1\ on YC
3) Download language-pack_english.zip from
http://www.4homepages.de/4images/download.php and place in C:\1\ on YC
4) Unzip both 4images1.7.zip and language-pack_english.zip in C:\1\ on YC, you should get some folders below C:\1\ on YC if the files unzipped properly.
5) Copy the folder english and its contents from C:\1\language-pack_english\english on YC to C:\1\4images\lang\english (this is how it should look when you are done) on YC.
6) Delete the files lightbox_no.gif lightbox_off.gif lightbox_yes.gif profile.gif on YC from the folder C:\1\4images\templates\default\images, copy the files with the same name from your C:\1\language-pack_english\images_english folder on YC into the C:\1\4images\templates\default\images folder.
7) Delete the four files update_*_to_*.php from C:\1\4images these can corrupt your site later if they are executed.
8) This is optional; delete all the files from within C:\1\4images\docs on YC to save space. There are some instilation instructions in this folder that were incorporated into this post.
9) Ask your website host to disable SAFE MODE from what I understand it is a php function and it may keep your users from being able to upload images.
10) Go into your website control panel and create a new database in MySQL you will give it a name like 4images it will end up looking like MyWebControlUserName_4images and a database user name it will end up looking like MyWebControlUserName_MyDatabaseUserName and a password I will use MyDatabasePassword for this example.
11) You will need an FTP program for much of the following modifications I like SmartFTP
http://www.smartftp.com/ they offer a 30 day free trial.
12) Copy the 4images folder and all its contents from your YC into the root folder of your YW it will end up looking like
www.example.com/4images/ . . . or it may look like
www.example.com/public_html/4images/ . . . depending on your FTP program.
13) Open a browser on YC like Microsoft’s Internet Explorer and enter “http://www.example.com/4images/install.php?install_lang=english”.
14) You should end up in a window that asks for the following information. Fill out the fields exactly as shown. I’m showing you the format I had to enter to get it to install. A small mistake here will screw things up; at least it did for me. Ignore the [] [but type in everything in between].
Database server type – [mysql] (default leave alone)
Database server hostname – [localhost] (only type in the word “localhost”)
Database name – [MyWebControlUserName_4images]
Database username – [MyWebControlUserName_MyDatabaseUserName]
Database password – [MyDatabasePassword]
Prefix for tables in database – [4images_] (default leave alone)
Admin username – [My4imagesAdminUserName] (to use within 4images)
Admin password – [My4imagesAdminPassword] (to use within 4images)
Admin password (Confirm) – [My4imagesAdminPassword] (to use within 4images)
If all went ok you should get the following screen, at least it’s the screen I got.
Install success!
The install script is unable to write the config file "config.php" to the server. Click the button below to download a copy of the configuration file and upload this file via FTP to the 4images directory. Once this is done you should log in using the admin username and password and visit the Control Panel to check the general configuration for any required changes." />
15) Click on the button [Download Configuration File] you will be given a choice to select a folder on YC to copy this to, I used C:\1\.
16) Open the file C:\1\config.php with notepad and edit it so it looks like the following, be careful. The green letters are a direct cut and past from my config.php with only name-value changes.
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: config.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
$db_servertype = "mysql";
$db_host = "localhost";
$db_name = "MyWebControlUserName_4images";
$db_user = "MyWebControlUserName_MyDatabaseUserName";
$db_password = "MyDatabasePassword";
$table_prefix = "4images_";
define('4IMAGES_ACTIVE', 1);
?>
17) Check the
www.example.com/4images/ folder on YW and see if there is a config.php file if so delete it, also delete the config.new.php file from YW.
18) Copy the edited file config.php from C:\1\ on YC into
www.example.com/4images/ folder of YW.
19) You will need an FTP program such as CuteFTP, WS_FTP or SmartFTP for much of the following modifications.
20) Go into YW and set permissions as shown for the following folders:
chmod 777 (drwxrwxrwx) : data
chmod 777 (drwxrwxrwx) : data/database
chmod 777 (drwxrwxrwx) : data/media
chmod 777 (drwxrwxrwx) : data/thumbnails
chmod 777 (drwxrwxrwx) : data/tmp_media
chmod 777 (drwxrwxrwx) : data/tmp_thumbnails
chmod 777 (drwxrwxrwx) : templates
chmod 777 (drwxrwxrwx) : templates/default
chmod 777 (drwxrwxrwx) : templates/default/media
and set permissions as shown for the following files:
chmod 666 (-rw-rw-rw-) : all the files in the directory "templates/default"
chmod 666 (-rw-rw-rw-) : all the files in the directory "templates/default/media"
21) Delete the file install.php from the folder
www.example.com/4images/ on YW as this file can corrupt your site later if it is executed.
22) Additionally you may delete all the files in the
www.example.com/4images/data/database/default folder on YW if you wish to save space.
23) At this point your basic installation is complete.
24) Open a browser on YC like Microsoft’s Internet Explorer and enter
http://www.example.com/4images/admin/ and make any required changes.
Additional Information
a) 2003-11-25 Hello
I had trouble-using GD2 to create thumbnails it made my thumbnails very ugly; they looked a LOT better after I did this. I did have to delete my images and re-upload them to get results after I was done.
Copy constants.php from the folder
www.example.com/4images/includes/ in YW to the C:\1\ folder on YC and edit it with notepad. Find a line that looks like this, define('CONVERT_IS_GD2', 0); and change it to this, define('CONVERT_IS_GD2', 1); . Delete constants.php from the folder
www.example.com/4images/includes/ in YW and copy the edited constants.php file from the folder C:/1/ to the folder
www.example.com/4images/includes/ in YW this should produce a higher quality thumbnail.
b) 2003-11-25 Hello
To get the maximum thumbnail width without pushing your right border past the right edge of the header bar use the following settings in admin control panel. This is based on three thumbnails per row. If you are scratching your head just set the thumbnail width to 200 pixels, upload three pictures into one category and you will see what I mean. I had to deleate my images and re-upload them to get results.
Control Panel Values Below (all other spacing values were left on default)
Image table cells - 3
Max. width of thumbnail in pixel - 140
Max. height of thumbnail in pixel - 140
Max. thumbnail size in KB - 20
Auto-create thumbnail - Yes
Thumbnail size in pixel - 140
c) 2005-01-09 Hello
I just loaded the 4images 1.7.1 on a new website and the instructions still worked fine.