close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Call to a member function fetch_array() on a non-object

Thread began 2/20/2017 4:54 pm by LionsMane | Last modified 2/21/2017 7:48 pm by Ray Borduin | 1747 views | 5 replies |

LionsMane

Call to a member function fetch_array() on a non-object

Pulling a standard recordset (no strange IF or WHERE requirements) from a View gives this error on the rsobj.php file. Any ideas why this might happen? Changing to query a table instead of the View retrieves data just fine. All the view is doing is pulling another related column from another table. Nothing special, AND this used to work, so I'm not sure why it's suddenly failing. Thoughts on what to look at?

Sign in to reply to this post

Ray BorduinWebAssist

Maybe view permissions preventing the view from returning data to that user? Do you have debug=true in your rsobj.php file? That should cause it to show more information about errors like this.

If you can give me ftp access and a url to reproduce the problem I can look into it further.

Sign in to reply to this post
Did this help? Tips are appreciated...

LionsMane

FTP info

Sending in PM

Sign in to reply to this post

Ray BorduinWebAssist

What page should I browse to in order to reproduce the problem?

Sign in to reply to this post
Did this help? Tips are appreciated...

LionsMane

URL to reproduce

In PM. If I change it to call to a table instead of a view, the error goes away.

Sign in to reply to this post

Ray BorduinWebAssist

I added some debug code and found that the error it was reporting is:

Errno: 1615
Message: Prepared statement needs to be re-prepared

I did some googling on that error and never found a good answer for the cause. I did see there may be an open mysql bug associated with it. It appears it may be a matter of increasing the "table_definition_cache" parameter on your database. But that may not be possible on a shared hosting environment.

I've "Fixed" the problem for now by updating the rsobj.php file on your server so that it doesn't use a prepared statement if no parameters are passed, and then updated your recordset to embed the parameter rather than pass it as a prepared statement. Unfortunately that will break inspection of the recordset on your page.

In the long term I may add a configuration option to the recordset to turn off prepared statements for people like you that run into this problem, but you will have to use the work-around for now. Make sure to download and save a copy of the rsobj.php file I updated in case you accidentally overwrite it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...