Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th October 2008, 16:57
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default Roundcube can't be started

Hi folks,


Debian Etch
roundcubemail-0.1
lighttpd 1.4.13


$ cat /etc/lighttpd/lighttpd.conf
Code:
....
        alias.url += (
                "/mail/" => "/var/www/roundcubemail-0.1/"
        )
....

I have run;

$ mysql -u roundcube -p roundcube < /var/www/roundcubemail-0.1/SQL/mysql.initial.sql


$ ls -l /var/www/roundcube/
Code:
total 88
drwxr-xr-x 2 satimis satimis  4096 2008-03-03 21:51 bin
-rw-r--r-- 1 satimis satimis 10597 2008-03-03 22:01 CHANGELOG
drwxr-xr-x 2 satimis satimis  4096 2008-03-03 21:51 config
-rw-r--r-- 1 satimis satimis 12265 2008-03-03 21:42 index.php
-rw-r--r-- 1 satimis satimis  4369 2008-02-26 09:10 INSTALL
drwxr-xr-x 3 satimis satimis  4096 2008-03-03 21:51 installer
-rw-r--r-- 1 satimis satimis 15129 2005-09-28 22:28 LICENSE
drwxr-xr-x 2 satimis satimis  4096 2008-03-03 21:51 logs
drwxr-xr-x 7 satimis satimis  4096 2008-03-03 21:51 program
-rw-r--r-- 1 satimis satimis  2052 2008-03-03 21:42 README
drwxr-xr-x 3 satimis satimis  4096 2008-03-03 21:51 skins
drwxr-xr-x 2 satimis satimis  4096 2008-03-03 21:51 SQL
drwxr-xr-x 2 satimis satimis  4096 2008-03-03 21:51 temp
-rw-r--r-- 1 satimis satimis  2151 2008-02-18 22:54 UPGRADING

On browser running;

http://satimis.com/mail
Code:
404 - Not Found

http://satimis.com/
Code:
Index of /
Name	Last Modified	Size	Type
Parent Directory/	 	-  	Directory
lighttpd/1.4.13
Please help. TIA


B.R.
satimis
Reply With Quote
Sponsored Links
  #2  
Old 4th October 2008, 22:14
uberamd uberamd is offline
Junior Member
 
Join Date: Sep 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you enable the alias module in the lighttpd configuration, the run a: # /etc/init.d/lighttpd restart ?
Reply With Quote
  #3  
Old 5th October 2008, 00:45
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by uberamd View Post
Did you enable the alias module in the lighttpd configuration, the run a: # /etc/init.d/lighttpd restart ?
Hi uberamd,


Herebelow is lighttpd.conf


$ cat /etc/lighttpd/lighttpd.conf
Code:
# Debian lighttpd configuration file
#

############ Options you really have to take care of ####################

server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
#           "mod_rewrite",
#           "mod_redirect",
#           "mod_status",
#           "mod_evhost",
#           "mod_compress",
#           "mod_usertrack",
#           "mod_rrdtool",
#           "mod_webdav",
#           "mod_expire",
#           "mod_flv_streaming",
#           "mod_evasive"
 )

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root       = "/var/www/"

## where to send error-messages to
server.errorlog            = "/var/log/lighttpd/error.log"

## files to check for if .../ is requested
index-file.names           = ( "index.php", "index.html",
                               "index.htm", "default.htm" )


#### accesslog module
accesslog.filename         = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#      of the document-root
url.access-deny            = ( "~", ".inc" )



######### Options that are good to be but not neccesary to be changed #######

## to help the rc.scripts
server.pid-file            = "/var/run/lighttpd.pid"

#server.errorfile-prefix    = "/var/www/"

## virtual directory listings
dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers  = "enable"

server.username            = "www-data"

## change uid to <uid> (default: don't care)
server.groupname           = "www-data"


#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"


#### handle Debian Policy Manual, Section 11.5. urls
#### and by default allow them only from localhost

$HTTP["remoteip"] =~ "127.0.0.1" {
        alias.url += (
#               "/doc/" => "/usr/share/doc/",
#               "/images/" => "/usr/share/images/"
                "/mail/" => "/var/www/roundcubemail-0.1/"
        )
        $HTTP["url"] =~ "^/doc/|^/images/" {
                dir-listing.activate = "enable"
        }
}

