I've just downloaded and installed drupal 4.7.0 beta 4 to play around with. The installation started well. When I set up the first account, I got the following warnings when I submitted the account info.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\MyServer\www\drupal47\includes\form.inc on line 180.
* warning: Missing argument 1 for password_confirm_validate() in D:\MyServer\www\drupal47\includes\form.inc on line 595.
The upshot if this is that when I log out, it doesn't recognize my password and won't let me in. I've deleted and reloaded the db twice now. Each time, I got the same warnings and couldn't log in again after logging out.
Anyone have any idea what's going on?
Comments
Same here
I believe the problem is that the beta4 code is slightly incompatible with PHP 5.1.x. I have not found a solution yet but at least I could give you a workaround for the password problem - login directly to your database and "open" the "users" table. There should be a user with 'name" you specified on installation and with "pass" a 32 characters long string. Use PHP or other tool (under Linux there is "md5sum") to calculate the MD5 hash of your new password. Then replace the current content of the "pass" field with the calculated one. On PostgreSQL you could do it like that:
UPDATE users SET pass=MD5('mynewpass') WHERE name='admin';
Then you could login using (e.g.) "admin:mynewpass".
--
Milen A. Radev
MySQL, MD5 and UID 1
MySQL also has an MD5 function, so you won't have to resort to other tools.
The name of the administrator account varies. The UID is always 1.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Even better!
I installed Drupal yesterday for the first time so I was not aware of this detail.
By the way the quoting of the uid is superfluous, at least in PostgreSQL.
--
Milen A. Radev
Thanks Milen and Heine. I
Thanks Milen and Heine. I used phpMyAdmin to make the change and login is now okay. I'll test it to see if the same happens to all accounts.
edit: It only seems to happen with the first account. Hope this gets fixed before 4.7 is officially released!
Another workaround
As we already know all the arguments of array_merge should be of type array - excerpt from http://www.php.net/manual/en/function.array-merge.php :
So if we cast the second parameter to array everything should be ok (includes/form.inc:180):
$args = array_merge(array($elements), (array)$args);I've Just tested it - works like a charm.
--
Milen A. Radev
This is already fixed in
This is already fixed in CVS, maybe get yourself a cvs snapshot.
--
Drupal services
My Drupal services
--
Drupal services
My Drupal services
Thanks again. That's a much
Thanks again. That's a much better solution Milen. I didn't know anything about changes to php. I've only learnt php, mysql and drupal in the last 2 weeks so this is all very new.
And I don't know what is meant by CVS in this context. I thought CVS was the name of the version management system. I must be mistaken as killes refers to it as if it is the latest drupal. Where do I find this CVS?
There was a bug in 4.6.5 which I found mildly annoying. It's in 4.7.0 beta 4 too so maybe this CVS doesn't have it.
CVS
CVS is a version management system. CVS version or drupal cvs or 'in cvs' means the bleeding edge code. It can be obtained from downloads > cvs. Beware: cvs can be broken.
What bug do you refer to? Did you file a bugreport?
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Thanks for clearing up the
Thanks for clearing up the CVS thing.
The bug I mentioned is that if you extend the user profile, which I need to do, the profile does not get deleted when the user is deleted. I traced the delete process but could not find anywhere where the extended profile attached to the user is deleted when the user is deleted. I may be wrong.
I started with user_edit, which seems to be where it begins. Just after deleting all the user data, it calls module_invoke_all('user', 'delete', $edit, $account). This, as you know, calls module_user for every module where the function is defined and passes the parameter 'delete'. The function profile_user, which is where I would assume the delete is taken care of, does nothing with this parameter as it is not set up as a case in the switch statement. I may be looking in the wrong place but if so I don't where the problem is.
I was hoping to 'fix' it by setting up the appropriate relationship in the MySQL drupal db so that 'delete user' cascades and deletes the appropriate profile values too. Unfortunately, the drupal tables in MySQL are MyISAM tables which don't support this, as far as I know. I don't want to change them to INNODB as I don't know what impact this might have.
I will probably just add the necessary functionality to the profile module. It won't happen often, but when it does, I want deletion to be 'complete'!
I did file a bug report. I wasn't sure where to put it so I put it under the 'Drupal' project heading. That was yesterday. I don't how often these get checked but I guess someone will find it sometime.
delete not implemented
I've look; profile.module doesn't implement the 'delete' argument. Not sure if there's a rationale to it, but I'm sure someone will find you bug report soon.
If you want to delete a profile on user deletion; adding a case 'delete' to the switch statement is the easiest.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
It's not just me then ...
I'm glad you couldn't find the delete either. Must have been overlooked. It's not important in most applications I suppose, but it is in mine. Let's hope they fix it before the next official release.
Still there (or reappeared)
Just dowloaded CVS the bug is still there.
form.inc is dated Feb, 10.
tested it and still no working
I had to reset the password MD5 style and then I had to change the status of the record to 1.
then it works.