Edit my user account gives me an error. I am the admin and currently the only user. This is on a fresh install of 4.5.0-rc

Error:

warning: Invalid range end in /home/sewlug/www/modules/user.module on line 187.

warning: Cannot add header information - headers already sent by (output started at /home/sewlug/www/

Comments

chad’s picture

Steven’s picture

I have no problems with that line here. What version of PHP are you using? If you make a file "info.php" containing

phpinfo();

and then point your browser at http://yoursite.com/info.php, you can check this easily.

Try replacing line 187 in user.module:
if (ereg("[^\x80-\xF7 [:alnum:]@_.-]", $name)) return t('The username contains an illegal character.');

With:
if (preg_match("/[^\x80-\xF7 [:alnum:]@_.-]/", $name)) return t('The username contains an illegal character.');

If this solves the problem, I'll make a patch.

dries’s picture

I can't reproduce this problem either. I'm using PHP 4.3.8.

chad’s picture

Version: 4.5.0-rc »

Thanks for the help. Replacing that line(which is on 214 in the 4.5 final), worked.

My server is running php 4.1.2

I think there are other issues with my _older_ server as it seems like the pushbutton theme css doesn't pare at all.

killes@www.drop.org’s picture

Steven: To patch or not to patch?

Anonymous’s picture

I'm running Drupal 4.5.1 with php 4.1.2 as well and the fix to user.module took care of the error for me. However, I've got problems with the themes. Pushbutton seems to be okay, but bluemarine is missing the top blue banner lines and chameleon silently refuses to be enabled.

Matt Simpson’s picture

changing first user 'admin' after install Drupal 4.5.2 on - Redhat 9
& PHP4.2.2, I received the same error and resolved it with the patch suggested above

killes@www.drop.org’s picture

Status: Active » Fixed

php version issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)