#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

## load enabled configuration files,
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
lighttpd is now running. It can be browsed.


B.R.
satimis
Reply With Quote
  #4  
Old 5th October 2008, 05:58
uberamd uberamd is offline
Junior Member
 
Join Date: Sep 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would suggest running a:
Code:
# chown -R www-data:www-data /var/www/*
That way everything is owned by the www-data user/group which may part of the issue you are running into. You have an alias setup, however lighttpd does not have permissions on the files because you own them, not www-data.

-Steve
Reply With Quote
  #5  
Old 5th October 2008, 07:09
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by uberamd View Post
I would suggest running a:
Code:
# chown -R www-data:www-data /var/www/*
That way everything is owned by the www-data user/group which may part of the issue you are running into. You have an alias setup, however lighttpd does not have permissions on the files because you own them, not www-data.

-Steve
Hi Steve,


Performed following test;


Edit /etc/lighttpd/lighttpd.conf

as follows;
Code:
....
$HTTP["remoteip"] =~ "127.0.0.1" {
        alias.url += (
                "/doc/" => "/usr/share/doc/",
                "/images/" => "/usr/share/images/"
        )
        $HTTP["url"] =~ "^/doc/|^/images/" {
                dir-listing.activate = "enable"
        }
}

alias.url += ("/mail/" => "/var/www/roundcube/")
.....

The line;
Code:
alias.url += ("/mail/" => "/var/www/roundcube/")
must be globally. Otherwise roundcube won't start.


uncomment following 2 lines;
Code:
                "/doc/" => "/usr/share/doc/",
                "/images/" => "/usr/share/images/"

I commented them out because after adding
alias.url += ("/mail/" => "/var/www/roundcube/") there it complained on restarting lighttpd


# chown -R www-data:www-data /var/www/*
No complaint


# /etc/init.d/lighttpd restart
Code:
Stopping web server: lighttpd.
Starting web server: lighttpd.

Now RoundCube starts but with following warning;
Code:
DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

Where shall I check to rectify this problem. Which is its log file?


TIA


B.R.
satimis
Reply With Quote
  #6  
Old 5th October 2008, 07:13
uberamd uberamd is offline
Junior Member
 
Join Date: Sep 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you gone into yourdomain.com/mail/installer and run the roundcube installer?
Reply With Quote
  #7  
Old 5th October 2008, 07:26
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by uberamd View Post
Have you gone into yourdomain.com/mail/installer and run the roundcube installer?
Hi uberamd,


Ah I missed this step.


On browser;

http://domain.com/mail/installer


Page-1
Code:
Checking PHP version
Version:  OK(PHP 5.2.0-8+etch11 detected)
Checking PHP extensions

The following modules/extensions are required to run RoundCube:
PCRE:  OK
Session:  OK
Sockets:  OK

