# [roundcube] Cannot redeclare class rcmail_output_html



## Vovas (May 13, 2014)

Hi all.
I've installed roundcube on my server. After that I removed *install* folder. Open browser and see blank page. 
Checked apache logs:

```
[Tue May 13 13:39:51.899108 2014] [fcgid] [pid 6160:tid 34399528960] [client 109.188.127.173:61913] mod_fcgid: stderr: PHP Fatal error:  Cannot redeclare class rcmail_output_html in /usr/local/www/roundcube/program/include/rcmail_output_html.php on line 30
[Tue May 13 13:39:53.861638 2014] [fcgid] [pid 6160:tid 34399512576] [client 109.188.127.173:61912] mod_fcgid: stderr: PHP Fatal error:  Cannot redeclare class rcmail_output_html in /usr/local/www/roundcube/program/include/rcmail_output_html.php on line 30
[Tue May 13 13:39:54.692292 2014] [fcgid] [pid 6160:tid 34399516672] [client 109.188.127.173:61916] mod_fcgid: stderr: PHP Fatal error:  Cannot redeclare class rcmail_output_html in /usr/local/www/roundcube/program/include/rcmail_output_html.php on line 30
[Tue May 13 13:39:55.534646 2014] [fcgid] [pid 6160:tid 34399525888] [client 109.188.127.173:61914] mod_fcgid: stderr: PHP Fatal error:  Cannot redeclare class rcmail_output_html in /usr/local/www/roundcube/program/include/rcmail_output_html.php on line 30
```
More info. *System:*

```
FreeBSD 9.2-RELEASE-p5 amd64
```
*Web Server:*

```
$ apachectl -V
Server version: Apache/2.4.9 (FreeBSD)
Server built:   Apr 24 2014 20:06:06
Server's Module Magic Number: 20120211:31
Server loaded:  APR 1.5.1, APR-UTIL 1.5.3
Compiled using: APR 1.5.1, APR-UTIL 1.5.3
Architecture:   64-bit
Server MPM:     worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local"
 -D SUEXEC_BIN="/usr/local/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="etc/apache24/mime.types"
 -D SERVER_CONFIG_FILE="etc/apache24/httpd.conf"
```
*php.cgi conf:*

```
$ cat /usr/local/www/apache24/fcgi/webmail/php.cgi
#!/bin/sh
PHP_FCGI_CHILDREN=0
PHP_INI_SCAN_DIR=/usr/local/www/apache24/fcgi/webmail
PHP_FCGI_MAX_REQUESTS=400
PHPRC=/usr/local/etc/
export PHP_FCGI_CHILDREN
export PHP_INI_SCAN_DIR
export PHP_FCGI_MAX_REQUESTS
export PHPRC
exec /usr/local/bin/php-cgi
```
httpd.conf

```
<Directory /usr/local/www/apache24/fcgi/*/>
Options ExecCGI
AllowOverride none
Order allow,deny
Allow from all
</Directory>
```
More:

```
<IfModule mod_fcgid.c>
FcgidMaxProcesses 400
FcgidMaxProcessesPerClass 40
FcgidMinProcessesPerClass 0
FcgidMaxRequestInMem 8388608
FcgidMaxRequestLen 31457280
FcgidFixPathinfo 1
FcgidIdleScanInterval 10
FcgidBusyScanInterval 10
FcgidIdleTimeout 120
FcgidBusyTimeout 600
FcgidProcessLifetime 600
FcgidIOTimeout 300
FcgidMaxRequestsPerProcess 500
FcgidPassHeader Authorization
FcgidPassHeader Proxy-Authorization
FcgidPassHeader HTTP_AUTHORIZATION

AddType application/x-httpd-fastphp .php

Action application/x-httpd-fastphp /cgi-bin/php.cgi
Action application/x-httpd-php /cgi-bin/php.cgi

<Location /cgi-bin/>
Options ExecCGI
SetHandler fcgid-script
</Location>
</IfModule>
```
What is the error?


----------



## chatwizrd (May 14, 2014)

Seems like an error in the Roundcube code. Do you have version 1.0.1 installed? There were a lot of bug-fixes just released.


----------



## Vovas (May 16, 2014)

I have roundcube-1.0.0,1. Installed from ports.
============
Few minutes ago Roundcube was updated. Problem didn't resolve.


----------



## kpa (May 16, 2014)

A "can not redeclare" error suggests that there are duplicate copies or older versions of the files present in the system and the PHP interpreter has already seen the declarations of the classes it is complaining. Check that you have only one version of the code installed.


----------



## Vovas (May 16, 2014)

Ok. I downloaded last version of roundcube and upload through ftp. Replace all files and try update with browser -> http://url-to-roundcube/installer/

```
Fatal error: Cannot redeclare class rcmail_output_html in /usr/local/www/roundcube/program/include/rcmail_output_html.php on line 30
```


----------

