Author Topic: Warning: rcmail_load_config  (Read 6255 times)

Offline ishvir

  • Newbie
  • *
  • Posts: 5
Warning: rcmail_load_config
« on: March 25, 2008, 03:54:32 AM »
Hello,

I am trying to use RoundCube Webmail 0.1-stable released2008/03/04 on my domain http://www.llb.co.za. The server is Linux based, with MySQL and PHP5.

Please help, I get the error:

Warning: rcmail_load_config(config/main.inc.php) [function.rcmail-load-config]: failed to open stream: No such file or directory in /home/onex2yco/public_html/llb/program/include/main.inc on line 137

Warning: rcmail_load_config() [function.include]: Failed opening 'config/main.inc.php' for inclusion (include_path='/home/onex2yco/public_html/llb/:/home/onex2yco/public_html/llb/program:/home/onex2yco/public_html/llb/program/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/onex2yco/public_html/llb/program/include/main.inc on line 137

Warning: rcmail_load_config(config/db.inc.php) [function.rcmail-load-config]: failed to open stream: No such file or directory in /home/onex2yco/public_html/llb/program/include/main.inc on line 146

Warning: rcmail_load_config() [function.include]: Failed opening 'config/db.inc.php' for inclusion (include_path='/home/onex2yco/public_html/llb/:/home/onex2yco/public_html/llb/program:/home/onex2yco/public_html/llb/program/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/onex2yco/public_html/llb/program/include/main.inc on line 146

...after following the instructions below:

Installation
LetÂ’s get started by creating the MySQL database on your web hosting environment. I use CPanel as a front end so the following instructions apply more for CPanel. CPanel users on a shared server environment need to log into http://www.domain.com/cpanel and click on MySQL Databases on the right panel. Once here, scroll to the bottom and enter the database name in the DB field and then click the Add DB button. For this tutorial I named my database RoundCube. Now that you have a database you will need to create a user, scroll to the bottom again and enter a username and password (for this tutorial I named my username:roundcube and password:xxxxxx) in the user section and click the Add User button. Now that you have both a database and user you need to link them, to do so select your RoundCube user from the user drop down and then select your RoundCube database from the Db drop down. In the privileges section make sure that only the All box is checked and then click the Add user to DB button. When finished your database information should look like this:
RoundCube
Users in roundcube
roundcube (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect(”DBI:mysql:roundcube:localhost”,”roundcube”,”
“);
PHP $dbh=mysql_connect (”localhost”, “roundcube”, “ “) or die (’I cannot connect to the database because: ‘ . mysql_error());
mysql_select_db (”roundcube”);
Now that your database is built you can start with the roundcube software. Start by going to RoundCube and downloading the latest release. When the download has finished unpack it to a directory on your computer so we can begin configuring it.
Open up the roundcubemail folder on your computer and then go to the config folder. Here you should have both db.inc.php and main.inc.php. These are the main files we will use for configuring the service.
Time to Config Files
LetÂ’s start by editing db.inc.php in a text editor. The only thing required to begin using the service is enabling database access. Find the line that says
$rcmail_config[Â’db_dsnwÂ’]=Â’mysql:// roundcube:pass@localhost/roundcubemailÂ’;
Replace where it says roundcube with your database login and pass with the database password. Localhost is a default setting and should remain the same on most configurations. The last thing to change is roundcubemail by replacing it with your databaseÂ’s full name. Using the examples I used earlier in creating the MySQL database my config line now looks like this:
$rcmail_config[Â’db_dsnwÂ’]=Â’mysql:// roundcube:xxxxxx@localhost/roundcubeÂ’;
ThatÂ’s all we need to edit in this file, so now we can save and close it.
Next we need to open main.inc.php in a text editor. There are many things you can do here to improve the user experience of your web mail. By default roundcube shows you a username, password, and server. However, you can add one or multiple values to default_host so you donÂ’t have to type it in every time you log in. Another edit changes the session time (which is 10 minutes by default) to 30 minutes. And then the last thing IÂ’ll focus on is editing your time zone. I put -6 as I currently reside in the Midwest (central time), so it depends where you live.
***for only 1 host use this setting***
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config[’default_host’] = ‘mail.domain.com’;
***for using with multiple domains use this setting***
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config[’default_host’] = array(’mail.domain.com’, ‘mail.domain2.com’,’mail.domain3.com’);
// session lifetime in minutes
$rcmail_config[Â’session_lifetimeÂ’] = 30;
// use this timezone to display date/time
$rcmail_config[Â’timezoneÂ’] = -6;
Save the file and exit your text editor. Now that we are done it is time to upload the software to your web server. One of the things I did to make using the service easier is to create a sub-domain in CPanel called webmail.domain.com. When I uploaded the software I dumped it directly into the webmail folder.
Now after you have completed the upload youÂ’ll need to chande your attributes for your temp and log files in your RoundCube folder. If you have Filezilla you can do this using these steps:
1. Right click on the directory and then select file attributes.
2. In the file attributes screen put a check in all of the boxes or just type 777 in the numeric value box and then click ok.
There is only one more thing you need to do to get started with RoundCube. You need to create the tables required by RoundCube in your MySQL database. Go back to your MySQL Databases screen in CPanel and scroll to the very bottom. Click on the PhpMyAdmin link. PhpMyAdmin is the preferred MySQL database management tool in the industry. Once it is open there is a dropdown menu on the left screen; click on it and select your RoundCube database. When the database opens on the right go to the SQL tab. There is an empty box labeled Run SQL query/queries on database. Next to this box click the browse button and find the mysql.initial.sql file located in the roundcube folder within the SQL folder. Once found click Open and the click the Go button. This will import several tables into your mySQL database if it worked correctly for you.