Joomla error after site user rename

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
25,033
Location
California
I tried using the DirectAdmin script change_username.sh to change the username of a Joomla site.

When it was finished I discovered that there were too many places in the site where joomla had hardcoded paths including the username, so I ended up using the same script to change the username back to what it was.

Now Joomla tells us it can't connect:
This site is temporarily unavailable.
Please contact your System Administrator.
Could not connect to the database server

(See http://www.kelli.com/)

I can connect to the databases using PhpMyAdmin, and I can connect using DirectAdmin (tested by changing privileges; it wouldn't do that if it couldn't log into the databases.

Any ideas?

Thanks.

Jeff
 
There should not be a problem doing that. Just check the configuration.php in the Joomla directory and set the correct path , database and database user prefs. As far as I know there are no hardcoded paths i Joomla.
 
You're right of course; there are no hard-coded paths. But there were a lot of places to change paths, and I'm not the joomla guy. I run the server for a client. Moving back to the old username was the best thing to do, but the problems, as noted above persisted.

It took a while but we (the Joomla guy and I) finally found out why...

The change_username.sh script (or something it called) managed to truncate the usernames for any username of over 13 characters total (including the underscore character).

Which of course meant until we figured that out and fixed the usernames, we continued to have problems.

I consider that a bug; it easily breaks databases. I hope John can fix it.

Jeff
 
Thanks for that info jlasman. I havn't run into that specific problem yet but if I do I would now know what to do. :)
I consider myself a "joomlaguy" aswell and more than 80% of my clients are using Joomla so it was usefull info.
 
Hi Jeff,

Can you provide an example username that went into the script, and what username came out? and where the wrong names were saved? Note that mysql has a 16 character cap for db names, thus 14 would be the upper limit of DA usernames (plus 1 for the underscore, plus 1 character for the db name). Also, DA does a check for valid usernames.. and there is a setting in the directadmin.conf, eg:

max_username_length=10

so if your username is 13 character as you have a limit of 10, DA will consider that invalid and not display it until you crank up the limit in the directadmin.conf. The "change_username.sh" script does not check this limit, so just make sure you keep your new usernames below whatever you've got set.

Relating to he Joomla site, the script does not go through any of your php files, so any config paths you've set would have to be updated manually.

John
 
You're right, of course, John. It's probably non-fixable; switching usernames created mysql names which were too long; they got truncated (by mysql?)?

Can you at least put a warning into the change-user screen that it could adversely affect mysql usernames?

Thanks.

Jeff
 
Back
Top