Yapig Documentation
YaPiG Home Page: home | Online- Docs | Download

Frequently Asked Questions

About Yapig itself

For what should I use Yapig?
Yapig is specially thought to people that wants to publish some images, pictures, photos on the internet. Using Yapig you have a very simple to use system that helps you to create the thumbnails and administrate your galleries. For example, if you have a digital camera and you want to show your shots to the world, Yapig will help you!
What does require Yapig?
Yapig requires a web server that supports PHP 4.x witch is a programming language mainly oriented to web developing. Most of web hostings support this language, it is very popular on the internet. As well, requires that your server has the GD lybrary, witch is an extension included in the standard distribution of PHP that has some functions for handling images.
Does it support GD 1.6 version?
YES, since 0.91-1 version or higher. Of course GD 2.0 works as well
I would like to customize Yapig look, is it possible?
Yes, of course, yapig uses a template system, that is, you don't have to edit the PHP source code to change the look, you can easilly edit the HTML of the templates. As well, Yapig look relies in Cascading Style Sheets (CSS).
Does Yapig show the JPEG EXIF information
Most of Digital cameras create JPEG files with some extra information about the picture in a common format called EXIF (Exchangeable Image File Format). Since version 0.94u Yapig displays some EXIF info.
Why does not Yapig use SQL databases?
The idea is to create a script that requires minimal server requirements, so it can work in nearly all php enabled servers. Many servers offer free php service but paid SQL access. Maybe in the future there will be the option of using text and SQL data bases.
Why does not use Smarty for templates?
Once again, simplicity. Smarty is very powerful, but requires a 'big' effort for users learning it. Yapig's template system is very easy to use and you can integrate Yapig in your web with minimal effort thanks to it only needing a little of HTML or CSS knowledge
I like this project, how can I help it?
There are several ways to help this project:
Why do you develop Yapig
Well, I bought a Digital Camera and I searched for a nice script for publishing my personal albums, I didn't find any that matched what exactly I wanted so I decided to develop mine's one :D. I wanted it to be very simple, lightweight and easy to customize. As well, I've made a big effort on user documentation and internationalization issues on the script, that is something I appreciate when I use some kind of software. I hate good software witch is poorly documented because I can't use it if there is any problem!

Installation

Web host where Yapig works
On Yapig's forum, it was created a thread where users can post witch web server can run Yapig. So if you are searching a webhost or you know a good one: share your knowledge!
Could not create index.html
As default Yapig creates a file called index.html, this is done to avoid default HTTP server file listing. There are two critical directories $BASE_DIR (defined in config.php) and $SECURE_DIR (defined in $BASE_DIR/global_gen.php). If you have password protected galleries you MUST create a blank index.html file for security reasons in both dirs. If you don't have password protected files, it doesn't matter.
Permissions Issues
Most of problems running Yapig are related to permissions. Remember:
  • photos/ directory must have 777 (drwxrwrwx) permissions
  • Each gallery directory must have 777 (drwxrwxrwx) permissions
  • Yapig's root directory must have 777 permissions as well.
What does give 777 permissions mean?
It is a commonly used terminology on Unix/Linux operating systems, this only means that you have to give all read, write and execution permissions to this folder for the owner of the folder, the group of the owner of the folder and other users that are out the owner group. This is necessary because on most system the user who runs the webserver and executes the Yapig script is different from the owner of the files, and must have access to write on them (for example, to store a comment)
To change these permissions on most ftp clients you have the option, just search for: modify permissions, modify atributes, chmod or something.
If you are accesing using a shell of text based client the command is chmod 777 filename. For more information you can search in your favourite search engine unix file permissions.

Running

Yapig Excedes execution time
This is because as default PHP runs its scripts during 30 seconds. After that time, it kills them. You have to edit your php.ini file and modify this value to:
     max_execution_time = 300     ; Maximum execution time of each script, in seconds
From 0.94 and above Yapig tries to do this automatically, but some servers disallow changing the maximun execution time.
Memory problems with big images
If you are trying to create a gallery with images whitch size in pixels is very big, it might cause problems when running Yapig. On php server config (php.ini) there is a directive that sets the maximun amount of memory allocable by a single script, set to 8MB as default. When Yapig loads big images and tries to allocate more than this amount, the PHP engine returns a Fatal Error. The possible solutions to this are:
  • change php.ini directive memory_limit = 16M, for example.
  • Reduce the image size.
How does password protect the images?
Yapig gallery password system is very insecure because if you know the directory and the image name you can access directly to the image url with your browser. Anyway, for personal albums it is enought and if you choose rare/random image names it will be enougth. In the future, it will be studied how to improve this security topic.
© YaPIG :: http://yapig.sourceforge.net # natasab@users.sourceforge.net