Error on php7
Permalink Browser Info Environment
Hey there,
I am using your great Add-On on a Project, where it should integrate with another custom-built package.
This was running well on php5.6, now I am trying to move everything to php7.
As concrete5 version 5.6.4 (GitHub) is built to work with php7, it seemed easier to move this direction as to re-build everything for v 5.7+
Now, everything works just fine except formidable.
This error is shown in the logs:
/var/www/domain.tld/updates/concrete5.6.4_updater/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:80 mysqli error: [-9999: Input array has 3 params, does not match query: 'SELECT COUNT(answerSetID) AS total
FROM FormidableAnswerSets
WHERE formID = ?
AND temp != 1'] in Execute(, ) (-9999)
I am using your great Add-On on a Project, where it should integrate with another custom-built package.
This was running well on php5.6, now I am trying to move everything to php7.
As concrete5 version 5.6.4 (GitHub) is built to work with php7, it seemed easier to move this direction as to re-build everything for v 5.7+
Now, everything works just fine except formidable.
This error is shown in the logs:
/var/www/domain.tld/updates/concrete5.6.4_updater/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:80 mysqli error: [-9999: Input array has 3 params, does not match query: 'SELECT COUNT(answerSetID) AS total
FROM FormidableAnswerSets
WHERE formID = ?
AND temp != 1'] in Execute(, ) (-9999)
Type: | Discussion |
---|---|
Status: | In Progress |
Hi corretje
We run into the same problem on securing an older concrete5 installation.
Same errors.
Additional observation:
It occurs after the upgrade to the concrete5.6.4 (even on PHP 5.6). But with 5.6.4 I'm able to run the whole installation on PHP7.1 - only formidable produces the error. So fixing this for this package could help us to run older installations a bit longer.
best regards, Roland
We run into the same problem on securing an older concrete5 installation.
Same errors.
Additional observation:
It occurs after the upgrade to the concrete5.6.4 (even on PHP 5.6). But with 5.6.4 I'm able to run the whole installation on PHP7.1 - only formidable produces the error. So fixing this for this package could help us to run older installations a bit longer.
best regards, Roland
Hi Roland,
Could you change the following code and see what happens?!
/packages/formidable/models/formidable/forms.php, line: 202
to
That should fix the error. But maybe you are getting some more... Not sure.
Best,
Corretje
Could you change the following code and see what happens?!
/packages/formidable/models/formidable/forms.php, line: 202
public function countResults($by = '', $value = '', $return = false) { $this->submissions = 0; $db = Loader::db(); $q = "SELECT COUNT(answerSetID) AS total FROM FormidableAnswerSets WHERE formID = ? AND temp != 1"; if ($by != '' && $value != '') $q .= " AND ? = ?"; $data = $db->getOne($q, array($this->formID, $by, $value)); if ($data) $this->submissions = $data; if ($return) return $this->submissions;
Viewing 15 lines of 16 lines. View entire code block.
to
public function countResults($by = '', $value = '', $return = false) { $this->submissions = 0; $db = Loader::db(); $q = "SELECT COUNT(answerSetID) AS total FROM FormidableAnswerSets WHERE formID = ? AND temp != 1"; $v = array($this->formID); if ($by != '' && $value != '') { $q .= " AND ? = ?"; $v[] = $by; $v[] = $value; } $data = $db->getOne($q, $v);
Viewing 15 lines of 20 lines. View entire code block.
That should fix the error. But maybe you are getting some more... Not sure.
Best,
Corretje
Thanks, corretje
There's a second function which I had to correct:
public function lastResult…
And then the error was gone.
There were more errors after changing to php 7.1
I could fix some of them. But going to the backend i couldn't get access to the result page.
So it was not a good idea for updating. ;-)
Perhaps it's a big too big to fix for me.
There's a second function which I had to correct:
public function lastResult…
And then the error was gone.
There were more errors after changing to php 7.1
I could fix some of them. But going to the backend i couldn't get access to the result page.
So it was not a good idea for updating. ;-)
Perhaps it's a big too big to fix for me.
Same error here and the patch didn't fix the problem either on PHP 5.6.32 or 7.1.12. Is this something you are still investigating?
Hi,
Not really... Working with C5.6 on PHP7 is hard....
Best,
Corretje
Not really... Working with C5.6 on PHP7 is hard....
Best,
Corretje
Sorry for the late reply. Missed this support request...
IS this still an issue?!
Best,
Corretje