problem with admin username/password creation

Please post all install related problems here. Visit this forum first for troubleshooting.
rebelbwb
Posts: 2
Joined: Thu 29. Dec 2005, 04:32

problem with admin username/password creation

Post by rebelbwb »

I am currently at step 2 in the install process and am filling in the appropriate info related to admin username and password and have checked the 'create admin account' box. Once I fill in that info as well as the other info and try to proceed to step 3 I get a message indicating to check your admin username and password. Can't get beyond that.

Any help is appreciated
beerka
Posts: 6
Joined: Thu 5. Jan 2006, 14:42

Post by beerka »

Hi!

Thats my problem too. Drupal is working with the mysql properly.
I checked the database, the tables are made by setup. If i check the checkbox to create the admin user, i got this error message:

"check your admin username and password. "

Why?

That's why:
-------------
step2.inc.php:
[...]

if($err) echo "<p class=\"error\"><b>Check your admin user name and password!</b></p>";

[...]


And why is $err==1 ?
-------------------------
setup.php at step2:

[...]

if(!empty($_POST["admin_create"])) {
$db = mysql_connect($phpwcms["db_host"],$phpwcms["db_user"],$phpwcms["db_pass"]);
mysql_select_db($phpwcms["db_table"],$db);
$phpwcms["db_prepend"] = ($phpwcms["db_prepend"]) ? $phpwcms["db_prepend"]."_" : "";
$sql = "INSERT INTO ".$phpwcms["db_prepend"]."phpwcms_user (usr_login, usr_pass, usr_email, ".
"usr_admin, usr_aktiv, usr_name, usr_fe ) VALUES ('".
aporeplace($phpwcms["admin_user"])."', '".
aporeplace(md5($phpwcms["admin_pass"]))."', '".
aporeplace($phpwcms["admin_email"])."', 1, 1, '".aporeplace($phpwcms['SMTP_FROM_NAME'])."', 2);";
mysql_query($sql,$db) or $err = 1;
}

[...]


But i dont know what is the problem with the sql... Somebody help pliiiz.
beerka
Posts: 6
Joined: Thu 5. Jan 2006, 14:42

Post by beerka »

mysql 5.0
phpwcms 1.2.5

Problem is:

user table:

