View Single Post
  #1 (permalink)  
Old 03-07-05, 11:08 PM
abtimoteo abtimoteo is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Question unable to add user with httpd::useradmin

hi, everybody! can somebody please help me find the error in the lines of code below.

-----

use DBI;
use HTTPD::UserAdmin ();

@SQL = (DBType => "SQL",
Host => "localhost",
Port => "80",
DB => "my_database",
User => "my_username",
Auth => "my_password",
Encrypt => "crypt",
Driver => "mysql", # the default, according to docs, is mSQL
Server => "apache",
UserTable => "www-users",
NameField => "user",
PasswordField => "password"
);

$user = new HTTPD::UserAdmin @SQL;

$user->add('user2', 'password2');

-----

when run, the above produces the following error:

DBD::mysql::st execute failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-users WHERE user='user'' at line 1 at /usr/lib/perl5/site_perl/5.6.0/HTTPD/UserAdmin/SQL.pm line 96.
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-users WHERE user='user'' at line 1 at addMListU2.pl line 82

thanks in advance!
Reply With Quote