Fatal error: Cannot use object of type PEAR_Error as array

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

Fatal error: Cannot use object of type PEAR_Error as array

Postby duddits » Mon Aug 18, 2008 7:14 am

I'm getting this error on a fresh install of webauction (0.3.2) when trying to access
main page (well, any page actually):
Code: Select all
Fatal error: Cannot use object of type PEAR_Error as array in /var/www/webauction/dataface/Dataface/Table.php on line 1971

I did setup a mysql database and permissions as stated on the install page.
Where did I go wrong?

Nothing interesting in the webserver logs either.

TIA.
duddits
 
Posts: 6
Joined: Mon Aug 18, 2008 7:04 am

Postby shannah » Mon Aug 18, 2008 9:20 am

Yes.. this is a problem that sometimes shows up on Windows installs (it is fixed in the dev version and will be included with the next release).

Essentially it cannot find the correct temp folder for your install (or it doesn't have write permissions).

Try downloading this dev version of Dataface/Application.php
http://weblite.ca/svn/dataface/core/tru ... cation.php

And replace your current file (dataface/Dataface/Application.php) with it and see if that gets it working.

Best regards

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

Postby duddits » Mon Aug 18, 2008 11:43 am

Thank you for the lead however I haven't installed it on a windows machine but on plain Linux :)

I'll check your solution tomorrow when I'm back at work.

Regards.
duddits
duddits
 
Posts: 6
Joined: Mon Aug 18, 2008 7:04 am

Postby duddits » Tue Aug 19, 2008 12:17 am

Unfortunately, it didn't work for me :?
The error msg stays unchanged.

Any other ideas ?

Maybe I could debug it somehow to provide more info as to
what is going on ?
duddits
duddits
 
Posts: 6
Joined: Mon Aug 18, 2008 7:04 am

Postby shannah » Tue Aug 19, 2008 11:06 am

What version of mysql/php are you using?

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

Postby duddits » Wed Aug 20, 2008 12:17 am

mysql: 5.1.26
php: 5.2.6
duddits
duddits
 
Posts: 6
Joined: Mon Aug 18, 2008 7:04 am

Postby shannah » Wed Aug 20, 2008 7:18 am

OK.. Should work fine in those versions. It is having trouble parsing some SQL that is part of one of the fields.ini file.

You may have to debug this one for me a little.

Go to line 1970 in your Dataface/Tables.php file:
Code: Select all
$data = $parser->parse($tsql);

Add a line after this as follows:
Code: Select all
if ( PEAR::isError($data) ){
    echo $data->getMessage();
}


This will tell you what the error is.

I have a few installs running with roughly the same PHP/MySQL versions as you, so this is quite confusing. Best guesses are:
1. Corrupted files (the fields.ini files)
2. You have made some changes to either the database schema or the fields.ini file (or the relationships.ini file) with some incorect SQL syntax.
3. Some of the database didn't get generated properly.

...
hmm

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

Postby duddits » Wed Aug 20, 2008 7:41 am

Here's what I got after adding those lines:
Code: Select all
Parse error: Unknown action :s on line 1 select p.*,current_high_bid from products p left join (select product_id,max(bid_amount) as current_high_bid from bids group by product_id) as b on p.product_id=b.product_id ^ found: "s" Fatal error: Cannot use object of type PEAR_Error as array in Table.php on line 1974

I did not play with any of the files you mentioned. In fact I didn't change a thing :)
(apart from what was suggested on the install page of course).
I was just browsing thru installation files looking for a clue but this error was
too mysterious for me :)
duddits
duddits
 
Posts: 6
Joined: Mon Aug 18, 2008 7:04 am

Postby shannah » Mon Aug 25, 2008 8:22 am

Sorry for the delay... I knew I had seen this before:
http://xataface.com/forum/viewtopic.php?t=4041

I just wanted to post the solution to this problem in case future users run into it.� The problem was that PHP was not compiled with the ctype functions.� (http://php.net/ctype).� The solution was to ask the hosting provider to recompile PHP with the ctype functions enabled.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby duddits » Tue Aug 26, 2008 3:35 am

Perfect! :)

Thank you very much, I'd have never guessed that by myself.

Now, it's finally working :)
duddits
duddits
 
Posts: 6
Joined: Mon Aug 18, 2008 7:04 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 26 guests

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