These extensions are optional but recommended to get the best performance:
FileInfo:  NOT AVAILABLE(See http://www.php.net/manual/en/ref.fileinfo.php)
Libiconv:  OK
Multibyte:  OK
OpenSSL:  OK
Mcrypt:  NOT AVAILABLE(See http://www.php.net/manual/en/ref.mcrypt.php)
GD:  NOT AVAILABLE(See http://www.php.net/manual/en/ref.image.php)
Checking available databases

Check which of the supported extensions are installed. At least one of them is required.
MySQL:  OK
MySQLi:  OK
PostgreSQL:  NOT AVAILABLE(Not installed)
SQLite (v2):  NOT AVAILABLE(Not installed)
Check for required 3rd party libs

This also checks if the include path is set correctly.
PEAR:  OK
DB:  OK
MDB2:  OK
Net_SMTP:  OK
Mail_mime:  OK
iilConnection:  OK
Checking php.ini/.htaccess settings
file_uploads:  OK
session.auto_start:  OK
magic_quotes_gpc:  NOT OK(is '1', should be '0')
magic_quotes_sybase:  OK


Sorry but your webserver does not meet the requirements for RoundCube!
Please install the missing modules or fix the php.ini settings according to the above check results.
Hint: only checks showing NOT OK need to be fixed.

Can't proceed further. "NEXT" greyout


Edit-1 :

After changing;
magic_quotes_gpc = Off

on php.ini and;

# /etc/init.d/lighttpd restart


Now I proceed to P-2
Code:
Check config files
main.inc.php:  OK
db.inc.php:  OK
Check configured database settings
Backend: PEAR::MDB2
DSN (write):  NOT OK(MDB2 Error: connect failed)

Make sure that the configured database extists and that the user as write privileges
DSN: mysql://roundcube:pass@localhost/roundcube

There are known problems with MDB2 running on PHP 4. Try setting db_backend to 'db' instead
Test SMTP settings

Server: PHP mail()
Port: 25
Sender 	
Recipient 	

Test IMAP configuration
Server 	
Port 	143
Username 	
Password

What does it mean "DSN (write): NOT OK(MDB2 Error: connect failed)"? Where shall I check


Edit-2 :

http://domain.com/mail/index.php
Code:
DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.
$ tail /var/www/roundcube/logs/errors
Code:
[Native message: Access denied for user ' roundcube'@'localhost' (using password: YES)]
 ** mysql(mysql):// roundcube:xxx@localhost/roundcube in /var/www/roundcube/program/include/rcube_mdb2.inc on line 106
[05-Oct-2008 09:58:23 +0000] DB Error: connect: [Error message: Access denied for user ' roundcube'@'localhost' (using password: YES)]
[Native code: 1045]
[Native message: Access denied for user ' roundcube'@'localhost' (using password: YES)]
 ** mysql(mysql):// roundcube:xxx@localhost/roundcube in /var/www/roundcube/program/include/rcube_mdb2.inc on line 106
[05-Oct-2008 10:00:50 +0000] DB Error: connect: [Error message: Access denied for user ' roundcube'@'localhost' (using password: YES)]
[Native code: 1045]
[Native message: Access denied for user ' roundcube'@'localhost' (using password: YES)]
 ** mysql(mysql):// roundcube:xxx@localhost/roundcube in /var/www/roundcube/program/include/rcube_mdb2.inc on line 106

$ cat /var/www/roundcube/program/include/rcube_mdb2.inc

line 106
Code:
      raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__,

B.R.
satimis

Last edited by satimis; 5th October 2008 at 12:05.
Reply With Quote
  #8  
Old 5th October 2008, 15:35
uberamd uberamd is offline
Junior Member
 
Join Date: Sep 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you create a user and database named roundcube and give them permissions? Roundcube doesn't create the user/db automatically you need to handle that yourself.
Reply With Quote
  #9  
Old 5th October 2008, 15:45
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by uberamd View Post
Did you create a user and database named roundcube and give them permissions? Roundcube doesn't create the user/db automatically you need to handle that yourself.
Yes


$ mysql -u roundcube -p roundcube
Code:
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.0.32-Debian_7etch6-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
+---------------------+
| Tables_in_roundcube |
+---------------------+
| cache               |
| contacts            |
| identities          |
| messages            |
| session             |
| users               |
+---------------------+
6 rows in set (0.00 sec)

B.R.
satimis
Reply With Quote
  #10  
Old 5th October 2008, 16:00
uberamd uberamd is offline
Junior Member
 
Join Date: Sep 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Take a look at your: config/db.inc.php file. Look at line: 21, it should read something like:
Code:
$rcmail_config['db_dsnw'] = 'mysql://roundcube:yourpassword@localhost/roundcubemail';
Ensure there is no space between the mysql:// and the roundcube. I say that because in your error messages it says access denied for user ' roundcube' (notice the space between the ' and the username?

I had no issues at all getting my roundcube setup which leads me to believe its a simple issue like that.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fail2ban emails jasper HOWTO-Related Questions 4 22nd May 2009 13:23
RoundCube 0.2 Beta available for ISPConfig 2 Hans General 20 9th October 2008 14:29
FTP access to roundcube pkg install directories dancn General 4 11th August 2008 19:03
debian etch courier pop3 issue docean Installation/Configuration 6 20th March 2008 15:38
roundcube aqua Installation/Configuration 3 7th May 2007 08:09


All times are GMT +2. The time now is 14:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.