Enter your question or search term
eg. 'what are my email server settings'
How can I install Gallery with PHP safe mode enabled?
Ilisys has put together this guide for webmasters that wish to install Gallery themselves. If you would prefer that Ilisys staff install Gallery for you, please contact Technical Support (
support@ilisys.com.au or 1800 995 645).
The installation of some applications can be a challenge when PHP safe mode is enabled. However, with the appropriate files patched, installing Gallery with safe mode enabled is just as easy as within less secure environments.
Supress errors for the set_time_limit() function
The
set_time_limit() function is currently restricted by PHP safe mode. Rather then commenting out or removing code, we advise that you suppress these error messages. In time, the
set_time_limit() function may become unrestricted. Should that happen,
set_time_limit() functionality will return without the need for further code changes.
In each of these files:
classes/AlbumDB.php (lines 201 & 212)
classes/Album.php (line 508)
copy_photo.php (line 64)
do_command.php (lines 84 & 90)
edit_watermark.php (line 45)
gallery_remote.php (line 216)
gallery_remote2.php (lines 651 & 863)
init.php (line 68)
move_photo.php (line 128)
multi_create_user.php (line 82)
resize_photo.php (line 63)
rotate_photo.php (line 56)
save_photos.php (lines 163 & 214)
setup/backup_albums.php (line 38)
tools/despam-comments.php (lines 168, 172 & 177)
tools/validate_albums.php (line 79)
util.php (lines 1960 & 2235)
view_comments.php (line 150)
watermark_album.php (line 58)
- Replace
set_time_limit($gallery->app->timeLimit);
with
@set_time_limit($gallery->app->timeLimit);
- Replace
set_time_limit(30);
with
@set_time_limit(30);
Correct error within util.php
On line 454 of util.php you should see:
if (function_exists("file_get_contents")) {
return fs_file_get_contents($fname);
}
Replace this code with:
if (function_exists("fs_file_get_contents")) {
return fs_file_get_contents($fname);
}
Create required files and directories
There are two files and two directories that Gallery requires. The two files are config.php and .htaccess. The two directories are albums and tmp.
Create an empty file called
config.php and an empty file called
htaccess.txt. Upload the files to the gallery directory. Rename the
htaccess.txt to
.htaccess (a dot is the first character of the .htaccess file).
Create the
tmp directory in your root directory. Your root directory also contains your
cgi-bin,
logs and
www directories. Create the
albums directory in your
gallery directory.
The files and directories need to be writable by the web server. Change the permissions on each one to 2777.
Once the required files, directories and permissions are in place you will see a summary of required and optional features. You will see a warning that safe mode is on. You can safely ignore that warning.
Use ImageMagick for image processing
Ilisys recommends you select ImageMagick for your image processing. The path to ImageMagick is
/usr/local/bin
Specify the correct tmp file
You will also need to specify the path to your tmp directory. This path is your domain path appended with
/tmp. To findout your domain path, simply check the hosting summary page in the Ilisys Toolkit.
Finish up your installation
The instructions supplied with Gallery will guide you through the rest of the setup process.
If you require further assistance please contact Technical Support.