Coppermine 1.4.x FAQ

FAQ für Coppermine Photo Gallery v1.4.x
Quellenangabe und Copyright unter Coppermine Dokumentation

Mit tausenden von Benutzern ist es keine Überraschung, dass viele gleiche Fragen in den Supportforen der Coppermine Fotogalerie gestellt werden. Um die Hilfe bei Eurer Websiteentwicklung zu erleichtern haben wir diese grundsätzlichen FAQ hier hinzugefügt. Bitte schaut erst diese FAQ durch, bevor ihr Eure Fragen im Forum stellt.

Inhaltsverzeichnis:


 

Installation

Was ist die Mindestvoraussetzung für die Installation und Verwendung von Coppermine 1.4.x ?



[nach oben]

Was ist ImageMagick und wie bekomme ich es?

GD ist eine graphical library, die es PHP ermöglicht Bilder zu bearbeiten. Wenn Du Deinen eigenen Webserver betreibst, dann kannst Du GD unter www.boutell.com/gd/ runterladen. Unter L(Unix) Systemen könnte es nötig sein, abhängig von der Apache Version, PHP neu zu kompilieren. Die meisten neusten PHP Versionen bringen GD direkt mit. Auf den meisten Windows Systemen kann GD direkt in der php.ini aktiviert werden. Wenn Du von einem Webhoster abhängig bist, dann überprüfe, ob GD/GD2 Unterstützung für Deine Seite zur Verfügung steht. Sollte das nicht der Fall sein, frage deinen Webhoster, ob Du es haben kannst oder Suche Dir einen Neuen. GD/GD2 sind meistens ein Standardfeature bei den meisten Webhostern.

[nach oben]

Was ist GD und wie bekomme ich es?

ImageMagick ist eine andere graphical library wie GD/GD2 für die Bildbearbeitung. Solltest Du einen eigenen Webserver laufen haben, dann kannst Du es unter imagemagick.org runterladen. Dort sind Sources für Unix, Linux, Mac and Windows erhältlich, sowie binary packeges für verschiedene Server Betriebssysteme. Wenn man bei einem Webhoster ist, dann kann man ImageMagick nicht selbst installieren.

[nach oben]

Wie kann ich heraus finden, welche PHP Version ich benutze?

