PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 'install.tpl doesn't exist' with Apache 2.x 
Description: How to fix the 'install.tpl doesn't exist' installation problem with Apache 2.x.
Author: ggiles
Date: Tue Oct 29, 2002 5:28 pm
Type: Fix
Keywords: apache 2, apache2, install.tpl doesn't exist, phpbb_root_path, root
Category: Installing/upgrading/converting
[NOTE OF CAUTION: This fix has not been completely tested. Upon initial investigation, some things work fine, but some others are broken because of the hack. I'll update this posting with a complete fix when it's ready. But for now, consider this a basis for the adventurous to begin their fixing efforts from.]


Ok, I've figured out the problem, and here's a "solution" - this even works under PHP 4.2 and Apache 2.0 with MySQL 3.x (under RedHat 7.2). It is a total kludge (read: hack), but it seems to work for those unwilling to go back to Apache 1.3.

If you try to initially install phpBB2 and get this message:
Template->make_filename(): Error - file ./templates/subSilver/install.tpl does not exist

Here's the solution:
1. Open install.php in your favorite editor. You must have editing privs.
2. On line 26 is this entry: $phpbb_root_path='./';
3. Change line 26 to read: $phpbb_root_path='/path_to_your_site/phpBB2/'; and save the file. Change path_to_your_site/phpBB2/ to reflect your setup. You MUST retain the slash at the end. Here are some examples:

Code:
$phpbb_root_path='/usr/local/apache2/htdocs/mydomain/phpBB2/';
$phpbb_root_path='/www/mydomain/phpBB2/';
$phpbb_root_path='/www/mydomain/forum/';


4. You will also need to change $phpbb_root_path in ALL of the following files as well, otherwise you will get errors. Change the root path to exactly the same value you used in step #3. Here are the files and the line numbers you must change:

faq.php (line 24)
groupcp.php (line 24)
index.php (line 24)
login.php (line 30)
memberlist.php (line 23)
modcp.php (line 33)
posting.php (line 24)
privmsg.php (line 24)
profile.php (line 24)
search.php (line 24)
update_to_202.php (line 43)
viewforum.php (line 24)
viewonline.php (line 24)
viewtopic.php (line 24)
admin/index.php (line 29)
admin/admin_board.php (line 26)
admin/admin_db_utilities.php (line 58 )
admin/admin_disallow.php (line 36)
admin/admin_forum_prune.php (line 35)
admin/admin_forums.php (line 34)
admin/admin_ranks.php (line 35)
admin/admin_smilies.php (line 50)
admin/admin_styles.php (line 41)
admin/admin_ug_auth.php (line 39)
admin/admin_users.php (line 33)
admin/admin_words.php (line 35)
admin/admin_forumauth.php (line 37)
admin/admin_groups.php (line 36)
admin/admin_mass_email.php (line 36)
admin/admin_user_ban.php (line 36)

5. The above will break smilies. To fix that, edit admin/admin_smilies.php, line 521 (simply remove the reference to $phpbb_root_path). It originally looks like this:

Code:
"SMILEY_IMG" =>  $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],

Change it to this (keep the comma at the end):
Code:
"SMILEY_IMG" =>  $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],


5. Be sure you first create your new database BEFORE configuring phpBB2. Refer to your database software's documentation on this. For MySQL, just create an empty database.

6. Save all the files and refresh your browser. You should now be able to configure phpBB2.

7. When the Admin menu appears on the left side of the screen, go to General Admin -> Smilies. Under "User and Forum Basic Settings", change "Smilies Storage Path" to "/forum/images/smiles" (where forum is the name of your phpBB2 root directory, NOT the full path to phpBB2). This hack will display the smilies.

8. That's it. (I think - it's not fully tested yet.) I hope this at least helps somebody.

CAVEAT: THIS IS A TOTAL HACK! It is not elegant, but it seems to work. The problem MIGHT be a result of PHP 4.2 not officially having Apache 2 module support yet, but I cannot verify that. If that is the case and you do use this hack, and a new version of PHP comes out that provides module support for Apache, I strongly urge you to upgrade to to that PHP version, as this hack could potentially break when you upgrade phpBB. But for now, it seems to work ok and doesn't seem to cause any problems.

Regardless, there's you go. Enjoy! Very Happy

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.