phpBB.de - Die deutsche phpBB-Community
Stand: 30.12.2008 04:56
aktuelle Version auf phpBB.de
 
Apache At Work Communities Community Building Informationen und Hinweise Installation/Konfiguration/Update MySQL PHP phpBB-Optimierungen phpBB3 Rechtliches Server & Technik Snippets Templates und Mods
 



Knowledge Base Offline -> Templates und Mods -> php-Warnung nach Installation eines Templates

php-Warnung nach Installation eines Templates
Autor: Schumi
Stand: 30.12.2008 04:56
Neuste Version unter: http://www.phpbb.de/doku/kb/make_filename

php-Warnung nach Installation eines Templates

Oft kommt es vor, dass nach der Installation eines neuen Templates im gesamten Forum eine php-Warnung erscheint.
Problem:
Nach dem Installieren eines neuen Templates erscheint folgende Fehlermeldung:

Code:
Warning: file_exists() [function.file-exists <http://www.php.net/function.file-exists>]: Unable to access in /home/www/includes/functions.php on line 1660

Warning: Cannot modify header information - headers already sent by (output started at /home/www/includes/functions.php:1660) in /home/www/includes/page_header.php on line 786

Warning: Cannot modify header information - headers already sent by (output started at /home/www/includes/functions.php:1660) in /home/www/includes/page_header.php on line 788

Warning: Cannot modify header information - headers already sent by (output started at /home/www/includes/functions.php:1660) in /home/www/includes/page_header.php on line 789

Warning: file_exists() [function.file-exists <http://www.php.net/function.file-exists>]: Unable to access in /home/www/includes/template.php on line 236
Template->make_filename(): Error - file does not exist


Ursache:

Diese php-Warnung entsteht durch folgenden Code der functions.php:
Code:
$img_lang = ( file_exists(@phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english';

Der Fehler tritt auf, wenn Englisch nicht als Sprache ausgewählt ist und für die verwendete Sprache kein entsprechender Unterordner im Template verfügbar ist.


Lösung:

Erstelle innerhalb des Ordners /templates/Name des neuen Templates/images Unterverzeichnisse für die genutzten Sprachen (z.B. lang_german oder lang_french), egal wenn sie leer sind.



Knowledge Base Offline -> Templates und Mods -> php-Warnung nach Installation eines Templates