Fatal error: Call to undefined function drupal_strtolower()

fuquam - April 22, 2009 - 14:38
Project:Secure Site
Version:6.x-2.3
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I got the following error when I logged out and tried logging back in. I entered an incorrect password on purpose just to test. Now the log in won't even come up. All I get is this error. This is only since version 6.2.3.

Fatal error: Call to undefined function drupal_strtolower() in /home3/site/public_html/modules/securesite/securesite.module on line 134

Thanks.

#1

rconstantine - May 2, 2009 - 22:59

Same here.

#2

nikemen - May 4, 2009 - 01:30

Subscribe

#3

rconstantine - May 7, 2009 - 01:44

To get this to work, I changed the function from drupal_strtolower to plain old strtolower for now until this is properly fixed.

#4

qchan - June 7, 2009 - 14:39

Thanks rconstantine !!
you saved my site.

#5

Arto - July 6, 2009 - 12:47
Title:Fatal Error » Fatal error: Call to undefined function drupal_strtolower()
Version:6.x-2.3» 6.x-2.x-dev
Status:active» reviewed & tested by the community

I ran into this problem, and rolled a quick patch against the DRUPAL-6--2 branch (attached).

The problem seems to be that _securesite_mechanism() calls drupal_strtolower() before the Drupal bootstrap, meaning that includes/unicode.inc is not loaded yet and hence the function can not be found.

A solution (not necessarily the solution) is to explicitly ensure includes/unicode.inc is loaded before invoking drupal_strtolower(), and this is what my patch does. This solves the problem for me.

However, there are a total of four places in the code base that drupal_strtolower() is used:

securesite.inc: _securesite_fake_realm()
securesite.inc: _securesite_denied()
securesite.module: _securesite_mechanism()
securesite.module: securesite_user('logout')

...so it may be that there exist other code paths that still result in the same problem. I have not myself run into any yet, though.

AttachmentSize
441634_drupal_strtolower.patch 480 bytes

#6

Darren Oh - July 15, 2009 - 18:18
Status:reviewed & tested by the community» fixed

Fixed in CVS commit 237950.

#7

System Message - July 29, 2009 - 18:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#8

najibx - October 1, 2009 - 12:43

is this really fixed? Even with securesite-6.x-2.3.tar.gz I still have to do as stated in #3 to get rid of it.

#9

Darren Oh - October 1, 2009 - 22:51
Version:6.x-2.x-dev» 6.x-2.3

There has not been a new release.

 
 

Drupal is a registered trademark of Dries Buytaert.