I get white screen when enabling TD dev. PHP 5.2.4.

Error Message:

Warning: Wrong parameter count for debug_backtrace() in devel_themer_catch_function() (line 199 of /var/www/vhosts/mysite/subdomains/xxx/httpdocs/sites/all/modules/devel_themer/devel_themer.module).

Happens with both stable and dev versions of devel.

Comments

rjunction’s picture

Sorry. I see php 5.2.5 is the minimum d7 requirement. Removing the TRUE parameter seems to work. Looking into updating my php.

from http://drupal.org/node/943816

define('DEVEL_THEMER_PARAM_MINIMUM_PHP', '5.2.5');
$trace = (version_compare(phpversion(), DEVEL_THEMER_PARAM_MINIMUM_PHP) < 0) ? debug_backtrace() : debug_backtrace(TRUE);
kenneth.venken’s picture

Status: Active » Closed (works as designed)
mshepherd’s picture

For anyone else stuck with PHP 5.2.4 with no easy way to upgrade for the moment, I got devel_themer working at the suggestion of the post above. In devel_themer.module, change:

function devel_themer_init() {
  if (user_access('access devel information')) {
    // Add requisite libraries.
    drupal_add_library('system', 'jquery.form');
...

to

function devel_themer_init() {
  if (user_access('access devel information')) {
    define('DEVEL_THEMER_PARAM_MINIMUM_PHP', '5.2.5');
    // Add requisite libraries.
    drupal_add_library('system', 'jquery.form');

and

function devel_themer_catch_function() {
  $trace = debug_backtrace(FALSE);
  $hook = $trace[1]['args'][0];

to

function devel_themer_catch_function() {
  $trace = (version_compare(phpversion(), DEVEL_THEMER_PARAM_MINIMUM_PHP) < 0) ? debug_backtrace() : debug_backtrace(TRUE);
  $hook = $trace[1]['args'][0];

Current Drupal 7 requirements suggest that it should run with PHP 5.2.4, as at http://drupal.org/requirements#php :

Drupal 7: PHP 5.2.5* or higher (5.3 recommended)

*For Drupal 7, versions of PHP 5.2.4 that include backported security patches also meet the requirements. The PHP version included with Ubuntu 8.04 is the most common example of this.

emarchak’s picture

Rolled a patch with these edits to include in drush make files.

Anonymous’s picture

I have php 5.9 installed but i still have problem with my site white page is load and sites crashed
My admin site is still working with devel themer on and working