I have completely failed to install the module on Drupal 6.

On selecting the module in /admin/build/modules, I get a white screen with the URL /admin/build/modules/list/confirm.

The installation process creates browscap and cache_browscap tables in the drupal database, but it crashes thereafter. Checking the code, it appears to be a problem in the _browscap_import() function.

No dblog messages are recorded aside from the database complaining of attempting to create a table that already exists when I try again.

Drupal 6.35, PHP 5.3.3, MySQL 5.0.95, Apache 2.2.3 (CentOS).

Sean

Comments

AohRveTPV’s picture

There should be a PHP error message if there is nothing in the Drupal logs. For CentOS + Apache, check /var/log/httpd/error_log or /var/log/httpd/ssl_error_log.

Import currently requires a lot of memory and will fail if your PHP memory limit is less than say 192M or maybe even 256M. That would be my top guess at the cause. There is work in #2418473: Allowed memory size to improve the memory usage.

Once an installation fails due to a failed import you will probably need to disable then uninstall the module before re-installing again, to avoid the duplicate table errors.

venusrising’s picture

We are now experiencing same WSOD since moving to Pantheon from dedicated server.

Graham Leach’s picture

Hello,

Here's the saga of how I installed BROWSCAP:

1) Initial BROWSCAP Module Install Failure (White Screen of Death - WSOD) & retry, retry, retry

2) Initial BROWSCAP Module Uninstall Failure

user warning: Table 'drupal_browscap' already exists query: CREATE TABLE drupal_browscap ( `useragent` VARCHAR(255) NOT NULL DEFAULT '', `data` LONGBLOB DEFAULT NULL, PRIMARY KEY (useragent) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in /var/www/vhosts/{SITE}/www/content/includes/database.inc on line 551.

user warning: Table 'drupal_cache_browscap' already exists query: CREATE TABLE drupal_cache_browscap ( `cid` VARCHAR(255) NOT NULL DEFAULT '', `data` LONGBLOB DEFAULT NULL, `expire` INT NOT NULL DEFAULT 0, `created` INT NOT NULL DEFAULT 0, `headers` TEXT DEFAULT NULL, `serialized` SMALLINT NOT NULL DEFAULT 0, PRIMARY KEY (cid), INDEX expire (expire) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in /var/www/vhosts/{SITE}/www/content/includes/database.inc on line 551.

3) Based on postings, php.ini memory_limit increased to 256M

# cd /etc

# vi php.ini

; Maximum amount of memory a script may consume (128MB)
; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
memory_limit = 256M

# /etc/init.d/httpd restart

4) Manual deletion of BROWSCAP related tables:

# mysql -p

mysql> use {DATABASE};

mysql> drop table drupal_browscap;
Query OK, 0 rows affected (0.15 sec)

mysql> drop table drupal_cache_browscap;
Query OK, 0 rows affected (0.01 sec)

mysql> exit

# /etc/init.d/mysqld restart

5) Enable BROWSCAP (DEV) Module
x Browscap 6.x-2.0+5-dev Provides a replacement for PHPs get_browser() function. Required by: Mobile Switch (disabled)

(HTOP: CPU usage spike to 40% of capacity while script runs...for a long, long, time)
(HTOP: Memory NOT maxed out)
(WSOD...again...mysql cleanup...again)

6) This is probably a TIME & MEMORY issue: Increase execution time in php.ini from 30 seconds to 60 seconds

# cd /etc

# vi php.ini

; Maximum execution time of each script, in seconds
; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
max_execution_time = 60

# /etc/init.d/httpd restart

7) Remove DEV version from server

# cd /var/www/vhosts/{SITE}/www/content/sites/all/modules

# rm -rf browscap

8) Install PRODUCTION version of module

# cd /var/www/vhosts/{SITE}/www/content/sites/all/modules

# unzip browscap-6.x-2.1.zip

9) Enable PRODUCTION version of module in Drupal

x Browscap 6.x-2.1 Provides a replacement for PHPs get_browser() function. Required by: Mobile Switch (disabled)

(HTOP: mysqld using 60% of CPU, apache using 40% of CPU, memory @ 200M)
(HTOP: running for about 45 seconds)
(HTOP: additional httpd forked, CPU utilization drops to 0%, mysqld disappears)

SUCCESS
======

AohRveTPV’s picture

Status: Active » Postponed (maintainer needs more info)

Need more information on seanwallis's specific problem.

Thanks, Graham Leach, for sharing how you got it working. I am not sure why uninstallation failed. That is strange. I would be interested to know whether/how that failure is reproducible.

AohRveTPV’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

6.x-2.x is no longer supported.