Wenn Du Coppermine noch nicht installiert hast, dann erstelle eine leere Datai mit dem Namen "info.php". Schreibe den folgenden Code hinein: <?php phpinfo(); ?>. Speichere die Datei und lade sie auf Deinen Server hoch; anschließend rufe die Datei in deinem Browser auf. (z.B. http://www.deinedomain.de/info.php). In der ersten Zeile ist die PHP Version zu finden "PHP Version X.Y.Z"
Bitte beachte: die info.php Datei auf Deinem Websever kann ein Sicherheitsrisiko sein; am besten nach Gebrauch läschen in ein Passwort geschütztes Verzeichnis verschieben!
 
Wenn Du bereits Coppermine installiert hast, dann findest Du eine phpinfo Datei (phpinfo.php) in den Coppermine Ordnern. Log Dich in Dein Coppermine Setup als Admin ein und tippe folgende URL in Deinen browser ein: http://deineadresse.tld/dein_coppermine_ordner/phpinfo.php .

[nach oben]

Wie kann ich heraus finden, welche GD Version ich benutze?

Wenn Du Coppermine noch nicht installiert hast, dann erstelle eine leere Datai mit dem Namen "info.php". Schreibe den folgenden Code hinein: <?php phpinfo(); ?>. Speichere die Datei und lade sie auf Deinen Server hoch; anschließend rufe die Datei in deinem Browser auf. (z.B. http://www.deinedomain.de/info.php). Suche nach einer Tabelle wie dieser:

gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
JPG Support enabled
PNG Support enabled
WBMP Support enabled


Bitte beachte: die info.php Datei auf Deinem Websever kann ein Sicherheitsrisiko sein; am besten nach Gebrauch läschen in ein Passwort geschütztes Verzeichnis verschieben!
 
Wenn Du bereits Coppermine installiert hast, dann findest Du eine phpinfo Datei (phpinfo.php) in den Coppermine Ordnern. Log Dich in Dein Coppermine Setup als Admin ein und tippe folgende URL in Deinen browser ein: http://deineadresse.tld/dein_coppermine_ordner/phpinfo.php . Scroll dann runter bis zum GD Bereich.
[nach oben]

Was ist der Unterschied zwischen GD1 und GD2?

GD2 ist eine aktualisierte Version von GD1 und als solche werden Bilder mit einer besseren Qualität erzeugt (Zwischenbilder und Thumbnails).

Hier ist ein Beispiel, genommen von w-nailer: about resizing
(Original Bildgröße: 1024 x 768 Pixel):
GD 1.8.4:
ImageCreate
ImageCopyResized
128 x 96 pixels
GD 2.0.1:
ImageCreateTrueColor
ImageCopyResampled
128 x 96 pixels
Upgrades der GD Lib nach dem Coppermine installiert worden ist hat keinen Effekt mehr auf Bilder, die bereits erstellt worden sind. Allerdings auf diese, die nach dem Upgrade erstellt werden. Nur Dein Webhoster kann GD Lib installieren oder erbessern, außer wenn Du Deinen eigenen Webserver hast!
[nach oben]

Wie sind die einzelnen Schritte um Coppermine zum laufen zu bekommen?

Wie in der Coppermine readme Datei genannt:

  1. Coppermine herunterladen
  2. Auf Deiner Festplatte entpacken
  3. Den Inhalt des Coppermine Ordners auf Deinen Server hochladen (Du kannst es im Wurzelverzeichnis oder einem anderen beliebigen Ordner installieren).
  4. CHMOD (CHange permission settings MODe) Deine neu hochgeladenen Coppermine "include" and "albums" Ordner und Unterordner um Schreib- und Leserechte zu setzen. Wenn Dein Webhoster keine Dateiverwaltung anbietet um die Rechte zu setzen, dann musst Du im Netz nach einem ftp Programm suchen, es downloaden und installieren um diese Aufgabe zu erledigen.
  5. Erstelle eine Datenbank, wenn noch keine vorhanden ist. Du brauchst keine Tabellen in Deiner neuen Datenbank zu erzeugen. Dies wird Coppermine für Dich tun. Wenn Du bereits eine Datenbank auf Deiner Website hast, dann kann Coppermine auch diese nutzen.
  6. Wenn Du auf einem Yahoo Webserver installierst, dann lies zuerst das.
  7. Rufe mit Deinem Browser die Adresse http://www.deineseite.de/coppermine/install.php auf und folge den Anweisungen der Installationsdatei (Hier werden die mySQL Tabellen erstellt und mit den Standardwerten aufgefüllt)
  8. Nach erfolgreicher Installation lösche die install.php Datei von Deinem Webserver.
  9. Rufe mit Deinem Browser http://www.yoursite.com/coppermine/ auf und melde Dich als Admin an, indem Du Benutzername und Passwort, die Du bei der Installation angegeben hast, eingibst. Klicke im Adminmodus auf CONFIG um deine Coppermine Fotogalerie einzurichten.
  10. Experimentiere mit Deiner Installation herum, erstelle neue Kategorien, Unterkategorien und Alben. Lade ein einige Bilder hoch (noch nicht zu viele), und teste, ob alles funktioniert.
  11. Rufe mit Deinem Browser die Seite http://www.deineseite.de/coppermine/docs/ auf und LIES die Dokumentation. Die Dokumentation hilft dabei Deine Fragen zu beantworten und Probleme zu lösen, so dass die Seite all Deinen Wünschen entspricht. Das Lesen der Dokumentation wird einige Minuten in Anspruch nehmen. Die Problemlösung kan sogar Tage oder Wochen in Anspruch nehmen
  12. Wenn Deine neue Coppermine Installation in einem Unterordner auf Deiner Seite ist, dann veröffentliche diese indem Du auf diese verweist.

[nach oben]

Wie kann ich ImageMagick oder GD installieren?

Du kannst nur ImageMagic oder GD installieren, wenn Du Deinen eigenen Server laufen lässt oder Du hast shell Zugriff auf Deinen Webserver. Wenn Deine Seite bei einem Webhoster liegt, dann kann st Du nur Kontakt zu ihm aufnehmen und fragen, ob er die Erweiterungen für Dich installiert. Sollte das nicht klappen, dann wähle einen anderen Anbieter.

[nach oben]

Ich habe geringe Speicherplatzkapazität. Gibt es eine "Minimum Installation"?"?

DAs ist natürlich ein Widerspruch in sich: Eine Galerie laufen zu haben bedeutet normalerweise, dass außreichend Speicherplatz für Bilder vorhanden sein muss, aber wenn Du auf dem geringen Speicherplatz, der Dir noch übrig bleibt, nur ein paar wenige Bilder veröffentlichen möchtest, dann gibt es schon ein paar Dateien, die Du (falls nicht benötigt) nicht dochzuladen brauchst oder löschen kannst. Es ist trotzdem empfehlenswert, dass nur erfahrende Benutzer eine Minimuminstallation erstellen. Bei Zweifel besser eine Komplettinstallation machen!

  1. Beseitige alle Sprachen, die Du nicht benötigst (Wenn alle Benutzer aus dem gleichen Land kommen).
    Es ist empfehlenswert für Dich als Admin Englisch zu behalten, auch wenn alle Benutzer andere Sprachen benutzen, damit Du ab und zu die Englische Sprachdatei nutzen kannst.
    Lösche alle Dateien aus dem lang-Unterordner Deiner Coppermine Installation, außer DeineSprache.php (z.B. wenn Du Deutsch nutzt, lösche alle Dateien außer /lang/german.php).
    Eingesparter Speicherplatz (maximal): 2.9 MB
  2. Beseitige alle Sprachen mit einer Enkodierung, die Du nicht benötigst.
    Du wirst festellen, dass für jede Sprache in deinem Lang Ordner zwei Dateien existieren: deinesprache.php und deinesprache-utf-8.php. Du brauchst die utf-8 Dateien nur, wenn Du "Unicode(utf-8)" ausgewählt hast beim "Character encoding" auf deiner Einstellungsseite. Wird Unicode (utf-8) genutzt, wird die galerie in der Sprache angezeigt, welche Dein Benutzer in seinem Browser eingestellt hat. Wenn Du Unicode (utf-8) nicht eingestellt hast, in der Coppermine Konfiguration, dann kannst Du die "utf-8" Dateien gefahrlos aus dem lang-Ordner löschen.
    Eingesparter Speicherplatz (maximal): 1.7 MB
  3. Entferne alle nicht benötigten Themes
    Entferne alle Themes, welche Du nicht nutzen willst aus deinem themes-Ordner. Wenn Du ein angepasstes Theme benutzt, ist es empfohlen das classic/default theme nicht zu löschen, da es für administrative Zwecke noch gebraucht wird.
    Zum Beipiel: Wenn Du das Theme "Eyeball" nutzt, welches mit coppermine mitkommt, kannst Du gefahrlos die Unterordner  "classic", "fruity", "hardwired", "igames", "mac_ox_x", "project_vii", "rainy_day", "styleguide" und "water_drop" aus einem Themes Ordner löschen.
    Eingesparter Speicherplatz (maximal): 1 MB
  4. Entferne einige Dokumentationen aus dem docs Ordner
    Der docs-Ordner enthält Dokumente welche Dir helfen sollen Coppermine einzustellen und zu administrieren. In cpg1.4.0 oder neuer sind da einige Dateien in diesem Ordner, welche nicht notwendig sind auf dem Server damit die HilfeIcons funktionieren; andere sind optional. Du kannst die Dateien "credits.html", "faq.html", "README.html", "theme.htm" und "translation.htm" entfernen. Alle anderen Dateien (und der Unterordner "pics") sollten auf dem Webserver verbleiben, wenn Du willst das die Hilfeicons weiter funktionieren (empfohlen).
    Eingesparter Speicherplatz (maximal): 164 KB
  5. Entferne bridge-Dateien
    Das Coppermine Paket enthält bridge-Dateien, welche gebraucht werden für die Integration von Coppermine in bulletin board Software wie phpBB, SMF usw. Es ist ungefährlich einige der Dateien im bridge Ordner zu löschen; Wenn Du eine bbs Integration benutzt, musst die die Dateien behalten, welche mit dem bbs kommunizieren welches Du benutzt. Wenn Du keine Integration benutzt, musst Du die Datei coppermine.inc.php behalten. Die Datei udb_base.php wird benötigtbei allen Setups und sollte deshalb nicht gelöscht werden.
    Eingesparter Speicherplatz (maximal): 85 KB
  6. Entferne die Flaggen
    Wenn Die die Sprachauswahl über die Fahnen nicht benutzt, kannst Du gefahrlos den flags Unterordner löschen (/dein_coppermine_ordner/images/flags/). Wenn Du die Flaggenoption benutzt kannst Du natürlich die Flaggen löschen, welche Du nicht nutzen willst.
    Eingesparter Speicherplatz (maximal): 80 KB
  7. Entferne die Dateien, welche nur für für Installation und Update gebraucht werden
    Wenn Coppermine fertig installiert ist und sicher läuft, kannst Du alle Dateien löschen, welche nur für die Installation gebraucht werden: Aus dem Coppermine Wurzelverzeichnis lösche die install.php, installer.css, update.php, upgrade-1.0-to-1.2.php. Du kannst auch den Ordner "sql" löschen. Wenn Du Dein Coppermine später Updaten Upgraden willst (wenn eine neue Version heraus kommt), Dann musst Du natürlich die update Dateien und den Sql-Ordner vor dem Update/Upgrade wieder hochladen auf deinen Webserver.
    Eingesparter Speicherplatz (maximal): 73 KB
  8. Wähle aus dass nur die Zwischengrößen und Thumbnail-Bilder dargestellt werden können.
    Wenn Du mit Batch hinzufügen der Bilder fertig bist und verglichen hast dass die Bilder korrekt dargestellt werden im CPG setup, kannst Du die über die Admin Tools auswählen, dass die Photos in der Originalgröße gelöscht werden.
Zusammenfassung: Eine minimale Installation von Coppermine wird annähernd 3.3 MB Webspace brauchen.
[nach oben]

Upload

Generelle Upload Fehlersuche

Bei der Upload Fehlersuche in CPG 1.4 ist es empfohlen die Upload Einstellungen in der Gruppenkonsole auf 'nur Einzel upload' einzustellen und den Debug Modus in der Konfigurationskonsole zu aktivieren. Das Ändern dieser Einstellungen schaltet die Fehlermaskierung beim Multiplen Upload ab. Das erlaubt Dir einen Zugrif auf detailliertere Fehlermeldungen.

Als Allererstes : Überprüfe deine Ordner- und Dateiberechtigungseinstellungen in den Verzeichnissen  /albums, /albums/userpics, und /albums/edit. Diese sollten alle 777 oder 755 sein.
Wenn Du nicht weißt, was wir meinen mit 777 oder 755, solltest Du einmal eine Google Suche nach Unix Dateiberechtigungen machen. Windows hat einen ähnlichen Satz an Einstellungen. Du kannst diese Einstellungen mit Deinem FTP Client Programm vornehmen. (Wenn Du nicht weißt was ein FTP client ist, Google nach FTP client).

Für diejenigen, die rot geschriebene Absätze überfliegen: wir versuchen, damit nur Deine Aufmerksamkeit zu erregen:
JA, wir schreiben über etwas was leicht auch auf DICH zutreffen könnte. Wir wiederholen -- Überprüfe deine Berechtigungen in den Verzeichnissen  /albums, /albums/userpics, und /albums/edit. Diese sollten alle 777 oder 755 sein.
Ja wir wollen, dass DU die Berechtigungen für jeden Ordner überprüfst, auch wenn Du denkst, Du hättest es schon getan. Ja wir meinen das absolut ernst.

Anmerkung: HTTP uploads sind limitiert durch Einschränkungen in der PHP Konfiguration.


 

Dinge zum Überprüfen:

(Wenn Du Deine Seite fremdhosten lässt, musst Du mit deinem Webhoster sprechen, damit der die folgenden Einstellungen für Dich vornimmt.)
  1. max_input_time- 60 Sekunden ist das Standardzeitlimit für Dateiuploads.
    Dieses Limit enthält die Zeit welche gebraucht wird um die Dateien hochzuladen, so wenn Du das Limit überschreitest, wird die Datei nicht vollständig hochgeladen, und der Browser wird keine Antwort mehr erhalten. Du kannst dies umgehen, wenn Du versuchst kleinere oder weniger Dateien hochzuladen, oder Du kannst versuchen über eine Breitbandverbindung hochzuladen. Die beste Lösung ist natürlich das Limit so weit zu erhöhen wie Du es brauchst.
  2. upload_max_filesize - 2MB ist das Standard Limit für Einzeldateien.
  3. post_max_size - 8MB ist das Standardlimit für post requests.
  4. memory_limit - 8MB ist die Standardgröße.
  5. PHP's LimitRequestBody - 512KB Standardlimit. (Vorwiegend ein Fehler bei Redhat/Apache Systemen. Zu finden in der /etc/http/conf.d)
    Im Allgemeinen, upload_max_filesize < post_max_size < memory_limit in dieser Reihenfolge damit Uploads richtig funktionieren. Coppermine wird Dich vielleicht warnen wenn eine Datei die Grenzen von upload_max_filesize sprengt, aber es kann Dich nicht warnen, wenn die Gesamtgröße aller Dateien die Du hochlädst das post limit oder das memory limit übersteigt./li>
  6. file_uploads - Das entscheidet ob oder ob nicht es PHP erlaubt dass Dateien hochgeladen werden dürfen. Dies muss auf "On" gesetzt sein.
  7. upload_tmp_dir - Dies spezifiziert das temporäre Verzeichnis in dem PHP die hochgeladenen Dateien speichert.

Der am häufigsten vorkommende Fehler bei Settings ist eine open_basedir Warnung. In dieser Situation hat Dein Serveradministrator die Dateien eingeschränkt mit denen PHP arbeiten kann in einem bestimmten Verzeichnis. Wenn er kein temporäres Verzeichnis mit den open_basedir Einschränkungen erzeugt und spezifiziert hat, dann wird PHP versuchen das temporäre Verzeichnis des Betriebssystems zu nutzen und dies wird durch die open_basedir Beschränkungen abgewiesen.

Einige Anmerkungen über die verschiedenen Arten der Upload-Möglichkeiten in CPC1.3 (oder neuer):
Mehrfache (multiple) HTTP uploads wurden entwickelt um eine geringe Anzahl von Dateien zu bewältigen, und habe ein Limit von maximal 10 Dateien auf einmal. Deshalb ist diese Methode unpassend zum Uploaden von großen Dateimengen außer Du hast Deinen eigenen Webserver am laufen und hast volle Kontrolle über die Einstellungen der php.ini. Wenn Du versuchen willst mehr als 15 oder 20 Dateien gleichzeitig hoch zu laden, solltest Du erwägen statt dessen den "Batch hinzufügen" Prozess oder das XP Publisher Utilitie zu nutzen. Beides hat Vor und Nachteile.
Der Batch hinzufügen-Prozess ist schnell, aber er erzeugt eine ganze Menge Last auf dem Server und als Resultat dessen kann es vorkommen, dass der Upload unvollständig abbricht. Andererseits der XP Publisher beträchtlich langsamer, aber er begrenzt die Last auf dem Server. Dies umgeht außerdem einige der Fallstricke, welche durch die Limits in der php.ini hervorgerufen werden, durch das Hochladen jeder einzelnen Datei im Batch als jeweils einzelne post Anfrage.

[nach oben]

Fehlermeldungen

Beim Installieren erhalte ich die Fehlermeldung Fatal error: Call to undefined function: imagecreatefromjpeg() in /include/picmgmt.inc.php on line 168. Was hat das zu bedeuten?

Dieser Fehler bedeutet, dass die Version von PHP welche auf Deinem Server installiert ist die GD1/GD2 image library (Bilder Bibliothek) nicht unterstützt.
Wenn du weißt ,dass die ImageMagick Suite auf deinem Server installiert ist, könntest Du versuchen diese statt dessen zu nutzen.
Ansonsten musst Du Dir einen anderen Webhost suchen oder Deinen vorhanden überzeugen GD1/GD2 zu installieren (die GD image library ist jetzt eine Standardkomponente von PHP und sollte deshalb normalerweise installiert sein) Coppermine wird nicht laufen ohne GD oder Image Magick.

[nach oben]

Beim Installieren erhalte ich die Fehlermeldung Warning: mkdir(dummy) [function.mkdir]: Permission denied in /your/path/to/coppermine/install.php on line 126. Was hat das zu bedeuten?

Das Script muss die Rechte haben zu Erzeugen und Löschen von Dateien.

[nach oben]

Ich erhalte den Fehler"Warning: Empty Delimiter in search.inc.php line 33". Was kann ich machen?

Editiere die Datei include/search.inc.php
Suche nach der Zeile mit:
$charset = $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'];
Ersetze dies mit:
$charset = $CONFIG['charset'] == 'language file' ? $GLOBALS['lang_charset'] : $CONFIG['charset'];

[nach oben]

Ich erhalte den Fehler Zero Sized Reply während der Installation. Was kann ich machen?

In seltenen Fällen erhalten einige Nutzer diese Fehlermeldung während der Installation:

While trying to retrieve the URL: http://yoursite.com/coppermine/install.php
The system returned:
Zero Sized Reply
Reason:
The remote server did not reply any data for this request.
Please try again later

Leider wissen wir nicht was dies auslöst - Diejenigen Benutzer, die diesen Fehler erhalten, können Coppermine nicht nutzen (tut uns leid). Das Ausschalten oder Entfernen der HTTP Filterung auf der Firewall hilft vielleicht (client und/oder serverseitig). Solltest Du eine Idee haben was diesen Fehler auslöst (und möglicherweise eine Lösung dazu), bitte besuche das Coppermine Support Forum und erleuchte uns.

[nach oben]

Ich habe die Fehlermeldung Warning: Undefined index: SCRIPT_NAME in /www.your-domain.com/include/init.inc.php on line 90. Was kann ich machen?

Versuche die Datei include/init.inc.php zu editieren:
Ändere

$PHP_SELF = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['SCRIPT_NAME'];
zu
$PHP_SELF = $_SERVER['PHP_SELF'];
[nach oben]

Wenn ein Nutzer versucht Bilder hochzuladen, erhält er/sie die Fehlermeldung 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. Was ist falsch?

Du solltest den administrator Deines webhosts kontaktieren, weil Du gewöhnlich den Ort des temporären Verzeichnisses der Webseite nicht selbst ändern kannst, welches für Dateiuploads genutzt wird. (Es ist ein Teil der PHP-Konfiguration).
Wenn Du selbst darauf Einfluss hast, in den open basedir restriction deiner Seite ist das Temp- Verzeichnis für den Dateiupload eingestellt, es sollte eins sein auf das Du Zugriff hast.

[nach oben]

Wenn Ich versuche ein Bild hoch zuladen, erhalte ich die Fehlermeldung Warning: opendir(./albums/edit): failed to open dir: No such file or directory. Was ist falsch?

[nach oben]

Beim Hochladen erhalte ich den Fehler Warning: Undefined variable: HTTP_POST_VARS in include/init.inc.php on line 43. Was kann ich machen?

Prüfe ob deine Version von PHP die Minimalen Anforderungenfür Coppermine vollständig erfüllt. Wenn deine Version 4.1.0 oder neuer ist , dann ist dieser Feherl vermutlich durch eine Misskonfiguration des Webservers entstanden und kein Coppermine Fehler. Wenn Du den Server nicht selbst richtig konfigurieren kannst, das ist so wenn Du den Server eines Webhost nutzt, dann kannst Du diese Fehlerumgehung versuchen (auf Dein eigenes Risiko):
Editiere die Datei "init.inc.php" und suche nach

$PHP_SELF = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['SCRIPT_NAME'];
Ersetze es mit
$PHP_SELF = $_SERVER['PHP_SELF'];
[nach oben]

Ich bekomme die Fehlermeldung Can't create/write to file '/tmp/#sql_45d5_0.MYI'. Was ist falsch?

Das Problem:
MySQL kann keine temporäre Datei für das Result Set im entsprechenden temporären Verzeichnis erzeugen.

Die Lösung:
Ändere die tempdir-Variable so dass sie auf ein beschreibbares Verzeichnis zeigt. Das erfordert die Änderung der Zeile tmpdir line in der Datei my.cnf, gewöhnlich in der [mysqld] Sektion (tmpdir = /writable/dir, wobei /writable/dir ein Verzeichnis ist in welches Du schreiben kannst).

Bitte Deinen Webhoster, dass er diese Änderungen macht.


[nach oben]

Ich bekomme die Fehlermeldungen Can't open file: 'yourPrefix_tableName.MYI' oder so ähnlich. Was ist falsch?

Das Problem:
Deine Datenbank ist kaputt.

Die Lösung:
Das ist kein Coppermine-Fehler, sondern ein mySQL Fehler. Das kann aber vielleicht die Datenbanktabelle beeinflussen, die Coppermine benutzt.
Benutze Dein Webseiten Kontroll-Panel zum Reparieren der Datenbank, oder nutze phpMyAdmin zum ausführen der SQL-Abfrage : REPAIR TABLE yourPrefix_tableName
(Ersetze yourPrefix_tableName mit deinem tatsächliche Tabellenname z.B. cpg145_pictures)

Wenn Du die Lösung nicht verstehst bitte Deinen Webhoster damit er die Änderungen für Dich macht.

[nach oben]

Setup / configuration

How can I include a link in an album description field or in the caption of a pic?

Coppermine supports the following bbCodes (the same bbCodes that are used by phpBB) in image and album description:

code output
[b]bold text[/b]
bold text
[i]italic[/i]
italic
[url=http://www.foo.com/bar.html]URL text[/url]
URL text
[email]user@domain.tld[/email]
user@domain.tld
[nach oben]

I don't want to show the last uploads and/or random pictureson the start page. How do I edit what's shown on the start page of coppermine?

  1. login as admin into your CPG setup
  2. click on "Admin Mode" if it is not already enabled
  3. Click on Config in the "Admin Menu"
  4. under "Album list view" use the above provided keywords: (e.g. anycontent/catlist/alblist/random,2/lastup,2 translates to: "anycontent file contents, category list, album list, 2 rows of random pics, 2 rows of last uploads" -- and will display in the order that they are listed)
[nach oben]

How do I remove/edit the bottom line "Powered by Coppermine" ?

You mustn't remove the line - it's part of the deal: you're allowed to use and modify Coppermine on your site, but this line must remain! We feel strongly that it is more than a justified demand to give credit where credit is due. We hope that you will agree with us and just be glad that such a great piece of software is available for use at NO COST, with no banner ads or embedded spyware, to you.
You are allowed to change the way the line looks by editing the CSS class to make it fit into the design of your site; edit /themes/yourtheme/style.css, look for the class "Footer" and change the settings there as you wish.
Note: PLEASE don't ask idiotic questions on how to remove this line in the Coppermine Photo Gallery Support Board - your posting will be deleted!

[nach oben]

I want to buy a license for Coppermine (and get rid of the "Powered by Coppermine" line). How?

As Coppermine is based on OpenSource software published under GNU/GPL (which allows the modification of the code, but disallows changes of the license model of your modifications), you can not purchase a version of coppermine with or without the credit line removed. Read the file COPYING that comes with the distribution of Coppermine for details.

[nach oben]

I don't want to use the feature XYZ of Coppermine. How can I remove it?

Just remove the link; edit /themes/yourtheme/theme.php, look for the feature you want to remove and comment out the HTML code.
Example: if you want to remove the ecard-feature, just look for

<td align="center" valign="middle" class="navmenu" width="48">
<a href="{ECARD_TGT}" title="{ECARD_TITLE}">
<img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
</td>
and replace it with
<!--<td align="center" valign="middle" class="navmenu" width="48">
<a href="{ECARD_TGT}" title="{ECARD_TITLE}">
<img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
</td>-->
[nach oben]

How do I add a custom header/footer to Coppermine?

There are these files to look for:

[nach oben]

How do I create an album that all users can add photos to?

(Assuming that you have already created at least one category and/or one album where the uploaded photos should go to):

[nach oben]

How can I backup my coppermine database?

Currently, there are no built-in backup solutions for coppermine available, yet. To backup your directory/file structure, you must use the good old ftp method and a tool like phpMyAdmin to backup your database (Many webhosts that offer mySQL also offer a pre-installed version of phpMyAdmin - if so, use that!). PhpMyAdmin is easy to install: just download the distribution, unzip it to your harddrive, edit one config file and upload it to your server. (NOTE: Some webhosts offer backup services. You should check if this service is available to you, first.)

Here's a quick "how to backup a database with phpMyAdmin" primer:

[nach oben]

The fullsize-pic doesn't pop up when clicking on the intermediate size pic. What's wrong?

If you are certain that your original file is larger in dimensions than the settings you selected for intermediate sized pictures, there's a good chance that you over-edited your theme's template/html file: make sure that the line <script type="text/javascript" src="scripts.js"></script> inside /themes/yourtheme/template.html is still there to make the pop-up window work...
The <head>-part of your template file should look like this:

<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
{META}
<link rel="stylesheet" href="themes/default/style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
- If you're still unsure about this, just compare your theme's template.html with the default theme that comes with coppermine .


[nach oben]

How can I let unregistered users see the thumbnails only, but not the actual pictures?

Edit displayimage.php and add
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
just before

/**************************************************************************
* Local functions definition
**************************************************************************/


[nach oben]

How can I prevent other sites from linking directly to the pictures in my gallery instead of the gallery page?

IF your webhost supports the use of .htaccess files (you will need to ask them), you can prevent "hotlinking" by creating an .htaccess file in the albums folder.
Open your text editor and add the following lines, then save the file as .htaccess :

SetEnvIfNoCase Referer "^http://www.yourdomian.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://yourdomain.com/" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
  Order Allow,Deny
  Allow from env=locally_linked
</FilesMatch>
This will only work on linux/unix and apache servers AND only if you're allowed to use /htaccess files by your webhost or if you run your own server and "mod_rewrite" is enabled on your server .


[nach oben]

I tried to change the language on the config page, but it doesn't work. What's wrong?

"Character encoding" is probably set (or has been set sometime ago) to UTF-8 on your config page.
When UTF-8 is selected, Coppermine chooses your language file based on your browser configuration and stores the value in a cookie. This overrides the value stored in the CONFIG.
To fix that:



[nach oben]

How do I allow all guests, not just registered users, to add comments to pictures?

To change the settings on a per album basis, first, complete the above steps, then):


[nach oben]

I can't upload with the upload feature. What's wrong?

If you experience the error message: No picture was uploaded. If you have really selected a picture to upload, check that the server allows file uploads..., check if there's a problem with HTTP uploads on your server - this feature may have been disabled or improperly configured. In phpinfo(), check that "file_uploads" is ON, "upload_max_filesize" is something like 2M and "upload_tmp_dir" is a valid directory!


[nach oben]

How do I change the order of categories?



[nach oben]

I can't delete a certain picture with ftp. What can I do?

If you can't delete a file or picture with your FTP software, it is not Coppermine that won't allow you to delete the picture; it is your FTP server. The problem is in the configuration of your server. Try to delete your picture from within the script.

If PHP on your server is running under user "nobody," then all files created by any PHP script (this is not specific to Coppermine) will be owned by "nobody". There is no way to change that.

IMPORTANT: 0777 (CHMOD 777) should not be the default mode for directories because it may present a security risk, if your gallery is running on a shared server and PHP safe mode is not enabled, anyone with an account on the same server could possibly delete your pictures. There have been several threads on this issue on the Menalto Gallery forum and several users have seen their gallery hacked and destoyed because of this. This issue is not specific to Photo galleries, it applies to all PHP scripts that create directories. As long as someone has write access to a directory, s/he could conceiveably delete any file it contains, even if that person doesn't have write access to the file itself.
 
We would prefer to have users complaining LOUDLY and REPEATEDLY that they have to constantly contact their sysadmin to set this or reset that or even uninstall Coppermine, and have THIS as an issue and electing to switch to another gallery script because of this inconvenience, rather than learn of one person devastated in finding that all his/her pictures have been erased by a hacker.
 
Don't agree? Read this:
http://www.zend.com/manual/function.mkdir.php
http://www.zend.com/manual/function.chmod.php
before thinking of posting an argument in this forum.
 
Ultimately it is the decision of the sysadmin on how s/he will elect to run PHP as an Apache module and if all files/dir created by PHP are to be owned by "nobodyquot;. So sysadmins who have set up their servers as such, are in no position to complain when asked to remove certain files or directories.
 

On the webhost this site is running on, everything works fine when directory are created with mode 755 and all files/dir created by PHP are owned by the chezgreg user which is the user I use when connecting by FTP. Also if one of the file/directory on my site has a mode of 777, the server will shutdown my site and send me an email warning me that this is unsafe.
 
Greg



[nach oben]

I can't upload big pics or files. What's wrong?

The max. size of uploadable pics and/or files is limited by various settings - to find out why you can't upload big picks, check the following:



[nach oben]

I can't login to Coppermine. What's wrong?

This is most likely a cookie issue:



[nach oben]

How can I change the sorting order of the albums?

By default the albums appear in the order they were created. If you want to adjust the sorting order, do the following:



[nach oben]

I don't use the intermediate pictures anymore. How can I delete them to gain disk space?

Why would you want to do that? Deleting the intermediate pics would disable many of the great features that make coppermine what is today. The option to send ecards, to add comments to pics, to rate pics, to display exif information, just to name a few. If you really want to save space, opt to delete your original files using the Admin Tools menu option. Doing this will allow your users to enjoy all of coppermine's features with the exception of viewing full-sized images. In the end, it will probably save you more space as well. Just be sure to set your intermediate sized picture settings in CONFIG to a size that you can live with.

If you really must remove the intermediate sized pics, search the mods and hacks board in the coppermine forum to learn how.


[nach oben]

How do albums and folders work in coppermine?

  1. When you create an album, it is a dynamic 'virtual' album. Coppermine doesn't create a physical folder for this album on the server's hard drive, it leaves the pictures where you put them on the server, and uses the database to know which pic belongs in which album. You can move pics from album to album in Coppermine, but it's all done in the database, the pics are never moved on the server.
  2. When you upload by html, using the 'upload' link, coppermine places the pic (and the thumb and normal size copies) in the 'userpics' directory.
  3. When you upload by ftp, you should place the pics into folders that you create within the 'albums' folder, but never in the 'userpics' folder. The 'userpics' folder is reserved for html uploads only. You can create as many folders/sub-folders for FTP uploads as you want. (Many webhosting services will recommend that you keep the number of files per folder under 500 in order to maximize speed and certain functions. This means you can upload up to 500/3 files in each folder.) You can name these folders anything you want, but we do recommend mirroring the category/album structures that you have created, whenever possible, to facilitate ease of use and site management.
  4. When you batch add files that you have already FTP'd to your site, coppermine asks you what album you want to put the pics in, but it leaves the pics where they are on the server.

[nach oben]

How can I move albums from one category to another?


[nach oben]

How can I move my gallery to another host?


[nach oben]

How do I show the same file in multiple albums?

The Album Keyword in Album Properties is used to link images from one 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.

If you use album keywords to display images/files in more than one album, enabling the Config option, Show number of linked files, will display additional information for the album stats. That is, if an album doesn't only contain "regular" files, but files linked via the "album keyword" option as well, the number of linked files will be displayed separately like this "3 files, last one added on Oct 07, 2004, 3 linked files, 6 files total".


[nach oben]

Add-ons / Modifications / Hacks

How can I change the order of the pics when editing them?

By default, the pics are shown alphabetically when you edit them. To change the sorting order to "by date", edit editpics.php and change

$sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p ".
                           "INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a ".
                           "ON a.aid=p.aid ".
                           "WHERE p.aid = '$album_id' ".
                           "ORDER BY p.filename LIMIT $start, $count";
                $result = cpg_db_query($sql);

to
$sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p ".
                           "INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a ".
                           "ON a.aid=p.aid ".
                           "WHERE p.aid = '$album_id' ".
                           "ORDER BY pid LIMIT $start, $count";
                $result = cpg_db_query($sql);


[nach oben]

How can I create a menu that's shown on the right side of the gallery?

When the template.html is read, it is split in 2. What is before the {GALLERY} tag is output by the pageheader function, what is after by the pagefooter function.
If your menu is in the "footer" you need to modify your theme.php file

   $template_vars = array(
      '{LANG_DIR}' => $lang_text_dir,
      '{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
      '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
      '{META}' => $meta,
      '{GAL_NAME}' => $CONFIG['gallery_name'],
      '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
      '{MAIN_MENU}' => theme_main_menu(),
      '{ADMIN_MENU}' => theme_admin_mode_menu()
   );

   echo template_eval($template_header, $template_vars);
will become
   $template_vars = array(
      '{LANG_DIR}' => $lang_text_dir,
      '{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
      '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
      '{META}' => $meta,
      '{GAL_NAME}' => $CONFIG['gallery_name'],
      '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
   );

   echo template_eval($template_header, $template_vars);
and
echo $template_footer;
will become
   $template_vars = array(
      '{MAIN_MENU}' => theme_main_menu(),
      '{ADMIN_MENU}' => theme_admin_mode_menu()
   );

   echo template_eval($template_footer, $template_vars);


[nach oben]

How can I send a user directly to his private album once he logs in?

edit
login.php
and search for
pageheader($lang_login_php['login'],"<META http-equiv=\"refresh\" content=\"3;url=$referer\">");

and add before it
$referer = 'index.php?cat='.(FIRST_USER_CAT+$USER_DATA['user_id']);


[nach oben]

How can I prevent unregistered users from viewing the gallery?

In Config, when "Allow unlogged users (guest or anonymous) access" is set to "No", unlogged users (i.e. guests or anonymous users) can not access anything in your gallery except the login screen (and the registration screen, if you allow registrations). Completely disabling anonymous access will probably decrease your site's popularity. Use this option only if you need your gallery to be absolutely private. The recommended setting is to leave anonymous access enabled and use the more specific permissions by groups and albums settings instead.

How can I display the name of the uploader with the picture info?

Warning: this is quite a complicated hack for a newbie to perform! Make sure to back up your original files before attempting this.
Edit displayimage.php and search for:
$info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);
add after it:
$info[$lang_picinfo['Username']] = htmlspecialchars($CURRENT_PIC_DATA['user_name']);.
Then open /include/functions.inc.php and search for following in function get_pic_data():
if($select_columns != '*') $select_columns .= ', title, caption';
and replace it with:
if($select_columns != '*') $select_columns .= ', title, caption, user_name';.
After that search for:
$result = cpg_db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} WHERE aid='$album' $approved $ALBUM_SET ORDER BY $sort_order $limit");
and replace it with:
$result = cpg_db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} AS p LEFT JOIN {$CONFIG['TABLE_USERS']} AS u ON u.user_id = p.owner_id WHERE p.aid='$album' $approved $ALBUM_SET ORDER BY $sort_order $limit");
Then you have to add the language string for the username. Open /lang/yourlang.php and search for:
$lang_picinfo = array(
and add after that:
'Username' => 'Username',
Also you need to execute this query in MySQL (with a tool like phpMyAdmin):
ALTER TABLE `cpg11d_pictures` ADD INDEX ( `owner_id` );
(NOTE: If your database table_prefix is not "cpg11d_", you will need to change it in the query)


[nach oben]

How do I enable clickable links in custom user fields?

Edit displayimage.php and change
$info[$CONFIG['user_field'.$i.'_name']] = make_clickable($CURRENT_PIC_DATA['user'.$i]);
into
$info[$CONFIG['user_field'.$i.'_name']] = bb_decode($CURRENT_PIC_DATA['user'.$i]);
 
This will allow you to use BBCodes in the custom fields: you can then have something like
[url]http://www.somesite.com/foo/bar.php?whatever=42[/url]
or
[url=http://www.somesite.com/foo/bar.php?whatever=42]link to some site![/url]
in your custom user fields (the display of which, of course, has to be enabled in the config page, begin with).


[nach oben]

How can I sort the thumbnails by user defined (custom) fields?

  1. Edit /includes/functions.inc.php
    change
    $sort_array = array('na' => 'filename ASC', 'nd' => 'filename DESC', 'da' => 'pid ASC', 'dd' => 'pid DESC'); 
    to
       $sort_array = array(
          'na' => 'filename ASC',
          'nd' => 'filename DESC',
          'da' => 'pid ASC',
          'dd' => 'pid DESC',
          'f1a' => 'user1 ASC',
          'f1d' => 'user1 DESC',
          'f2a' => 'user2 ASC',
          'f2d' => 'user2 DESC',
          'f3a' => 'user3 ASC',
          'f3d' => 'user3 DESC',
          'f4a' => 'user1 ASC',
          'f4d' => 'user1 DESC'
       );
    
  2. Edit /themes/yourtheme/theme.php


[nach oben]

How do I enable IPTC support?

Edit /includes/picmgmt.inc.php and search for
$imagesize = getimagesize($image);
replace this with:

$imagesize = getimagesize($image,&$info);
$iptc = iptcparse($info["APP13"]);
if (is_array($iptc)) {
$caption.=$iptc['2#120'][0];
$title.=$iptc['2#105'][0];
(is_array($iptc['2#025'])) && ($keywords.=implode(" ", $iptc['2#025']));
}
NOTE: This hack hasn't been thoroughly tested, use at your own risk...!


[nach oben]

How can I add some output directly before the line "Powered by Coppermine"?

Edit /themes/yourtheme/theme.php, look for echo $template_footer and add the stuff you want to output in a line before it, like print '<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>';


[nach oben]

Common PHP errors and how to get rid of them...

There are a lot of people (especially PHP newbies) that post questions like I get the error "Parse error: parse error in XXX" and don't know what to do about it. That's why I translated this list of common errors (and a solution how to fix them) from the original german article in Dr. Web :



[nach oben]

Can I rename template.html to template.php to include PHP code in my template?

No, this is simply not the way coppermine works; for "normal" pages the name of the extension tells the webserver whether the file should be parsed by the PHP interpreter. The template files within the themes folder are not being parsed this way - the extension .html was just chosen to make editing easier. You can not have PHP code in the template file, no matter how you name it - that's all there is to it!


[nach oben]

How can I prevent users from saving (stealing) my pictures?

You can not completely prevent users from stealing your pics - that's the way the www works: if a picture is being displayed in the browser, the user already has a copy of it on his hard drive. There are however some methods to make it harder for newbie users to steal your pics:



[nach oben]


 

I'm running my own server

How do I enable gd on my Windows server?

GD 1.x 2.x are normally part of all standard PHP distributions under Windows
To check if you have it, go to the directory where you installed PHP, go to the "extensions" subdir and see if you have a file named "php_gd2.dll".
Ocassionally, you will also need to edit your php.ini file (located in windows directory normally) and remove the ";" that is at the beginning of the line:
extension=php_gd2.dll (at the end of the file). This will cause PHP to load the GD2 extension.
Whenever you make changes to php.ini, remember that you will need to restart your webserver before changes become effective.
ImageMagick it quite complicated to use under Windows
Greg


[nach oben]

How do I enable ImageMagick on my Windows server?

ImageMagick is quite complicated to set up on Windows. There are several things to be taken into account. The Coppermine support board is not the right place to ask for help on installing it, as it deals with Coppermine, not "How to set up a server" (most people on the Coppermine boards don't run their own webserver, but they have webspace by a webhost). Instead, try to find support boards on the internet that deal with this special topic.


[nach oben]


 

Coppermine Support board

These are (alas) not-so-frequently-asked-questions on the support board. Before posting on the Support board (or, in fact, any board), please read this:

I don't know PHP/mySQL...

No problem with that, everyone stars as a newbie. Just don't start each and every posting by stating "I'm a newbie", "I don't know anything about PHP" etc.
Usually, one can acertain that from your question itself. There's no need to apologize. Most of us can still remember when we were in your shoes.


[nach oben]

I've posted my question a while ago, but nobody answers. What the...?

The support board is not a hotline. Although there are many visitors to the site, only a few do actually support - on a unpaid, voluntary basis. Yes, we don't receive remuneratio for our contributions and we each have a life, a job, family and more. We are away sometimes, as well. So, please, be patient, read the docs and search the boards while you are waiting.
If you don't get an answer to your question:



[nach oben]

How should I write my question?

If you have a question, make sure you provide as much information as possible:



[nach oben]

I've run into trouble. What should I do first (before posting on the board)?



[nach oben]

Hey, by looking at your profile I can see you're German/French/Whatever. Can I post a question in that language?

If you are posting in the English support boards, pPlease do not post in some other language - in this way, others may benefit from your question (and the answers you receive ), too. Don't be afraid to write "poor english" - no one will laugh at you, and most of our visitor's first language isn't english to begin with! There's a german support board available at http://forum.the-service.de/ - use it if you are more comfortable with German and you' not able to write in English!

We have language-specific support boards for Chinese and French.


[nach oben]

May I email/pm/im you for support?

No you mustn't! Post your question on the Coppermine support board (publicly) - if we (the community) don't find a solution and I have the time and I want to I'll email/pm/im you!


[nach oben]

Who are you anyway?

We are a group of people who decided to form a team to develop Coppermine further - check the team page for details...


[nach oben]


 
This FAQ is a work in progress, please contribute in the Coppermine Photo Gallery Support Board (don't contact me to ask for fixes of your Coppermine install). Please report any bugs, typos etc.
Check the online-version of this document for updates!
Have fun!

GauGau (aka Joachim Müller) - coppermine dev team



[nach oben]