Re: [openupload-devel] New user creation
Status: Beta
Brought to you by:
tsdogs
|
From: Bica, G. <geo...@in...> - 2010-10-19 19:45:11
|
Adding $user['reg_date']=date('Y-m-d H:i:s'); did the trick! I was not
able to get any feedback from the print_r, but at least this resolved
the issue. Looking at the "users" table, I tried to create a user
manually, and looks like that table requires data for all columns to get
a new record added, including one for "reg_date" in the format 'Y-m-d
H:i:s'
-----Original Message-----
From: Alessandro Briosi [mailto:ts...@br...]
Sent: Tuesday, October 19, 2010 2:11 PM
To: OpenUpload Delvel and General talk
Cc: Bica, George
Subject: Re: [openupload-devel] New user creation
Il 19/10/2010 18:57, Bica, George ha scritto:
> I am using Open Upload 0.4.1, and have come up to an interesting "bug"
>
>
>
> *Dev environment----*
>
> Server2Go on Windows 7, comes prepackaged with:
>
> Apache 2.2.15
>
> PHP 5.3.2
>
> MySQL 5.1.46
>
>
>
> *Production environment, manually configured and integrated ----*
>
> Windows 2003
>
> Apache 2.2.16
>
> PHP 5.3.3
>
> MySQL 5.1.51
>
>
>
> I run the script configuration, all setup good and working properly.
> The only thing that I am having problems with is creating new users
> from Administration in the production environment.
>
>
>
> In development a new user is created, no problem.
>
> In production once I click "Add" button the user list comes back, but
> no user is created. There is no error in logs or screen.
>
> Incidentally, if I allow registrations in the production server, then
> users are self created without a problem.
>
>
>
> Short of trying to figure out manually which package is to blame, is
> there a debug tool I can use to troubleshoot this? My guess is the the
> SQL statement passed via PHP to MySQL is not being executed, but can
> not be sure, just a wild guess at this time.
>
>
>
> Your help is appreciated.
This is pretty odd. As the differences between your dev and production
LAMP installation is quite similar (beside the OS), I'd say you are
hitting some bug wither with php or mysql.
Debugging might be a bit difficult. the registration/add user queries
should be similar as the auth module does insert that info. It's strange
the fact that you don't get any error from php/mysql.
I'd try doing a print_r($user) in the useradd function in
lib/modules/auth/default.inc.php and check what could be the wrong value
or the missing one.
It might be a date problem (?) somebody pointed out that some version of
mysql did want a value for the date Try adding the following to
lib/modules/default/admin.inc.php after line 120 in the useradd function
(before the "$error = false;" line):
$user['reg_date']=date('Y-m-d H:i:s');
And see if this fixes the problem.
Alessandro
|