CREATE TABLE `phpwcms_user` (
`usr_id` int(11) NOT NULL auto_increment,
`usr_login` varchar(30) NOT NULL default '',
`usr_pass` varchar(255) NOT NULL default '',
`usr_email` varchar(150) NOT NULL default '',
`usr_tstamp` timestamp(14) NOT NULL,
`usr_rechte` tinyint(4) NOT NULL default '0',
`usr_admin` tinyint(1) NOT NULL default '0',
`usr_avatar` varchar(50) NOT NULL default '',
`usr_aktiv` int(1) NOT NULL default '0',
`usr_name` varchar(100) NOT NULL default '',
`usr_var_structure` blob NOT NULL,
`usr_var_publicfile` blob NOT NULL,
`usr_var_privatefile` blob NOT NULL,
`usr_lang` varchar(50) NOT NULL default '',
PRIMARY KEY (`usr_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;


and the php code to insert webmaster account:
$sql = "INSERT INTO ".$phpwcms["db_prepend"]."phpwcms_user usr_login, usr_pass, usr_email, "."usr_admin, usr_aktiv, usr_name, usr_fe) VALUES ('".aporeplace($phpwcms["admin_user"])."', '".aporeplace(md5($phpwcms["admin_pass"]))."', '".aporeplace($phpwcms["admin_email"])."', 1, 1, ".aporeplace($phpwcms['SMTP_FROM_NAME'])."', 2);";

SO for example field `usr_var_structure` is defined to not null in the
database, and the php code dont fill it.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi, :D

at this point I would download the last version 1.26 CVS 14.12.2005 and start a fresh installation.
http://www.phpwcms-docu.de/index.php?cvs_info_en
- Kill the database
- delete all files and folders
- copy the newest version at your webspace
- setting correct permissons for files & folder
- start the installation 1.26CVS
http://www.phpwcms-docu.de/installation_en.phtml

Error: http://www.phpwcms-docu.de/errormessages_inst.phtml

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
beerka
Posts: 6
Joined: Thu 5. Jan 2006, 14:42

Post by beerka »

Ok i dowloaded it.
Delete the old dir, copy the new ...
Delete the database...

The problem is the same, because php code is the same when
it wants to create the admin account, and the user table structure
is the same, there are fields with not null, but with no default value,
which is missing from the insert sql command (in php code).
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

What are you implying... That nobody can ever install and login to phpWCMS and that this forum is full of "imaginary" posts from users who couldn't possibly be using this script?

You lost me somewhere in your reasoning... about working with BLOBs that aren't set to an "explicit" default? You can rest assured that if no DEFAULT value is specified ... MySQL automatically assigns one. :wink:
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

are you shure that the Database-Connect is setup properly - also the SQL-User you use have the necercy Permissions?
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
beerka
Posts: 6
Joined: Thu 5. Jan 2006, 14:42

Post by beerka »

1.
- permissions are set properly (script creates the tables)

2. Ok iam a newbie:) But i dont understand it:

i modified the step2.php, because i always get this on that page:
"Check your admin user name and password!".

So the step2.php

[...]
if($err) echo "<p class=\"error\"><b>Check your admin user name and password!" . mysql_error() ."</b></p>";
[...]

and the error message is:
Field 'usr_var_structure' doesn't have a default value

(before the setup i deleted the tables, so the script created them after step1 )
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

don't mess around with the Setup-Script - if your Server is running correct, you don't have to change anything in the Script.

Try to use the Default Admin/Passwort for the first run - don't forget to make the Sign in the Checkbox for 'Create Admin Account' - maybe your Username and/or Passwort is to short.
Also try to set/unset 'use persistent db con' on the first Page.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
beerka
Posts: 6
Joined: Thu 5. Jan 2006, 14:42

Post by beerka »

with everything default:

- use default admin username and password and check the create admin checkbox

I get this error on the top:
"Check your admin user name and password!"

Ok i tried to set/unset 'use persistent db con' .
But i always get "Check your admin user name and password!"
at the 2. step.

(thats why i tried to echo the error message in the script)
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi beerka,

Are you using an local installation, windows or linux?
What PHP-Version are running?
MySQL 5.x?

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
beerka
Posts: 6
Joined: Thu 5. Jan 2006, 14:42

Post by beerka »

local
Windows XP
Apache/2.0.55
PHP/5.1.1
mysql 5.0
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,
I have quickly installed an Xampp out of the box on XP-Prof.
The newest Version of phpWcms 1.26CVS.
All is running well.

Windows XP-Prof SP2
Apache/2.0.55
PHP/5.0.5
mysql 5.0.15
PHPMyAdmin 2.6.4-pl3

http://www.apachefriends.org/en/

For testing:
Please disable all other programms and login as admin.
- Firewall ?
- V-Scanner ?
- ......

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
toolman
Posts: 9
Joined: Tue 22. Mar 2005, 09:28

Solution?

Post by toolman »

Hi,

i had the same problem with the installation as described.
The solution for me was the following:

Make sure to do a CHMOD 777 for the file setup.conf.inc
before starting the setup.php script!

After that, everything runs ok with the setup (hope so ;-)

Greeting
Ralf
kubber
Posts: 7
Joined: Thu 19. Jan 2006, 10:49

Re: Solution?

Post by kubber »

toolman wrote:Hi,

i had the same problem with the installation as described.
The solution for me was the following:

Make sure to do a CHMOD 777 for the file setup.conf.inc
before starting the setup.php script!

After that, everything runs ok with the setup (hope so ;-)

Greeting
Ralf
Hello,

I installed phpwcms 1.2.5 and have the same problem. I also CMOD the file setup.conf.inc.
The datatbase connection works proberly.
Does anybody have an idea what could be my problem?

Cheers
Simon
Post Reply