login_page(); $referer = $_GET['referer'] ? $_GET['referer'] : 'index.php'; if (strpos($referer, "http") !== false) { $referer = "index.php"; } $login_failed = ''; $cookie_warning = ''; if (isset($_POST['submitted'])) { if ( $USER_DATA = $cpg_udb->login( addslashes($_POST['username']), addslashes($_POST['password']), isset($_POST['remember_me']) ) ) { $referer=preg_replace("'&'","&",$referer); pageheader($lang_login_php['login'], ""); msg_box($lang_login_php['login'], sprintf($lang_login_php['welcome'], $USER_DATA['user_name']), $lang_continue, $referer); pagefooter(); exit; } else { log_write("Failed login attempt with Username: {$_POST['username']} from IP {$_SERVER['REMOTE_ADDR']} on " . localised_date(-1,$log_date_fmt),CPG_SECURITY_LOG); $login_failed = << {$lang_login_php['err_login']} EOT; // get IP address of the person who tried to log in, look it up on the banning table and increase the brute force counter. If the brute force counter has reached a critical limit, set a regular banning record $result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE ip_addr='$raw_ip' OR ip_addr='$hdr_ip'"); $failed_logon_counter = mysql_fetch_array($result); mysql_free_result($result); $expiry_date = date("Y-m-d H:i:s", mktime(date('H'), date('i')+$CONFIG['login_expiry'], date('s'), date('m'), date('d'),date('Y'))); if ($failed_logon_counter['brute_force']) { $failed_logon_counter['brute_force'] = $failed_logon_counter['brute_force'] - 1; $query_string = "UPDATE {$CONFIG['TABLE_BANNED']} SET brute_force='".$failed_logon_counter['brute_force']."', expiry='".$expiry_date."' WHERE ban_id=".$failed_logon_counter['ban_id']; }else{ $failed_logon_counter['brute_force'] = $CONFIG['login_threshold']; $query_string = "INSERT INTO {$CONFIG['TABLE_BANNED']} (ip_addr, expiry, brute_force) VALUES ('$raw_ip', '$expiry_date','".$failed_logon_counter['brute_force']."')"; } //write the logon counter to the database cpg_db_query($query_string); } } if (!isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) { $cookie_warning = << {$lang_login_php['cookie_warning']} EOT; } pageheader($lang_login_php['login']); $referer = urlencode($referer); starttable('-1', $lang_login_php['enter_login_pswd'], 2); echo <<< EOT $login_failed $cookie_warning
{$lang_login_php['username']} {$lang_login_php['password']} {$lang_login_php['remember_me']} {$lang_login_php['forgot_password_link']}
EOT; endtable(); pagefooter(); ob_end_flush(); ?> status change screens. {CUSTOM_HEADER} Custom Header
If the corresponding option has been set in config, this token will be replaced with the output that your custom header generates. If you don't use the custom header feature, you can remove the {CUSTOM_HEADER}-token from your template, but it's advisable to leave it in place if you decide to use the feature later. pageheader optional Path to custom header include set up in config {GAL_NAME} Gallery name
Will be replaced with the gallery name you set up in config when the template is being parsed. You might want to remove this token, especially if you already have a banner in your theme that displays your gallery name. pageheader optional Gallery name set in config {GAL_DESCRIPTION} Gallery description
Will be replaced with the gallery description you set up in config when the template is being parsed. You might want to remove this token, especially if you already have a banner in your theme that displays your gallery name. pageheader optional Gallery description set in config {SYS_MENU} System menu
Determines the position of the first level menu the end user will see on your page (the one that contains the login/logout link). Even if you want to get rid of the menu or parts of it, do not remove the {SYS_MENU} token itself, but remove the menu items you don't want displayed by editing theme.php instead. pageheader mandatory
  • Login/Logout link: Status of user (admin/registered user/guest).
  • Upload-link: Permission of current user to upload (determined in groups panel).
  • Register-link: Allow new user registrations enabled/disabled in config.
  • FAQ-link: Display FAQ enabled/disabled in config.
{SUB_MENU} Sub menu
Determines the position of the second level menu the end user will see on your page (the one that contains the links "Album list" / "Last uploads" / "Last comments" / "Most viewed" / "Top rated" / "My Favorites" / "By Date" / "Search"). Even if you want to get rid of the menu or parts of it, do not remove the {SUB_MENU} token itself, but remove the menu items you don't want displayed by editing theme.php instead. pageheader mandatory n/a {LANGUAGE_SELECT_FLAGS} Language selector (flags)
Will display a row of flags representing the languages available for the end user to choose if corresponding config setting is enabled. pageheader optional Display language flags enabled/disabled in config. {LANGUAGE_SELECT_LIST} Language selector (list)
Will display a dropdown list of languages available for the end user to choose if corresponding config setting is enabled. pageheader optional Display language list enabled/disabled in config. {THEME_SELECT_LIST} Theme selector (list)
Will display a dropdown list of themes available for the end user to choose if corresponding config setting is enabled. pageheader optional Display theme list enabled/disabled in config. {ADMIN_MENU} Admin menu
Displays the admin menu. pageheader mandatory Admin must be logged in. Admin controls mustn't be hidden. {GALLERY} Gallery
n/a mandatory {CUSTOM_FOOTER} Custom Footer
If the corresponding option has been set in config, this token will be replaced with the output that your custom footer generates. If you don't use the custom footer feature, you can remove the {CUSTOM_FOOTER}-token from your template, but it's advisable to leave it in place if you decide to use the feature later. pagefooter optional Path to custom footer include set up in config {VANITY} Vanity block
If your custom theme is defined as valid theme and you have enabled the corresponding option in config, the {VANITY}-placeholder will be replaced with mini-banners that link to PHP.net, mysql.com and the HTML and CSS validators of the W3C.
pagefooter optional Display the vanity block on themes that are defined as XHTML and CSS compliant enabled in config.
Theme defined XHTML and CSS compliant in theme.php

2.3.6.7 Modifying colors

To modify the colors, fonts, font sizes, etc... used by the script, you should edit the "style.css" stylesheet whenever possible. For example, if you want to increase or decrease the size of the fonts you can simply modify the line with : table { font-size: 12px; }. Most of the font sizes used by the script are defined as a percentage of this size.

2.3.6.8 Editing theme.php

The "theme.php" file contains all the HTML templates used by the script. You can edit them, as well. When making modifications to these templates, be careful that you do not alter the lines that start with <!-- BEGIN xxx --> and <!-- END xxx -->. These lines are often used to identify the start and end of specific code blocks that the script will use to display your gallery.

Back to top


2.4 Safe mode issues

A significant number of webhosts on the Internet run PHP in safe mode. Coppermine runs without any problem in safe mode and with the "open basedir restriction" active, provided safe mode is properly configured. Unfortunately, on many hosts, safe mode is not configured properly.

If your webhost is running PHP in safe mode but is misconfigured, you may need to do the following :

  • With a FTP program, change the mode of Coppermine's "include" directory on your server to 0777.
  • Do the same for the "albums" and "userpics" directories.
  • Check that at the beginning the the "include/config.inc.php" file, you have a line with : "define('SILLY_SAFE_MODE', 1);"

Back to top


2.5 Using SMTP to send emails

By default the script uses the PHP built-in mail function to send emails. In some cases, the PHP built-in function can't be used.

If, in order to send emails with PHP, you are required to supply a hostname, a username and a password, you will need to edit the CONFIG menu section "Email settings" and insert the correct values there. If you don't need a username and password to connect to your SMTP server, just leave these lines blank. If you don't know what settings to enter, you will need to check with your webhost.

Back to top


3. Upgrading

3.1 Upgrade steps

3.1.1 Upgrading from version 1.0

If you already have installed version 1.0 and you want to transfer your albums to version 1.4x follow the following steps:

  • First, make a backup (dump) of your database.
  • Install version 1.4.x as you normally would but in a directory different from the one where you v 1.0 is. Note that in order to use the upgrade script, tables for version 1.0 and 1.4.x must be stored in the same database.
  • Copy the "albums" directory of version 1.0 into the directory where you installed version 1.4.x
  • The upgrade script assumes that you used the "CPG_" prefix for tables (default value) when you installed version 1.0, if this is not the case, edit upgrade-1.0-to-1.2.php and edit the $prefix10 variable.
  • Login to your 1.4.x Gallery, enter the admin mode
  • And call the upgrade script, http://yousitename/coppermine_dir/upgrade-1.0-to-1.2.php
  • The upgrade from 1.0 to 1.4.x is a two-step process. You must click the link which comes up on the bottom of the page to complete the upgrade!.
  • Delete upgrade-1.0-to-1.2.php from your server.
  • If you get an error, go to Coppermine 1.4.x config page, enable debug mode, try to call the upgrade script again and check what errors you get.

This upgrade process leaves your v1.0 gallery untouched

Back to top


3.1.2 Upgrading from cpg1.1.x, cpg1.2.x or cpg1.3.x to version cpg1.4.x

  • First, make a backup (dump) of your database.
  • Backup your include/config.inc.php file, your anycontent.php file and your "albums" directory.
  • Unpack the archive
  • Except for the "albums" directory, upload all of the new files and directories making sure not to overwrite the include/config.inc.php file, your anycontent.php file or the albums directory.
  • Delete all leftover, outdated language files in the lang folder
  • If you have not already done so, create a folder called "edit" within your "albums" directory - this folder will be used by coppermine as a temporary folder, do not ftp-upload files there. Make sure the new "edit"-folder is CHMODed the same way your albums-directory is (755 or 777, depending on your server's config)
  • Run the file "update.php" in the coppermine directory once in your browser (e.g. http://yourdomain.tld/coppermine/update.php). This will update your coppermine install by making all necessary changes in the database.
  • If you have made a custom theme, apply the changes that were introduced in the themes structure to your custom-made theme - refer to the theme-upgrade guide.
  • You can not use language files from older versions of Coppermine as primary language (the language the admin will use) - make sure you only have the language files that come with this package inside of your lang folder (delete or rename all files from older versions within the lang folder).
    If you need to use a language that hasn't been translated for cpg1.4.x, you can try using the language file from cpg1.3.x, however there are certain caveats:
    • You need to enable the language fallback option in coppermine's config page
    • cpg1.4.x-phrases that don't exist in your old language file will go untranslated or show in english
    • Coppermine can't be administered using an old language file - the admin needs to use a "true" cpg1.4.x language file
    • You're free to try using old language files, however when running into issues or error messages, switch to US-English and see if the issue goes away then. Using outdated language files goes unsupported
  • The bridging method has changed from cpg1.3.x to cpg1.4.x. When upgrading, your bridged coppermine install will be unbridged - you will have to re-apply the bridging using the bridge-manager (using your standalone admin account you initially used to set up coppermine). You will not lose anything though, don't worry.

Please note: as there have been changes both in the coppermine files and the database from cpg1.3.0 or better to cpg1.4.x, users of previous versions will have to apply all steps mentioned above: both the files have to be replaced and the update.php script has to be run once.

3.1.3 Upgrading from cpg1.4.0 or better to version cpg1.4.19

  • First, make a backup (dump) of your database.
  • Backup your include/config.inc.php file, your anycontent.php file and your "albums" directory.
  • Unpack the archive
  • Except for the "albums" directory, upload all of the new files and directories making sure not to overwrite the include/config.inc.php file, your anycontent.php file or the albums directory.
  • Run the file "update.php" in the coppermine directory once in your browser (e.g. http://yourdomain.tld/coppermine/update.php). This will update your coppermine install by making all necessary changes in the database.
  • If you have made a custom theme, apply the changes that were introduced in the themes structure to your custom-made theme - refer to the theme-upgrade guide.

Please note: as there have been changes both in the coppermine files and the database from cpg1.4.0 or better to cpg1.4.19, users of older versions than cpg1.4.19 will have to apply all steps mentioned above: both the files have to be replaced and the update.php script has to be run once.

Back to top


3.2 Why upgrade?

There are major and minor releases of Coppermine. Major releases have so far been cpg1.0, cpg1.1, cpg1.2.x, cpg1.3.x and cpg1.4.x. The next major release will be cpg1.5.x (which currently is in the dev pipeline - no scheduled release date yet). Minor releases (the third number in the version numbering scheme) represent updates, also known as "maintenance releases". Major releases contain new features (compared to the previous major release), minor releases do not contain new features, but only bug fixes and slight improvements (like additional language files).

To understand the release policy of the coppermine dev team you have to understand how bugs are being fixed: we maintain a repository where the core code of each major release is being constantly being improved. Major and minor bugs that are reported on the coppermine support board are being fixed in that repository. Once a new package is being bundled, all fixes that have been made in that repository go into the new maintenance release.

There is a good reason for every new maintenance release: they are usually being packaged when a new bug or vulnerability is being discovered that is relevant in terms of security. As suggested above, there are several minor bugfixes that go into each new release as well, not only the one major bug or vulnerability that lead to the maintenance release. Therefor, it will not be enough to just fix the single vulnerability that has been the initial reason for a new package to be released. Instead, always upgrade to the most recent stable release as soon as it has been announced.

3.2.1 Reasons for package releases

This is a list of minor releases of cpg1.4.x and the reason why they have been released. It is meant to explain why you should upgrade as soon as possible to the most recent stable release if you are running an outdated version.

Package Reason for release Release Date
cpg1.4.0
  • Alpha release for testers and developers only
no package
cpg1.4.1
  • Beta release for public testing
2005-07-02
cpg1.4.2
  • Initial Stable release
2005-11-23
cpg1.4.3
  • The file relocate_server.php removed that contained a security flaw
  • Leftover language files from cpg1.3.x was removed from the package that caused issues
2005-12-27
cpg1.4.4
  • Remote code execution flaw caused by language file inclusion
2006-02-26
cpg1.4.5
  • Directory traversal bug (aka "IMEI-Bug")
2006-04-21
cpg1.4.6
  • Protection against the .rar-vulnerability of Apache-driven webservers
2006-05-19
cpg1.4.7
  • Fixed vulnerability of user manager
2006-06-06
cpg1.4.8
  • Stability fix for "Last updated Albums" caused by improper fix in cpg1.4.7
2006-06-08
cpg1.4.9
  • Fixing security flaw
2006-08-27
cpg1.4.10
  • Potential disclosure of sensitive information (sql injection)
  • Removal of unused file
  • Missing checks for email validity
  • Flaw in search logic
  • Fixed video playback in IE
2006-10-29
cpg1.4.11
  • mysql injection vulnerability in include/functions-inc.php
2007-06-29
cpg1.4.12
  • mysql injection could lead to disclosure of sensitive information
  • Fixed double quotes for input fields in comments
2007-07-02
cpg1.4.13
  • Fixed several security-critical XSS-vulnerabilites reported by L4teral
  • Fixed broken russian language file (no security impact)
  • SEF_URLs plugin removed
  • Updated license from GNU GPL v2 to GNU GPL v3
2007-09-13
cpg1.4.14
  • Fixed potential XSS vulnerability in displayecard.php reported by Nicolas Le Gland
2007-11-07
cpg1.4.15
  • Fixed potential XSS vulnerabilities in docs/showdoc.php
  • Fixed path diclosure in include/slideshow.inc.php
  • Fixed possible shell injection in include/imageObjectIM.class.php
  • Fixed low-impact sql injection vulnerabilities in util.php and reviewcom.php
  • Fixed typo in include/functions.inc.php that stopped search engine access rcording for stats
Thanks to Janek Vind for reporting those issues.
2008-01-30
cpg1.4.16
  • Removed escapeshellarg that has been introduced into cpg1.4.15 in error
2008-02-02
cpg1.4.17
  • Corrected an SQL injection vulnerability in URI upload code
  • Added Welsh language file
  • Changed date formats in lang files for better windows compatibility
  • Updated Romanian language file
  • Added Latvian language file
  • ImageMagick rotate bug fix
2008-04-14
cpg1.4.18
  • sql injection vulnerability in bridge/coppermine.inc.php fixed
cpg1.4.19
  • Danish language file updated
  • spacer for empty album list cells fixed
  • improper nesting of form-tag in various files fixed
  • invalid <f>-tag in upload.php removed
  • type translation in reports fixed
  • resources consumption for slideshows in meta albums fixed
  • hard-coded string "edit keywords" replaced with translation
  • Spanish documentation added
  • SMF anonymous user fix
  • security issue reported at http://www.milw0rm.com/exploits/6178 fixed
  • profile email check issue fixed
2008-08-03

As you can see, the coppermine dev team is constantly fixing and improving coppermine. Every non-trivial piece of software contains bugs, so there is no guarantee that the version that currently is the most recent one will be the final, ultimately bug-free version to be released in the cpg1.4.x series. It is absolutely vital that you perform regular updates as soon as new packages are being released.

3.2.2 Changelog

Details on the changes that went into a release can be found in the changelog that comes with each package. The changelog file can be found in the root directory of the coppermine package. The changelog contains more information on additional languages and the time and date of the fix as well.

The changelog is a plain-text file that can be read using a simple editor - on Windows-driven machines, notepad.exe is fine.

Back to top


3.3 The version check tool

Since the release of cpg1.3.2 Coppermine comes with an additional version checking tool to help you resolve issues with upgrades and updates easily. Except for specific files of coppermine that will only work for the version that it had been originally designed for, the versioncheck tool can be used with all versions starting from cpg1.2.1. To launch the versioncheck, simply add versioncheck.php to your browser's address bar after being logged into coppermine as admin (example: http://yourdomain.tld/your_coppermine_folder/versioncheck.php). With version 1.4x, you can run the versioncheck utility from the Admin Tools menu.

3.7.1 What it does

The script "versioncheck" is meant for users who have updated their coppermine install. This script goes through the files on your webserver and tries to determine if the local file versions on your webserver are the identical to the ones at the repository of http://coppermine.sourceforge.net. Files that do not match are displayed and are the files you should update as well. In Cpg1.4.x you can toggle the URL to the latest update for individual files in the versioncheck page.

It will show everything in red that needs to be fixed. Entries in yellow need looking into. Entries in green (or your theme's default font color) are OK and should be left alone. When an entry is red or yellow, a help icon will appear next to it. Click it to find out more. Hovering with your mouse over an item will display additional information as well (tooltip).

The versioncheck screen has several sections:

  • Section 1 explains what the versioncheck tool can be used for
  • Section 2 ("Options") displays the options you can chose
  • Section 3 will display a warning if coppermine was not able to connect to the online repository (where the most recent version data is being stored). The script will default to a local copy of the repository file. If connection to the online repository was succesfull, there will of course be no error message (no section 3).
  • Section 4 will show what version of coppermine you actually use. The versioncheck script draws this piece of information from the file include/init.inc.php - if you haven't replaced your copy of this file with the new version during upgrade, your old (outdated) version will appear in this section.
  • Section 5 will show the core of versioncheck's file: the version comparison. The script will loop through all files that are suppossed to exist (based on repository data) and compare them to the files you actually have on your webserver.
  • Section 6 will display a summary of the files and folders checked

3.3.2 Options

The options screen lets you configure the versioncheck, or rather what is being displayed. The options aren't saved anywhere, so you will have to adjust them each time you run versioncheck. The default options should be OK for most users - only change them if you have good reasons to do so.

  • show optional folders/files
    Uncheck this to hide files that are tagged as "optional" (display mandatory files only)
  • show mandatory files
    Uncheck this to hide files that are tagged as "mandatory" (Note disabling both optional and mandatory files will of course result in no files being displayed at all)
  • show additional information
    Toggles whether informaton about the installed coppermine version and the repository connection status are being displayed. Uncheck if your're making screenshots to save space and reduce dimensions.
  • show file versions
    Toggles wether additional version information of a file that belongs to the release version you're using should be displayed. When viewing the source code of a coppermine file, the file version is the number that looks like this: Id: index.htm,v 1.66 2004/08/26 04:42:19 gaugau Exp (in this example the file version is 1.66)
  • show folders/files with errors only
    Toggles display of files that don't have errors. Enable this option if you want to make a screenshot and ask for support on the coppermine forum.
  • coppermine is installed in the webroot
    Experimental: if all your files are being displayed as "non-existant", you probably have installed coppermine in your webroot, or you are using subdomains. Check this option only if you are experiencing problems. This option hasn't been tested thoroughly yet, there's no guarantee it will work on your setup.
  • try connecting to the online repository
    Toggles wether versioncheck should try to connect to the online repository (checked by default). Only uncheck this option if you're sure you can not access the online repository because of your server setup and you want to reduce the time the script needs to execute a bit.
  • show folder permissions
    Toggles the option to show/hide the read/write permissions of a folder.
  • don't display web svn link / display web svn link to stable branch / display web svn link to devel branch
    Toggles wether to show an additional column that contains a link to the web svn. Only recommended if your cpg version is OK (green), but your file version appears to be outdated. You can then connect to the web svn to get a more recent version of your file. Only recommended if you know what you're doing (or you have been told to do so from a supporter from the coppermine support board).
  • show condensed ouput (for easier screenshots)
    When checked, this options reduces the width of the version comparison columns. This will allow you to create screenshots with reduced dimensions and size.

3.3.3 Version comparison

There is a lot of information packed into a small space. Here's an example of a possible output and what the output means:


  • The column "icon" shows if the entry is a folder or a file. Clicking on the icon takes you to the page, e.g. clicking on util.php will take you to the "admin tools page" (although not all coppermine files can be opened directly by running them in the browser).

    In above example, rows "A" to "E" are folders, rows "F" to "K" are files.

  • The column "folder/file" holds the relative path from your coppermine root to the folder/file in question.

    If an entry is in your default font color, it exists (in above example, all rows but "G" and "H").

    If the entry is in yellow (row "G"), the corresponding folder/file doesn't exist on your webserver, but it is only considered to be optional (e.g. a language file that comes with the coppermine package that you don't want to use can be deleted from the webserver. It will then be shown in yellow, as it's only optional to have it). It's up to you if you need it.

    If the entry is in red (row "H"), the folder/file in question doesn't exist on your webserver, but it is mandatory to have it. You should upload the file from your coppermine package to your webserver. Only leave it as-is if you really know what you're doing.

  • The column "writable" shows information if the folder in question is writable, and whether this is correct or not. The write permissions for files are not being displayed, as this would slow down the script considerably. Usually, there are icons that show the writable status of your folder (if you have the icon resources on your webspace). Optionally, a plain text message in brackets might be visible (if you don't have the icon resources).
    • A white pencil with a green "x" indicates that the folder is not writable and is isn't suppossed to be writable - everything is OK then (row "A")
    • A green pencil indicates that the folder is writable and it is suppossed to be writable as well - everything is OK then (row "D"
    • A white pencil with a red "x" indicates that the folder is not writable, although it should be (row "C"). You should change write permissions (CHMOD) for this folder and everything within it, usually using your FTP software.
    • A red pencil indicates that the folder is writable, but it shouldn't be (row "E"). Unless absolutely necessary, leaving files writable could be a security risk. Where possible, you should change permissions for this folder and everything within it to read/execute only.
  • A question mark in a yellow box (help icon) indicates that there is additional information availentries (deleting the log entries will not disable the ecard recipient to view the ecard).

    Before switching this option on, make sure that logging such information is legal in your country. It is also advisable to notify your users that all ecards are being logged (preferrably on the registration screen).

    [cpg1.3.0 or better required]
  • Sort my pictures

    Picture manager that can be used to custom-sort files within an album. By default, the thumbnail page that displays the contents of an album will be sorted by the sorting order specified in "Default sort order for files" on the config page. The "sort my pictures" option overrides the default sorting mechanism and displays the thumbnails in the order you specify. As this means an additional effort in the maintenance of each album, it's recommended to use the default sorting by filename and (instead of specifying a custom sort order) and naming the files appropriately before upload.

    Note: each user (including the admin) can use the sorting controls on the album's thumbnails display page to manually override the sorting option that was specified in coppermine's config and the "Sort my pictures" option; this final method of changing the sort order is stored locally in a cookie of the client and reverts to the config settings when this cookie is discarded.

  • Batch add files
    Batch-add files to the coppermine database that have been previously uploaded by FTP. Batch-add files does not upload files for you. You must upload files using your webhost's file manager or an FTP client software. You FTP files into folders that you create in the coppermine album directory. You must not, however, create these folders in the userpics folder.
  • Admin Tools (Resize Pictures)
    A collection of utilities to:
    Rebuild or resize intermediate pictures and thumbnails.

    Use this if you have changed the settings for thumbnail or intermediate images in config, or if you have to replace corrupt versions.

    Select the radio button for this action, then choose to rebuild the thumbnails, intermediates, or both.

    This uses a lot of server resources, so if you experience timeout issues, try setting it to process smaller batches ( 45 is the current default ).

    Delete full-size pictures.

    Use this to save space on your webspace.

    When selected, Coppermine checks to see if an intermediate copy exists, and if it does, it deletes the original sized picture, then re-names the intermediate. If no intermediate exists, Coppermine leaves the original in place.

    Delete orphaned comments.
    Sometimes, when pictures have been deleted, any comments associated with them remain in the database. Use this to remove them from the database entirely.
    Rename file titles.
    Use this to re-name the title of all files in an album, using info from the filename.
    Delete file titles.
    Use this to clear the file titles from one or more albums.
    View your server php info.

    If, you after following the troubleshooting guides in the documents provided here, you are still having problems with your coppermine installation, these problems are sometimes caused by a misconfigured server setup. Clicking this link will provide you with all your php and mySQL settings, as well as information on the GD library (if installed). The information may be required by the support team, if you are unable to sort problems yourself.

    It is not possible for visitors to your site to access this information, so if asked for it, copy and paste it on the support board. Do not post this information or any debug information unless requested first. You may post ERROR messages verbatim, but refrain from posting warning messages.

    Run a database update (update.php).
    After an update/upgrade, it is usually necessary to run update.php. This can be done by typing the address directly into your browser, or by clicking this link.
  • My profile
    Edit your own user profile

In previous beta versions of cpg1.4.x there used to be an admin mode and user mode for "regular registered" users, somewhat like those for the true administrator. This feature has been removed as it was both confusing for end users and really didn't serve any special purpose.

The user with upload permissions has the following admin options:

  • Create / order my albums
    similar to album manager in admin mode, the user can create albums within his user gallery
  • Modify my albums
    The user can edit album title and description (similar to "album properties" for the admin, but the user can't move his albums to other categories)
  • My profile
    The user can edit his profile (changing passwords, edit location, interests, home page and occupation properties, view quota usage). When integrated with a bbs service, the "My profile" link will send the user to the bbs's profile page.

Back to top


4.3 The group control panel

This is where you define what members of a user group can and can't do.

The disk quota applies only for groups where "Personal gallery" has been set to "Allowed". Both files uploaded by a user in his personal gallery as well as files uploaded to public galleries are included in the quota.

Use the anonymous group to define what non-registered users can and can't do. Quota and "Personal gallery" are meaningless for anonymous users.

Permissions control what the user is allowed to do in the gallery (Rating/Sending Ecards/Posting Comments).

Bear in mind that if a user is a member of a group where "Rating", "Comments" or "Public albums upload" is set "YES", s/he will have the right to perform these operations only in albums where they are allowed. ( ie. uploading files will only be possible in albums where "Visitors can upload files" has been set to YES.)

If "Personal gallery" is set to Allowed, the members of the group will be able to have their own gallery in the "User galleries" category where they will be able to create their own albums.

If "Approval" is set to NO, files uploaded by members of the group in albums created in their own gallery won't need to be approved by the admin. If "Approval" is set to YES, the users in the particular group will be able to upload, however the uploaded files will only be shown after the admin (you) has approved them.

The group control panel enables you to control the upload parameters of any group.

Upload method lets you select the type of upload method that a particular group may use. Four forms or methods are currently available.

  • Single file uploads only - Users of this group may not use advanced uploading features. They may upload one file at a time. To enable single file uploads only, set File upload boxes to "1", URI upload boxes to "0" and No. of boxes to "fixed"
  • Multiple file uploads only - Users of this group may upload multiple files at one time. To enable multiple file uploads, set File upload boxes to any number higher than "1", URI upload boxes to "0" - it's up to you to let users configure the No. of boxes, but it's recommended to set it to "fixed" to avoid confusion and to limit the load on your server should several users try to upload simultaneously. You can set the number of file upload boxes to any number from 0 to 10 (5 is the default).
  • URI uploads only - The group may only upload files using URIs. Acceptable URIs must begin with 'http://' or 'ftp://'. To enable URI uploads only, set File upload boxes to "0", URI upload boxes to "1" or higher.
  • File-URI - Users of this group may upload files using file upload boxes and URIs. To enable both file and URI uploads, set File upload boxes to "1" or higher, URI upload boxes to "1" or higher

No. of boxes set to "variable" allows the user to select the number of upload boxes for an upload. Usually, you will leave this option set to "fixed", as it presents the user with an additional step in the upload wizard that is not necessary.

File upload boxes controls the number of file upload boxes presented to the user. If the user may customize the number of boxes (No. of boxes set to "variable"), this setting serves a maximum limit for the number of boxes he may request. Otherwise, this setting determines the number of boxes that will appear on the upload form.

URI upload boxes is the same type of control as File upload boxes, but it controls the presentation of URI upload boxes.

Please note: on unbridged installs (or standard, stand-alone coppermine installs), the group "banned" feature really doesn't accomplish much. A user who is member of this group is still able to log in and view pics, he's just not able to upload, rate, send ecards or post comments. If you truly want to place a full ban on someone you should use the "banning" feature (which isn't group-based but individually based), instead.

Back to top


4.4 The user control panel

The user control panel can be found when clicking "users" from the admin menu. It is the place where you create and manage your users.

If you have enabled integration (bridging) Coppermine with another application (e.g. your favorite BBS app), Coppermine will use the member table of the application you bridged with (your BBS), so the built-in Coppermine user management will be disabled in favor of the user management that comes with the bridged application. This has been incorporated to eliminate redundancy and facilitate a seemless integration.

As a result, you will not have this user control panel; clicking the "users" link will send you to your bridge application's user management instead.


4.4.1 Page controls

  • You can sort the user management display by either clicking the arrow icons () next to each column header or by choosing the sort order from the dropdown at the top right.
  • If you have more than 25 users, a page tab will apear at the bottom right of the screen, allowing you to go to subsequent pages of your member list
  • Clicking on a user's name will display the profile page of the individual user (read only)
  • The edit icon () will send you to the user's profile in edit mode - you can change the password, email account and other user-related settings there
  • If a user has uploaded any files, a link of "recent uploads" will show up next to his name. Clicking on this link will display files that have been uploaded by that user
  • The "group" column displays the primary member group the user is in
  • The column "Registered on" will show the date that the user account was created
  • The "Last visit" column will show the last login of the user.
    Note: if the user has ticked the checkbox "Remember me" on the login screen, he will not have to login every time he visits the gallery so this date may be accurate.
  • The "Files" column displays how many files the user has uploaded to date (including those that are awaiting admin approval)
  • The "Space used" column shows how much of the space that is assigned to the user has already been used. The total space the user is allowed to have ("Space Quota") depends on the user's group - which you set in the groups panel.
  • You can change a number of settings for several users at once by clicking the checkbox in front of the user row (use the checkbox at the very top or bottom of the page to select/unselect all users on the page) and then chosing an action to perform from the dropdown box "With selected" at the bottom left of the page. The actions you can choose from are "Delete", "Deactivate", "Activate", "Reset password", "Change primary membergroup" and "Add secondary membergroup". The user currently logged on (you as gallery admin) has no checkbox to avoid accidental deletion or deactivation of your own admin account.

4.4.2 Searching for user(s)

You can use the wildcards: * (for any string) and ? (any single character) or even %expression%.
Example: searching for j* will return both Jack and Jill

4.4.3 Creating new users

To create a new user, simply click on the button "Create new user" at the bottom of the user manager and fill in the form that will come up.

This does of course not apply if you have bridging enabled, as user management is being handled by the app you have bridged coppermine with. In this case, the user management screen of your bridged app should show - create a new user there.

4.4.4 Editing users

To edit the properties of a user, click the -button next to the user name. You will then find a page where you can modify all user profile fields the user has. This includes the option to change the password of that user. If you don't want to change a user's password, leave the password field blank.
The dropdown list determines the primary group the user is in, the checkboxes beneath it determine the secondary groups.

Please note that this screen (as well as the rest of Coppermine's user management) will not be available if you have enabled bridging, because then the user management of the application you have bridged with (e.g. your BBS) kicks in and handles everything related to user management.
The button "Album permissions by group" can not be used to set permissions, but only to view them. You can set permissions using the album properties screen.

4.4.5 Group membership

When creating a new user or editing an existing user, you will notice a row named "User group" - it determines what group(s) the user is in.
The first field (a dropdown field) determines the primary user group. It determines the status of a user. You should set it to "Administrator" (for users you want to assign admins powers to) or "Registered".
Additional (secondary) group membership can be assigned using the checkboxes beneath the dropdown field. Here, all your custom groups (that you can create and manage using the group control panel) should show as well as the core groups (the ones that come with coppermine out of the box and can't be deleted). Assign additional group membership to your users here. Privileges for a particular user inherited from group membership are added: the least restrictive permissions are taken into account.

Example: if you want your registered users to be capable of viewing the gallery only, and only privileged users of your custom user group "photographers" are allowed to actually upload files, make all your users members of the built-in group "registered" (by default, they already are). Only for user you want to give the privilege to upload, tick the check box "photographers" as secondary group. Then go to your groups control panel and disallow uploads for the registered group there, but allow uploads for the custom group "photographers".

Note: the button "album permission by group" beneath the checkboxes is not meant to assign album permissions, but only to check the permissions set. You can only assign particular album permissions on the album properties screen.

Back to top


4.5 The categories control panel

This panel allows you to edit your categories.

  • The button allows you to edit the title, description and parent category of an existing cetegory.
  • The button allows you to delete a category. Deleting a category does not delete the albums and files it contains. These are moved to the "Root" category if it is a subcategory that is deleted or to the root of the category list if it is a parent category that is deleted..
  • The and buttons allow you to order your categories.
  • The "Move into" dropdown lists allow you to change the parent of a specific category.

"User galleries" is a special category. It is not visible unless you have some users that have created their own gallery. It can't be deleted but you can edit its title and description by using the button.

You can specify how you want categories sorted in coppermine: alphabetically (instead of a customized order) by setting "Sort categories alphabetically" to "Yes". This setting is available both in coppermine config and the category manager. If you enable alphabetical sorting, the move up and move down arrows that normally let you manually sort the categories will disappear. Disable this feature if you want to organize your categories in some other order.

You can only assign a picture to the category only if you have an album with images nested directly within it.

Back to top


4.6 The Album Manager

Coppermine stores files inside of albums, so you'll need at least one album for your pictures/files to be placed in. Albums can be stored in categories (but they don't HAVE to be in a category, they can just as well go into the coppermine "root").

When you click on "albums" in the admin menu, you will see the Album Manager.

4.6.1 Creating albums

  • Choose a category from the dropdown list "Select category" and highlight the selection where you would like your album to reside in. (or choose "* No category *" if the album should go into the coppermine "root"). If you haven't created a category yet, go to the categories control panel first. Or, you can proceed with these steps to first create an album and move the album into a category later. You can also perform this moving task by using the album properties page.
  • To create an album, click on the "New" button - a new album will appear on the list, by default this album is labelled "New album"
  • Click on the text input field at the bottom of the screen, highlight the default name "New album"
  • Then type in the album name you want to use
  • (repeat steps 2 through 4 to add additional albums)
  • Click "Apply modifications" to submit your changes to the database. failure to do so will result in the loss of all the changes you just made. You can always return to this panel to edit and change album names, sort them within their parent category, and/or move them to different parent categories.
  • After clicking to Apply Modification, confirm your intent in the alert box with &the quot;OK" (Are you sure you want to make these modifications ? button.)

4.6.2 Renaming albums

  • Choose a category from the dropdown list
  • Click on the album you want to change
  • Click on the text input filed at the bottom of the screen, highlighting the album name
  • Type the album name you want to assign
  • Click "Apply modifications"
  • After clicking to Apply Modification, confirm your intent in the alert box with &the quot;OK" (Are you sure you want to make these modifications ? button.)

4.6.3 Changing the album order

  • Choose a category from the dropdown list
  • Click on the album you want to move up or down in the list
  • Use the arrow buttons to move the album up or down
  • Click "Apply modifications"
  • After clicking to Apply Modification, confirm your intent in the alert box with &the quot;OK" (Are you sure you want to make these modifications ? button.)

4.3.4 Deleting albums

  • Choose a category from the dropdown list
  • Click on the album you want to delete
  • Click the "Delete" button
  • Confirm the alert box with "OK" (Are you sure you want to delete this album ? All files and comments it contains will be lost !)
  • Click "Apply modifications"
  • After clicking to Apply Modification, confirm your intent in the alert box with &the quot;OK" (Are you sure you want to make these modifications ? button.)

Back to top


4.7 Modifying albums/files

When you are in admin mode there is a menu displayed next to each album

Delete allows you to delete the album and (CAUTION) all files within it.

Properties allows you to modify the name, description and permissions of the album

Edit files allows you to modify the title/caption/keywords etc... of the files in the album

Back to top


4.8 Album properties

The "Album category" drop down list allows you to move an album from one category to another. If you set this to "* No category *" then the album will be displayed on your main page.

Use bbcode to add links and additional formating to your descriptions.

The thumbnail option lets you select the picture that will represent the album in the album list. Do not assign a picture here if you would like the album to select images randomly.

If you have set "Users can can have private albums" to YES on the config page, you can determine who will have permission to view the files of this album.

When "visitors can upload file" is set to YES, it is possible for them to upload files into albums by enabling this permission.

Note that only visitors who are members of a group for which the setting "Can upload pictures" is set to YES. Members not in the permitted group will not be able to upload files into such an album. Non-registered users are members of the "Anonymous" group.

The same rules as above apply for "Visitors can post comments" and "Visitors can rate files".

In 1.4.x the Album Keyword is no longer being used for searching purposes, but, rather, to link images from other album into another. Using this method, files/images can be displayed in various albums while the file itself need only exists in one album on your webserver. You simply upload a file to one album as you would normally do, then assign one or more keywords to the file. The keyword function reads blank spaces between words as a 'break' and assumes that these words are separate words. If you must use phrases for your keywords, connect them with an underscore or by using the ascii space holder ctrl+Alt+0160 (NOTE: the latter option only works with latin based character sets.) Each album can only have ONE (1) keyword or keyword phrase. All pictures residing in different albums that you would like to be displayed in this album must have the same keyword or keyword phrase in their respective keyword fields. Pictures, unlike albums can have multiple keywords or keyword phrases separated by spaces. This provides you with the option to display pictures in many albums. For the visitor of these albums, it will appear as if the file/image had been uploaded to each.

Album Password: you can specify an album to be password-protected (instead of relying on the "regular" group-based permissions). This way, you can even allow access for unlogged users (guests) who you provide the password to. Use this option, for example, to set up an album for your family members only by specifying a password that only they can come up with answering an additional password hint (e.g. "What was the maiden name of aunt Emma?"), or you could decide to send the particular password to specific friends, family or business associates by email. The optional password hint will be displayed at the password prompt, when set.

Note: when setting an album password, the permission dropdown field "Album can be viewed by" will be switched automatically to "me only" - this is expected behaviour. If you change the "Album can be viewed by" to another selection, you must disable the album password as well.

4.8.1 Reset album properties

You can reset the number of views count and total ratings in the album properties panel and even delete all pics at once in the sub-section "Reset album" by ticking the desired checkboxes and then submitting the form. To prevent accidental resets, you will have to place a tick on the checkbox "I'm sure" before changes can be submitted (the button will be greyed out (disabled) if you don't).

Use these options with care: the deleting of files is irreversible, as well as the reset of views and ratings (you can only restore views and ratings by manually editing coppermine's database entries with third-party tools like phpMyAdmin - not recommended).

Back to top


4.9 Editing files

Use this link to modify your file's title, description, keywords, and custom fields (if they are used).

Use the album drop down menu in the panel to move the file between albums. Use keywords to link files to other albums (see description in the albums section above).

Back to top


4.9.1 Editing videos

Here, you can modify the title, description, keywords, and custom fields (if they are used) of your video files.

Use the album drop down menu to move the video to another album.

Use the height and width fields to set the size of the video.

Video uploads are possible beginning with cpg1.3.0 (or latter) and are included as part of the distribution package. For cpg1.2.1 you must install a separate modification.

[cpg1.3.0 or better required]

Back to top


4.9.2 Custom Thumbnails

Order of thumbnails:
Thumbnails are defined by different levels (these are: user-defined, theme-defined, global) then in the order of their type (file-specific, extension-specific, media-specific). User-defined thumbnails are stored in the folder where the parent file is located. Theme-defined thumbnails are stored in the themes 'images' folder. Global thumbnails are stored within the 'images' folder of the Coppermine root. Thumbnails can be one of the following file types: 'gif', 'png', or 'jpg'.

Types of thumbnails:
File-specific thumbnails must have the same base name as the file. Using the above screenshot of a video file as an example, the thumbnails for this file could be 'thumb_thailand_waterfall.gif', 'thumb_thailand_waterfall.png', or 'thumb_thailand_waterfall.jpg', and searched for by cpg in that order.

Extension-specific thumbnails are named after the extension of the file. (Examples: 'thumb_wmv.jpg', 'thumb_wav.jpg'.)

The base name for media-specific thumbnails are 'thumb_movie', 'thumb_document', and 'thumb_audio'. Images use file-specific thumbnails by default.

Uploading:
There are 2 ways to upload custom thumbnails:

1. Have an image already uploaded then upload a video via the upload page. (or vice versa) The video will share the thumbnail of the image.



2. FTP upload both the video and (thumbnail or image) then batch-add. If you FTP upload the thumbnail, the thumbnail will be display in the batch add page instead of the default Coppermine thumbnail. If you upload an image it will look like the above screenshot. However, when the both files are added to the database, the thumbnail of the image will be used by the video.



Final result.

Note: If the first method is used and the image later deleted, the thumbnail will also be deleted and the default Coppermine thumbnails will be displayed, instead.
If a previously uploaded video is to be uploaded again, via FTP, the accompanying thumbnail must also be uploaded, via FTP, to the same folder.

Video uploads are permitted from verstion 1.3.0 of cpg (or better) and are included as part of the distribution package. For cpg1.2.1, this option is only available as a separate modification. The use of custom thumbnails aren't supported in versions prior to 1.3.0. NOTE: Using the above instructions, a custom thumbnail can be applied to any file, not just videos.

FAQS:

  • Quote
    I have a video named 'movie.wmv', when I upload a thumbnail for it 'thumb_movie.jpg' it replaces the thumbnails for multiple videos!!!!
    Duhh. 'thumb_movie.jpg' is a media-specific thumbnail. Rename the video and the thumbnail with something other than just 'movie'.
  • Quote
    I can't find my user's folder!
    From within Coppermine, browse to the user's album. Look in the url of your browser and you should see the folder's name. (See screenshot for an example.)

    Your users can upload their own thumbnails by using this trick: Create an album. Change the permissions on it so no one can view it except that specific user. Then upload the fullsized images of the thumbnails to this folder. Files outside this album will be able to use the thumbnails of these images. (See above for naming.)
  • Quote
    How do I stop my users from creating their own custom thumbnails?
    Currently, this is not possible.

[cpg1.3.0 or better required]

Back to top


4.10 Using bbcode to insert links and special formatting in various description fields

Coppermine understands the following bbCodes (the same bbCodes that are used by phpBB and many other BBS apps) in image and album description

  • [b]Bold[/b] => Bold
  • [i]Italic[/i] => Italic
  • [url=http://yoursite.com/]Url Text[/url] => Url Text
  • [email]user@domain.com[/email] => user@domain.com
  • [color=red]some text[/color] => some text
  • [img]http://coppermine.sf.net/demo/images/red.gif[/img] =>

Back to top


4.11 Uploading pics/files

There are several methods to upload files within Coppermine. You (as gallery admin) should use FTP-upload plus batch-add (only the admin can do this). Regular users are supposed to use the "regular" http upload or (if they have Windows XP) the XP Publisher.

Back to top


4.11.1 Uploading pics by FTP / Batch-Add Pictures

It is recommended that the coppermine admin use ftp to upload multiple pics/files at a time. Use your ftp software to create sub-folders within your_coppermine_directory/albums/, where your ftp uploads can be saved. Though not mandatory, it's always a good idea to have a folder structure within the albums folder that reflects or mirrors your coppermine categories and albums.

Important: do not create folders or ftp upload to the userpics- nor to the edit-folder by ftp: these folders are used by coppermine internally and must not be used for any other purpose! Folder names must not contain dots. We also highly recommend refraining from the use of any other special characters - use only a-z, numbers and - (dashes) or _ (underscores) to fill blank spaces. Make sure to upload in binary or auto-mode.

Once you have uploaded your photos by ftp, click on the "Batch Add Pictures" button. The batch-add is performed in three steps:

  • find the directory under which you have uploaded your photos. Select this directory by clicking on it.
  • select the photos you wish to upload (by ticking them). New pics are automatically pre-selected, those that already are in your coppermine database are not selected. Next select thee album you wish to insert them into. Click "Insert Selected Pictures" to start the batch-add process.
  • CPG will then display the results of the batch-add (allow some time for all results to display).
    If the OK, DP, or PB 'signs' does not appear, click on the broken file image to see if any error message was produced by PHP.
    Should your browser time out, hit the reload button.
    • OK : means that the file was succesfully added
    • DP : means that the file is a duplicate and is already in the database
    • PB : means that the file could not be added, check your configuration and the permission of directories where the files are located
    • NA : means that you haven't selected an album the files should go to, hit 'back' and select an album. If you don't have an album create one first

Giving FTP-access to other users can pose a serious security threat, this is why batch-add is only available for the coppermine gallery admin.

Once files have been added to coppermine's database, make sure that you never rename or delete them via ftp - use coppermine's admin menu options to remove or rename files, instead. Only in this way will these files be removed from both the file system and the database.

Back to top


4.11.2 Uploading by HTTP

Regular HTTP uploads use the browser's built-in capabilities to upload files to a server. The maximum file size is determined by two basic factors: the speed and amount of data the web-browser can upload before timing out, and the allowed file size determined by server settings. Note that those settings are not determined by coppermine, but the server config (php.ini). Users who are webhosted usually can't edit php.ini, so they will have to live with the settings the webserver admin has set up. Those who actually run their own server and can edit php.ini should take a look at the settings if (large) http uploads fail:

  1. max_input_time- 60 seconds is the default time limit for uploading files.
    This time limit includes the time it takes for the files to upload, so if you exceed this limit, the file will not even parse, and the browser will not get a response. You can workaround this by trying to upload smaller or fewer files, or you can try uploading over broadband. The best solution, of course, is to increase the time limit to something more in line with your needs.
  2. upload_max_filesize - 2MB is the default limit for individual files.
  3. post_max_size - 8MB is the default limit for post requests.
  4. memory_limit - 8MB is the default size.
  5. PHP's LimitRequestBody - 512KB default limit. (mainly an issue on Redhat/Apache systems. Found in /etc/http/conf.d)
    In general, upload_max_filesize < post_max_size < memory_limit in order for uploads to function properly. Coppermine may warn you if a file exceeds upload_max_filesize, but it cannot warn you if the total size of all the files exceeds the post limit or the memory limit.
  6. file_uploads - This determines whether or not PHP will allow file uploads. It must be set to 'On'.
  7. upload_tmp_dir - This specifies the temporary directory where PHP stores uploaded files.
    The most common issue caused by this setting is an open_basedir warning. In this situation, your server administrator has restricted the files that PHP can work with to a certain directory. If he does not create and specify a temporary directory within the open_basedir restriction, PHP will attempt to use the OS temporary directory, and it will be rebuffed by the open_basedir restriction.
  8. allow_fopen_url - This controls PHP's ability to read files using URL/URIs. If it is disabled, Coppermine will not be able to upload from URLs.

It should be obvious that the files have to be uploaded somewhere (into some folder) on your webserver - this is the albums folder within the folder you installed coppermine on your server. The HTTP uploads go into subfolders of the "userpics" folder (which resides within the "albums" folder). Obviously, the coppermine upload script needs write permissions to upload the files there. This is why you have to change permissions on the albums folder and everything within it during coppermine install - make it writable for the user the webserver runs under. This is done using the CHMOD command on Unix/Linux based servers. If you experience issues with uploading, make sure that you have set the permissions correctly.

Back to top


4.11.3 Using Windows XP Web Publishing Wizard with Coppermine

If you are using Windows XP, you can use its built-in web publishing wizard to upload your photos to your gallery.

Once you have properly installed the script on your server, call the xp_publish.php file from your web browser (http://your_site.com/coppermine_dir/xp_publish.php).

The script displays some information on how to do the installation on the client side and how to use the Wizard. Basically you will need to download a small file created by the script that needs to be loaded into your Windows registry.

If you want to allow your users to use the Windows XP Web Publishing Wizard, it's advisable to promote it by showing a link to the file somewhere on your page.

4.11.3.1 XP Web Publishing Wizard: Setup

Before you can use the XP Web Publishing Wizard, it needs to know the address of the your gallery.
  • Open your browser and type the following into the address box replacing "your_site.com" and "coppermine_dir" with your own Gallery address information : http://your_site.com/coppermine_dir/xp_publish.php
  • On "File Download - Security Warning" click "Save" to save the cpg_###.reg file on your Desktop. (The ### represents a 10-digit numerical timestamp.)
  • Open Windows Explorer
  • Select Desktop from the left panel
  • Double click on the file name that you just saved
  • On Registry Editor's "Are you sure..." dialog click "Yes"
Above procedure needs to be done only once by users wishing to use the XP Publishing Wizard.

4.11.3.2 XP Web Publishing Wizard: Uploading pictures

The process of uploading pictures is a matter of following a simple dialog. It takes much longer to describe the process than do it.
  • Start Windows Explorer and locate the directory with your photographs and select one or more pictures for upload.
  • If the Windows Explorer left panel is not titled "Picture Tasks", click on the "X" in the top right corner of the panel to close it and to reveal the Picture Tasks panel.
  • Select "Publish xxxx to the Web" from "File and Folder Tasks" on the left panel. "xxxx" could say "this file, these files or this folder" depending on what is highlighted on the right panel.
  • On Web Publishing Wizard's Welcome screen click "Next".
  • You can change your selection if necessary on the Thumbnail window showing up. Click "Next" when you are ready.
  • From the service provider window highlight your Photo Gallery name and click "Next".
  • Enter your Coppermine username and password to login to your gallery and click "Next".
  • From the "Welcome username" window you have an option of uploading your picture(s) into one of the existing albums or starting a new album. Click "Next" when you are ready.
  • Click "Next" in the upload starting confirmation window.
  • Select the picture sizes for the uploaded pictures. If you are unsure about acceptable picture sizes, verify with your Gallery administrator. Click "Next" when you are ready.
  • You are presented with the last window of the dialog and given a choice of opening the Gallery when the upload is complete.
  • Click "Finish" to end the XP Web Publishing Wizard and to enter the Gallery to check the new album contents.

[cpg1.1.1 or better required]

Back to top


4.11.4 Upload troubleshooting

If you are experiencing issues with coppermine's upload process, temporarily change your coppermine settings as suggested below to get more detailed error messages. This applies to all upload methods, not only HTTP uploads.

  • Log in as admin
    Go to your coppermine page and log in as admin
  • Go to the config screen
  • Scroll to the bottom of the page
  • Expand the "Maintenance settings" section by clicking on it
  • Enable debug mode for everyone
    (set Enable debug mode to "Yes: Everyone")
  • Leave display of notices switched off
    (notices are only meant for developers. If you have idea what they mean, leave them off.)
  • Save the new settings by clicking on "Save new configuration"
  • Go to the "groups" panel
  • Set the upload form configuration for all groups to "Single file uploads only"
    1. set File upload boxes to "1" (1)
    2. set URI upload boxes to "0" (2)
    3. set No. of boxes to "fixed" (3)
  • Save your new settings
    (click on "Apply Modifications")
  • Then try to upload (using http uploads, even if you experienced troubles using another upload method) - you should get a more detailed error message that tells you what exactly goes wrong with your uploads. If the error message doesn't mean anything to you, search the support board for the error message you get.

    4.11.5 Asking for support on upload issues

    When asking for support on the coppermine forum, post a link to your site and a test user account (the test user mustn't be in the admin group!) with upload privileges, with the above mentioned settings in place - this way, supporters can see the error messages as well. Do not post debug_output unless requested. If you want fast results, you should disable admin approval for the group the test user is in, so supporters can tell instantly what is wrong without needing to double-check.

    When people have issues with uploading and decide to post their question on the Coppermine support board, they usually are told to read this upload troubleshooting section. Many of them fail to do so properly, which results in frustration both for users as well as supporters. To make this absolutely clear: the above mentioned steps are absolutely mandatory, no matter what skill level you have, no matter what upload method you have troubles with. Failing to do exactly as suggested will result in your request for help being ignored. Yes, this applies to you. We mean it!

    4.11.6 Error messages

    Below is a list of common error messages and possible reasons / fixes. Before asking for support, make sure to have read the row that deals with the error you get and tried to apply the suggested fix.

    Error message Possible cause Suggested fix
    Impossible to move somepic.jpg to albums/userpics/
    Warning: move_uploaded_file(/tmp/phpezCYKr)
    [function.move-uploaded-file]: failed to create stream: Operation not permitted
    PHP's temporary folder is missing or doesn't have the needed permissions You should contact the admin of your webhost because you usually can't change the location of the website's temporary directory for file uploads, yourself (it is part of PHP configuration) .
    If the open_basedir restriction is in effect on your site then the temp directory for file uploads should be one that you can access.
    Impossible to move somepic.jpg to albums/userpics/ The coppermine script doesn't have permissions on the filesystem of the server to create the thumbnail or intermediate image within the specified folder Apply permissions on the albums folder and everything within it as suggested in the section Setting permissions. This error message is the most frequent one, as many users tend to skip reading the permissions section. At least when getting this error message, you should read it thoroughly.
    Warning: opendir(./albums/edit): failed to open dir: No such file or directory
    • 'edit'-folder in your albums folder is missing
    • 'edit'-folder in your albums folder doesn't have rwx-permissions
    • Improper upgrade from cpg1.3.x
    • Make sure you have a folder named 'edit' in your albums folder.
    • Make sure the edit directory has been chmod to 777/755.
    • Make sure you have completely upgraded to Coppermine 1.5.x
    Warning: Undefined variable: HTTP_POST_VARS in include/init.inc.php on line 43
    • Outdated PHP-version on your server
    • Improper webserver configuration
    Check if your version of PHP fullfills the minimum requirements for Coppermine. If your version is 4.1.0 or better, then this error is probably caused by a misconfiguration of your hosting server, and not a Coppermine issue. If the server isn't yours to configure properly (that is: if you're with a webhost), you can try this workaround (at your own risk):
    Edit the file "init.inc.php" and look for
    $PHP_SELF = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['SCRIPT_NAME'];
    Replace it with
    $PHP_SELF = $_SERVER['PHP_SELF'];
    Sorry there is no album where you are allowed to upload files
    • You (as admin) haven't created any albums yet.
    • You (as non-admin user) don't have the permission to upload to public albums
    • You haven't created at least one album in your personal gallery
    • If you get this message when being logged in as the admin of your gallery, you have to create at least one album where file uploads could possibly be uploaded to
    • If you get this message when being logged in as non-admin, you have to make sure that you have understood the concept behind coppermine: the admin determines on the groups control panel wether users can have personal galleries (i.e. create albums inside their user gallery) or if they are allowed to upload into admin-created public albums. If the user is allowed to have personal galleries and gets this message, he needs to create at least one album first by clicking on "Create / oder my albums". If the user is suppossed to upload to public albums (that need to be created by the admin in advance) and gets the above mentioned error message, the admin needs to specify at least one public album where users are allowed to upload to using the album properties screen.
    Fatal error: Allowed memory size of XXXXXXX bytes exhausted at (null):0 (tried to allocate XXXX bytes) in /var/www/html/include/picmgmt.inc.php This error occurs when using GD and attempting to upload a high resoltuion image. It's not the size of the file that matters here; it's the number of pixels that determine memory use in GD. There is (at least in theory) no limit in Coppermine to the file size or dimensions that the script can handle. However, there is at least one limit existing on the webserver: resizing images (to create intermediate images and/or thumbnails) consumes memory and burns CPU cylces. To prevent the server from crashing, the server admin has to restrict the amount of memory that a PHP script is allowed to consume. The error message mentioned above means that the limit imposed by the server admin has been reached, i.e. the image that the script tried to process consumed to much memory.
    • Alternative 1 (ideal):
      Increase the memory limit allocation in php.ini. You must be the server's administrator to do this. Also, .htaccess files cannot change this configuration setting, and it cannot be changed using ini_set(). First, you locate the following block in php.ini (if you actually are the server admin):
      ;;;;;;;;;;;;;;;;;;;
      ; Resource Limits ;
      ;;;;;;;;;;;;;;;;;;;
       
      max_execution_time = 30 ; Maximum execution time of each script, in seconds
      max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
      memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
      Now you increase the memory limit to fit your needs. 9 to 16 MB should handle most requirements. To calculate the amount of memory an image uses, you simply multiply the pixel width and height, and then you multiply the result by the number of base colors (RGB - 3, CMYK - 4). Finally, you divide by 1048576 to get the memory usage in MB.
      Here are some common image resolutions and their memory use in GD (assuming RGB):
      • 800 x 600 - 1.37 MB
      • 1024 x 768 - 2.25 MB
      • 1200 x 1600 - 5.49 MB
      Remember when using the above figures that the amount of memory being used by the rest of Coppermine must be taken into account, too.
      If you are unable to change php.ini settings yourself, you can always ask your server administrator to change this for you. However, most administrators (especially on shared webhsoting) will be reluctant to do so, as this setting will affect everyone on a shared server. A higher memory limit requires reducing the number of people who can be hosted on the same server in order to maintain server stability. This reduces profitability, etc.
      If you cannot change php.ini, you should read alternatives 2 and 3.
    • Alternative 2 (sensible):
      Resize your images before uploading if you do not require high resolution images. This saves upload bandwidth and time for you.
    • Alternative 3 (workaround):
      You may download one of many free programs that resize images. Then resize the images to a smaller resolution (like 800 x 600) by the batch into a different folder while maintaining the same filenames.
      Upload the resized images to Coppermine. Then use your FTP client to overwrite the images with the higher resolution images.
    Exec() has been disabled php.ini allows the server administrator to disable certain functions. Usually this is the case if your server is running in safe_mode. If the server administrator has disabled exec() you will not be able to use Image Magick.
    You may try to replace exec() with passthru() in the entire core code of coppermine (not recommended) if it has not been disabled as well. Otherwise, you can't use ImageMagick and must use GD. Change Method for resizing images in config accordingly.
    Not a GD extension The file(s) you tried to upload can not be handled using the GD ImageLibrary The GD library can only handle jpeg, png and gif files, while the ImageMagick library supports additionally bmp, psd and some other (less common) file types. However, those files are not suitable for use on the internet. Details can be