So I finally worked out some issues I had setting up a second mySQL database with my hosting service, and created the initial database for my site.

In general, my preferred method of working is to set up a local copy of apache, install the software and misc. add-ons, and then export a copy of the database, which I then import into the database on the server.

After doing this, when I tried to log in on the hosted copy, the page refreshed and showed only a portion of the username I'd typed, as well as a shorter password, and the message "I don't recognize that user."

After clearing the auto-complete cache in Explorer and simply typing each field out by hand with the same result, I reverted to a "clean" copy of the database with no user info.

The new account was created without incident; I chose the user name "Middle Brother", gave it my email address (webmaster@atlasisshrugging.org), and it spat back out "barnerd" as a password. When I tried to log in again, however, the same thing happened.

The text fields showed "le Brother" and my password was something like "***". While I know very little about mySQL, I did check the new database and sure enough, the user name had been stored as "le Brother", my email address was "aster@atlasisshrugging.org", etc.

I don't have a lot of work invested into the setup and so I'm not going to lose anything if I start over from scratch, which is what I plan to do next.

But I'm worried that I'll run into the same problem. Does anyone have any idea what might cause this or how to fix it?

Comments

Max Bell’s picture

I've been poking around with this all afternoon.

I did verify that it happens to other users. It can be tested here: http://atlasisshrugging.org/lb2/index.php -- and I've both reinstalled all of the files and emptied the database out a couple of different times.

wol’s picture

I just suddenly had the same problem arising at my sites at acsite.net. (dropping first four characters). It is not just login, it is also occuring in the title of the story, the first 4 letters of the story itself, etc.

Acsite.net is running php 4.2.3 with built on Feb 18 2003 12:05:50

Configure Command
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' '--enable-exif' '--with-ldap'

I've sent an email to support, but any help anyone else can give would be appreciated.

Update: Acsite.net identified this as the 4.2.3 problem with mbstring. They are going to downgrade to 4.2.2. Fortunately I don't think I am using any 4.3 features.

Max Bell’s picture

I was looking at the php config, and of course, outside of register globals being turned on on the server and off on my box, they were identical.

But the php version is 4.2.3 (vs 4.3.1).

One thing I noticed, however, is that I couldn't "fake out the problem" by adding an extra four characters to the string.

Does anyone know what actually causes this problem?

ax’s picture

Bug #19404: Post variable names stripped of first 4 characters. Version: 4.2.3

Max Bell’s picture

But nothing else. Would that make a difference?

Since I use shared hosting, I don't have direct access to my own copy of php.ini, although I was looking into ways of overriding that with .htaccess earlier. I don't completely understand the formatting issues that this affects (although I know they exist).

If it's useful, I have a copy of phpinfo() installed from way back.

In the interim, I did hit up my hosting service to find out why we don't have "the latest and greatest" and what kind of timeframe to expect it in.

[edit] Thanks for the help, btw. Only local images are allowed.

ax’s picture

did you read it?

Max Bell’s picture

Figuring you might be on.

I'm off to ship that URL to my hosting service.

Thanks again!