The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help with a Mysqi problem using a mod
Before someone says "Go post in the thread that the original mod is in for help..." please note that the member who created the mod I'm about to post about has not been online since October 4 and their PM box is full as well as they are obviously not providing support for their mod.
The server has been recently upgraded from PHP 5.3 to PHP 5.4.33 and we are running vBulletin 4.2.2 P1. We are also running MySQL 5.5.37 if that helps any. I'm using a mod called Easy Forms, some of you maybe familiar with it. Its found here: https://vborg.vbsupport.ru/showthrea...34385&page=128 I'm getting this error now when I try to view the form. This happens whenever I click on the button to view the form that I have created. Here is the error. Code:
Fatal error: Cannot use object of type mysqli_result as array in /home/public_html/forum/forms.php on line 1242 Code:
$formbit['value'] = $q[$formbit[id]]; |
#2
|
|||
|
|||
Just as an experiment try doing it this way
Code:
$id = $forumbit[$id]; $forumbit['value'] = $q[$id]; |
Благодарность от: | ||
Max Taxable |
#3
|
||||
|
||||
Thanks that did not work
|
#4
|
||||
|
||||
I would guess it is some code above that actual line. Since I don't know the mod at all (which is why we tell you to post in the thread), then I can't say what the actual problem is. If you google the error, you'll get things like this that may help - http://stackoverflow.com/questions/1...-mysqli-result
|
#5
|
||||
|
||||
Quote:
[File removed] |
#6
|
|||
|
|||
I can't find that line of code but I think your problem is that the query returns a table , which is not quite the same thing as an array, so you have to run through the table and add values to your array. Perhaps older versions of php allowed you to fudge things a little and pretend the table is an an array but we have to be better coders in this brave new world of php 5x.
So generally you would want to do something like this: Code:
$php_array = array(); while($results = $vbulletin->db->fetch_array( $query_result )) { // add some query value to the array .... $php_array[] = $results[something]; } |
#7
|
||||
|
||||
Quote:
EDIT: just a bit of more info...If I uninstall the hack and reinstall it fresh and then create a new form it works fine until I add questions to the form. So it must have something to do with the questions being added. Maybe its possible to put those variables into an array? |
#8
|
||||
|
||||
Well I guess you have four options.
1) Wait for the mod author to fix the issue. 2) Downgrade your PHP version to 5.3. 3) Uninstall/Disable the mod. 4) Pay someone to fix it by posting in the paid requests forum, https://vborg.vbsupport.ru/forumdisplay.php?f=30 |
#9
|
||||
|
||||
Quote:
|
#10
|
||||
|
||||
Well then there is nothing you can do then.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|