Hi,
I'm using CFv4, Joomla 3.2.3, PHP 5.3.28, and MySQL 5.5.33
We're maintaining an existing site with a lot of CFv4 forms and CCv4 connections, and for the time being we can't upgrade to version 5.
I just created a new form, and in the On Submit event added a DB Save action. I also set the Joomla Debug level to Developer.
When the form is submitted, I get two errors:
I suspect it's a Joomla issue related to changes since 3.1, possible the PHP version 5.3,
Is there a version of CFv4 that is compatible with 3.2.3 and PHP 5.3.28?
Thanks!!
I'm using CFv4, Joomla 3.2.3, PHP 5.3.28, and MySQL 5.5.33
We're maintaining an existing site with a lot of CFv4 forms and CCv4 connections, and for the time being we can't upgrade to version 5.
I just created a new form, and in the On Submit event added a DB Save action. I also set the Joomla Debug level to Developer.
When the form is submitted, I get two errors:
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /home/s102/public_html/administrator/components/com_chronoforms/form_actions/db_save/db_save.php(66) : eval()'d code on line 21
Fatal error: Call to a member function bind() on a non-object in /home/s102/public_html/administrator/components/com_chronoforms/form_actions/db_save/db_save.php on line 119
I suspect it's a Joomla issue related to changes since 3.1, possible the PHP version 5.3,
Is there a version of CFv4 that is compatible with 3.2.3 and PHP 5.3.28?
Thanks!!
Hi Sloan,
Any of your table fields or form fields starts with "$" ?
Regards,
Max
Any of your table fields or form fields starts with "$" ?
Regards,
Max
Hi Max,
Nope. All table names and field names use lower case and underscores.
Nope. All table names and field names use lower case and underscores.
Here are the relevant code snippets: I will install CF on a new clean 3.2.3 Joomla and see if I can repeat this issue but would like this working on this active site too. Any help including paid support would be appreciated.
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /home/s102/public_html/administrator/components/com_chronoforms/form_actions/db_save/db_save.php(66) : eval()'d code on line 21
119 //check if a different database connection is needed
120 if($params->get('ndb_enable', 0)){
121 $option = array();
Fatal error: Call to a member function bind() on a non-object in /home/s102/public_html/administrator/components/com_chronoforms/form_actions/db_save/db_save.php on line 119
111 if(isset($form_data[$primary]) && !empty($form_data[$primary])){
112 //don't merge, just set a modified date
113 $form_data = array_merge(array('cf_modified' => date('Y-m-d H:i:s', time()), 'cf_modified_by' => $user->id), $form_data);
114 $form->data = $form->set_array_value($form->data, explode('.', $model_id), $form_data);
115 }else{
116 $form_data = array_merge($defaults, $form_data);
117 $form->data = $form->set_array_value($form->data, explode('.', $model_id), $form_data);
118 }
119 if(!$row->bind($form_data)){
120 $form->debug[] = $row->getError();
121 $return = false;
}
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /home/s102/public_html/administrator/components/com_chronoforms/form_actions/db_save/db_save.php(66) : eval()'d code on line 21
119 //check if a different database connection is needed
120 if($params->get('ndb_enable', 0)){
121 $option = array();
Fatal error: Call to a member function bind() on a non-object in /home/s102/public_html/administrator/components/com_chronoforms/form_actions/db_save/db_save.php on line 119
111 if(isset($form_data[$primary]) && !empty($form_data[$primary])){
112 //don't merge, just set a modified date
113 $form_data = array_merge(array('cf_modified' => date('Y-m-d H:i:s', time()), 'cf_modified_by' => $user->id), $form_data);
114 $form->data = $form->set_array_value($form->data, explode('.', $model_id), $form_data);
115 }else{
116 $form_data = array_merge($defaults, $form_data);
117 $form->data = $form->set_array_value($form->data, explode('.', $model_id), $form_data);
118 }
119 if(!$row->bind($form_data)){
120 $form->debug[] = $row->getError();
121 $return = false;
}
Sloan & Newfeld,
This is the line which has the main issue #66:
is it possible to edit that file and add this line above it:
That would display the code which has the error when the action runs, I need to check this code!
This is the line which has the main issue #66:
eval("?>".$dynamic_model);
is it possible to edit that file and add this line above it:
print_r2($dynamic_model);
That would display the code which has the error when the action runs, I need to check this code!
Hi Max,
I inserted the line but I didn't get any printout. I then changed the line to
echo '<pre>dynamic_model:' . print_r2($dynamic_model) .'</pre>';
and it just printed dynamic_mode:
with nothing after it.
I created a new website running Joomla 3.2.3 with only one extension, Chronoforms, and it does behave well with no problems. That tells me I have something wrong with my environment on the website where it doesn't work. I don't absolutely need chronoforms on that site - I could use something else. With Sloan Thrasher's mentoring I've been learning chronoforms and am really getting to like it. Thanks for creating it.
Stewart
I inserted the line but I didn't get any printout. I then changed the line to
echo '<pre>dynamic_model:' . print_r2($dynamic_model) .'</pre>';
and it just printed dynamic_mode:
with nothing after it.
I created a new website running Joomla 3.2.3 with only one extension, Chronoforms, and it does behave well with no problems. That tells me I have something wrong with my environment on the website where it doesn't work. I don't absolutely need chronoforms on that site - I could use something else. With Sloan Thrasher's mentoring I've been learning chronoforms and am really getting to like it. Thanks for creating it.
Stewart
HI sloanthrasher,
It's going to be some kind of odd character. The code at line 66 (message 1) builds a PHP class to match the table stucture and then evaluates the resulting PHP. You could try dumping the output before it is evaluated to see what is there.
The second message is because the class doesn't exist (as it wasn't created).
CFv4 runs on Joomla! 3.2.2 OK
Bob
It's going to be some kind of odd character. The code at line 66 (message 1) builds a PHP class to match the table stucture and then evaluates the resulting PHP. You could try dumping the output before it is evaluated to see what is there.
The second message is because the class doesn't exist (as it wasn't created).
CFv4 runs on Joomla! 3.2.2 OK
Bob
This topic is locked and no more replies can be posted.