Error message in form after replacing website db

kaeser49 28 Sep, 2019
Hi,

I hade to do a restore of our website db. Mostly is working now except some forms from Chronoforms5:

I get this error as an example:
1)
Warning: Cannot modify header information - headers already sent by (output started at /homepages/24/d606922727/htdocs/renz-jobs.de/wp-content/themes/x/framework/legacy/cranium/headers/views/global/_header.php:10) in /homepages/24/d606922727/htdocs/renz-jobs.de/wp-content/plugins/chronoforms/admin/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 2
2)
se of undefined constant OwnerUser_ID - assumed 'OwnerUser_ID' (this will throw an Error in a future version of PHP) in /homepages/24/d606922727/htdocs/renz-jobs.de/wp-content/plugins/chronoforms/admin/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 817

This is the code in the form which worked before I did the restore:


$query = "select OwnerUser_ID, count(ID) as Total from pav_Bewerber where CreatedTime >= '2019-04-01' and CreatedTime < '2019-05-01' group by OwnerUser_ID";

$result = mysqli_query($connection, $query);

$list = array();

while ($row = mysqli_fetch_assoc($result))
{
$list[] = $row;
}

$arrlength = count($list);

for($x = 0; $x < $arrlength; $x++) {
echo "
";
echo " -> " . $list[$x][OwnerUser_ID] . ": " . $list[$x][Total];
}


The error is one thing but also the mentioned eval code. I did the proposed setting on chronos website and got the key and serial number but either combination of products does not let me validate my license. But I must also say that I do not have an clue that my license is not registered. Most of the forms are working.

We are on PHP 7.3 but I went back to 7.1 with no change.

What can I do? I appreciate your support.

Best

Werner
GreyHead 30 Sep, 2019
Hi Werner,

These are both PHP warnings, not technically errors.

The first one is being generated by your custom PHP - it might be as simple as a space outside the <>php ?> tags.

The second is a warning that future version of PHP will require quotes in [OwnerUser_ID] in the last line but one like this ['OwnerUser_ID']

Bob
This topic is locked and no more replies can be posted.