This is a stumper. I have a 2 modules which need to be enabled. One is online and enabled through admin> modules. However the second longer one, either causes the admin > modules page to display blank or not be accessible at all. Unable to go through any of the normal dumb things, I started a new module and have been copying functions over one at a time to determine which ones are causing problems. Below is one of the functions that will cause the module to jam up. It's so straight-forward I can't imagine why it's having a problem.

function insurance_monthstr($month) {
  switch($month) {
       case "1": $lmonth="January"; break;
       case "2": $lmonth="February"; break;
       case "3": $lmonth="March"; break;
       case "4": $lmonth="April"; break;
       case "5": $lmonth="May"; break;
       case "6": $lmonth="June"; break;
       case "7": $lmonth="July"; break;
       case "8": $lmonth="August"; break;
       case "9": $lmonth="September"; break;
       case "10": $lmonth="October"; break;
       case "11": $lmonth="November"; break;
       case "12": $lmonth="December"; break;
  }
  return $lmonth;
}

Comments

nevets’s picture

Any change you have another function with the same name?
The code it's self is fine. I placed it in a module I am working on and it did not cause any problems.

I would also look at the function before this one and check it for errors. You could also comment out the previous function and see what happens.

Alison@deanspace.org’s picture

all the functions are uniquely named, I checked that as one of the dumb mistakes

Prometheus6’s picture

Try increasing the amount of memory PHP can use. look for this in your php.ini file:

memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

That's the default value. I bumped mine to 16M so as to not have any trouble, ever.

Alison@deanspace.org’s picture

that does not solve this problem

Harry Slaughter’s picture

when i run into this, i turn on all error reporting in the suspect module:

<?php
error_reporting(E_ALL);
// rest of module....
?>

In my limited drupal experience, that has always revealed the source of the problem.

--
Devbee - http://devbee.net/