Topic: Register error

I've been informed that people cannot register. Upon logging out and trying to register like a "new" user, I see what they mean.

The register page on my board does not show a password field. You fill out the form as it appears, and when you hit register, you are told to go back and choose a longer password. Eh, ok. Hard to do when you're given no field in which to input a password!

This error also shows up along the top of the page, after you hit register.

Notice: Undefined index: req_password1 in /home/virtual/site84/fst/var/www/html/bulletin/register.php on line 94

Notice: Undefined index: req_password2 in /home/virtual/site84/fst/var/www/html/bulletin/register.php on line 95


Of course, if I knew php better, I might have a clue what that means. Any help?

And yes, I am running the new version of punBB

Also my board is located here if that might help:
http://www.purrsiathunder.net/bulletin/index.php

Re: Register error

Well, the block of code you're looking at is:

    if ($pun_config['o_regs_verify'] == '1')
    {
        $email2 = strtolower(trim($_POST['req_email2']));

        $password1 = random_pass(8);
        $password2 = $password1;
    }
    else
    {
        $password1 = trim($_POST['req_password1']);
        $password2 = trim($_POST['req_password2']);
    }

Could you check and see what the value of o_regs_verify is? It seems to me it might be set to 2 or something

Re: Register error

ok, this is the code from the same area of my register.php page

if ($pun_config['o_regs_verify'] == '1')
    {
        $email2 = strtolower(trim($_POST['req_email2']));

        $password1 = random_pass(8);
        $password2 = $password1;
    }
    else
    {
        $password1 = trim($_POST['req_password1']);
        $password2 = trim($_POST['req_password2']);
    }

On first glance it looks the same as what you posted.

What's even funnier is I run another site with a punBB board, and it works fine. So I even tried taking its register.php page and using it to replace the one on the board I'm having trouble on...and it still doesn't work. That kinda tells me that maybe the problem is with another page rather than the register.php page.

It's also important to note that this board I'm having trouble on was hacked before I could do the update (the update issued before this most recent one). What I ended up doing was deleting the old board's files entirely, and just uploading and installing all new files that were of the latest update package at the time. It seemed to work ok except for this registration issue and the fact that my custom skin no longer works.
On my other site, I got to update that one before it was hacked so I never did have these problems with it. Still, it seems like if I just started over with all new files and an install, everything should still work properly. Unless...me keeping the old database has something to do with this (i.e. I kept the old db so posts up to my last backup were preserved, but the files for the actual board were totally replaced).

I have gotten the most recent update to install properly, but this registration issue is still lingering. Perhaps someone more schooled in php and databases can shed some light on why I'm having trouble with the board in question.

I thank you in advance for your time and advice.

4 (edited by Smartys 2005-04-09 19:23)

Re: Register error

I only posted the code as a demonstration of what it could be tongue
The problem, like I said, might be due to a database value
Run this query:

select conf_value from [prefix]config where conf_name="o_regs_verify"

and tell me what it says (replace [prefix] with your table prefix])

I have a feeling they switched some settings like that when you got hacked wink

Re: Register error

ok, this is what I was told after the query:

MySQL said:  

#1064 - You have an error in your SQL syntax near '[prefix]config where conf_name="o_regs_verify" LIMIT 0, 30' at line 1

so...am I right in assuming something in my config file is mucking up the works here?

Re: Register error

you need to change the [prefix] to your table prefix and no its nothing to do with your config file

Re: Register error

I did change the prefix to my table prefix. I just edited that part out when pasting it here.

Obviously I don't know what the results are telling me, hence the need for help.

Re: Register error

can you browse the table in phpmyadmin and find what o_regs_verify is set to?

Re: Register error

ok, I browsed the config table in mysql and saw many items that started with the o_ thing, but nothing that read o_regs_verify. So I'm either looking at the wrong table or this could be precisely what's wrong.

I'm sorry if I'm slow to catch on, but the finer points of databases isn't my strong suit. I thank you for bearing with me - and for all the help so far!

Re: Register error

theres more than one pages of items you need to find the buttom (top anf bottom right) thats as a > to go to the next page

Re: Register error

doh! I missed the obvious again!

Ok, I found the line with o_regs_verify - and there is no value set for it. I take it this is the problem? And I should set the value to 1, right?

Re: Register error

yeh you need to set it to one and delete cache_config.php in the cache folder

Re: Register error

Yes, it worked ^_^

Thanks a million - you guys are great!