Follow this simple steps:
- Modify config.php file and at least:
- Change login user and password.
- Comment line with '$STOP=true' or set this variable as false. Unless you do this you will not be able to login and add galleries.
- Upload/Copy all files and directories contained in the tar.gz package.
- Modify directory permissions of $BASE_DIR (='photos/' as default) and set them 777 (drwxrwxrwx)
- Give YaPiG's root directory 777 permissions.(Note: some servers even require to give 6777 permissions, such as lycos, so if you get permissions problems with 777 try this.)
- For each new gallery follow this steps:
- Using an FTP Client:
- Create a new subdirectory in $BASE_DIR (= "photos/" as default).
- Set permissions to 777 of that directory.
- Fill the ADD NEW GALLERY FORM.
- Using Upload Form:
- Login as admin. Click on Upload
- Create a new directory
- Upload images on that directory
- Fill the ADD NEW GALLERY FORM.
Security Advice: After installing YaPiG, it is heavily recommended to delete install.php file avoiding possible bugs on that potentially dangerous file.
PROBLEMS DURING INSTALLATION
Most of problems are related to file permissions or file access. If you are a new YaPiG's user, I recommend to use default values at first (not modifying config.php, just commenting $STOP line as said above), and then customize YaPiG. Once you have finished your probes, do not forget to change $USER and $PASSWORD
GD library problems
YaPiG requires the GD library to work (1.6.x or above since 0.91). This library is a extension with some functions for handling images (creation, load, modify...). It is included in the standard PHP suite but many web hosting providers disable it. YaPiG will try to load it automatically if available.
Possible problems related with this topic are:
- Dynamic extension load function not available. If you reach this message during installation of YaPiG this will be because your server does not load GD library as default and YaPiG tries to load it but your server administrator has disabled the use of this function. Again, contact him or change your web provider. If you are using your own server, then edit php.ini file and set this directive as follows: enable_dl = On
- GD library not loaded. This problem appears when YaPiG tries to
load the GD library and it is not available on your server. The solutions,
once again, are contact your administrator or change your web provider.
If you are the server admin, loading the GD library automatically when you start your web server is very easy. Search your php.ini file. Then open it and search for this line:
;extension=gd.so <-- Linux/Unix/Mac Systems ;extension=php_gd2.dll <-- Windows Systems
Then remove the ";" character and restart your web server. If this line does not exist add it.
For more information about this directive read the PHP manual
- Warning: Could not get GD version You might get this message
during installation. For having support on GD 1.6.x and GD 2.x versions
yapig must know witch one you are using. Yapig tries to get it automatically,
but it can fail, so if this happends, after installing, edit $BASE_DIR/global-gen.php
file ($BASE_DIR='photos/' as default), search and set the variable called
$GD_VERSION=1;if you are using 1.x GD library or $GD_VERSION=2; if you have the 2.x library.
- Headers Already Sent Maybe after you modified YaPiG config file,
you get a message like this:
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/gallery/config.php:228) in /home/www/htdocs/gallery/view.php on line 72
This is caused because there must not be any any character (visible or invisible) before "<?php" and after "?>" in config.php (in other functions files as functions.php, view_func.php,etc.. is the same)
Extension Path Problems In some rare cases php extensions might not be correctly configured by default. If this happends you might get this error running YaPiG:
Unknown(): unable to load dynamic library './php_gd2.dll' - The specified module could not be found.
If this occurs, search the file php_gd2.dll (on Unix/Mac the file is called gd.so) and then on your php.ini change this directive to the correct value:
; Directory in which the loadable extensions (modules) reside. extension_dir = ./extensions/ ; This path is relative to php.exe on windows systems.
If you have any other problem during installation of using YaPiG, please read FAQ documentation. If your problem is not contempled there go to YaPiG's forums. Before posting check if any other user had the same problem, and please include your operating system and yapig version. Thank you.
During YaPig installation it is created a file called global-gen.php on YaPiG's $BASE_DIR (='photos/' as default) directory (the value is set on config.php). For reinstalling, just delete this file. Obviously, if you do this you will need to create all galleries you have again. If you are having problems during first installation, sometimes is better to start from scratch.
Upgrading from a version to other it is not automatically done, so you have to do it manually and some versions are incompatible with others. All 0.8x are compatible. A simple way to upgrade yapig is replace all source files included in the yapig package except config.php. In these versions the template has not been modified (only for repairing little minor bugs) so if you modified them don't worry, you won't lost this work, because is not neccessary to replace these files.