Login gives PEAR error

A place to discuss and receive support for the Web Auction application.

Login gives PEAR error

Postby Anthony Barber » Wed Oct 24, 2007 12:01 pm

Hi Steve,
I am English but I live in Germany. When programming I normally choose the English versions as they are normally the original versions and don't suffer through translation. (My OS is WIN200 professional German. Eclipse and Xampp is English.) I am saying all this just in case it helps you to solve my problem. I might have more than one problem.

I have a good clean Webauction screen. I click on the Login and I get a frame with the login fields. I feel sure that the first time I clicked on Login all the text was in English. Now it isn't, now the banner text 'Please login ....." is in German.
Login Form stays, username and password is translated.
Submit is now translated into Find. Register is translated OK.

So the first time after clicking login (when I feel sure it was in English) I entered admin and password then clicked submit.

I got the following error.
Fatal error: Cannot use object of type PEAR_Error as array in C:\xampp\htdocs\dataface-0.7.1\Dataface\Serializer.php on line 75

So I repeated the login and this time had the German text where the submit button now says FIND. So I thought oh! I have to click register that was the mistake. Clicked register, and I am logged in as a user.
So I repeat the login and click the submit button (text FIND) and get the same pear_error as above.

My questions:-
#1 Why can't I login what does the error mean?.
and
#2 Is the automatic translation (and sometimes wrong) going to be a problem for me or will it in fact be a bonus? My auction site needs to be in German, Danish, Dutch and English.
Thanks again for all the help.

Best regards,
Tony
Anthony Barber
 
Posts: 29
Joined: Tue Oct 23, 2007 9:58 am

Postby shannah » Fri Oct 26, 2007 7:27 am

Hi Anthony,

It appears to be having problems serializing one of the fields.
Try adding some debugging code to line 76 of Serializer.php (the line before the error occurs, to find out which field it is. e.g.
Code: Select all
echo '[Field: '.$fieldname.']';


At least this will tell us which field it is having trouble with so we can look into it.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Anthony Barber » Fri Oct 26, 2007 12:33 pm

Hi Steve,
I added the debug line as you said - this was the result.

[Field:username][Field:password]
Fatal error: Cannot use object of type PEAR_Error as array in C:\xampp\htdocs\dataface-0.7.1\
Dataface\Serializer.php on line 76

I had entered:- admin then password.

What do you think? - Sorry I am so much trouble. But I am determined to get this going so that I can study the structure of the whole thing.

The button text error!!
I take it that somewhere there is what we would call in VB a RES file with the different languages in and that in the German part Find has ended up where submit should be. At first I had thought it was doing a Find, now I realise that was just the button text, the code stayed the same.
Best regards,
Tony
Anthony Barber
 
Posts: 29
Joined: Tue Oct 23, 2007 9:58 am

Postby shannah » Fri Oct 26, 2007 12:55 pm

OK it looks like the sticking issue is on the 'password' field.
Have you made any modifications to the users table? Perhaps the password field is the wrong name.

In the conf.ini file in the [_auth] section it specifies the names of the columns that are used for username and password respectively (case sensitive). Please check to make sure that these are correct.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Anthony Barber » Fri Oct 26, 2007 3:49 pm

Hi Steve,
I have not changed any of the tables.
I have made 3 databases using different names and they all look the same.
I used phpMyAdmin.
I chose a name to create a database (i.e. coins) then used the import function to execute the tables.sql.

This gave me a database with 6 tables.

One of the tables is users.
This table contains 3 fields:-
Usename :varchar(32)
role : enum('USER','ADMIN') Default USER
pref_receive_outbid_notifications:tinyint(1)

There is no password field!!!

I changed the conf.ini database name to read coins, user to root and removed the password (As far as I could see I had no password - and it did allow me to get the webauction intro screen.)

[_database]
host="localhost"
user="root"
password=""
name="coins"


My [_auth] is as in the conf.ini.dist only 4 lines are active the rest are rem'd out.

users_table = users
username_column = username
password_column = "password"
allow_register=1

Are some fields missing in my users table?
Best regards,
Tony
Anthony Barber
 
Posts: 29
Joined: Tue Oct 23, 2007 9:58 am

Postby shannah » Fri Oct 26, 2007 4:44 pm

Indeed you have found the problem. Yes. Some fields are missing from your users table. Thanks for pointing this out... evidently the tables.sql file in the install directory has the incorrect table schema. Refer to the install.sql file for the correct schema.

Sorry for this confusion.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved