cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
MYSQL Errors
February 1, 2013
10:59 am
Aruffell
Guest

Was all working fine and then suddenly when I go to tracking, it says Processing and will stay like that infinitely.

When I click on view records I get this error:

cformssubmissions = $wpdb->prefix . 'cformssubmissions'; $wpdb->cformsdata = $wpdb->prefix . 'cformsdata'; ### new global settings container, will eventually be the only one! $cformsSettings = get_option('cforms_settings'); ### get custom functions $CFfunctionsC = dirname(dirname(dirname(dirname(__FILE__)))).$cformsSettings['global']['cforms_IIS'].'cforms-custom'.$cformsSettings['global']['cforms_IIS'].'my-functions.php'; $CFfunctions = dirname(dirname(dirname(__FILE__))).$cformsSettings['global']['cforms_IIS'].'my-functions.php'; if ( file_exists($CFfunctionsC) ) include_once($CFfunctionsC); else if ( file_exists($CFfunctions) ) include_once($CFfunctions); ### get form names for ($i=1; $i'')?$_POST['sortby']:'sub_id'; $sortOrder = ($_POST['sortorder']<>'')?substr($_POST['sortorder'],1):'desc'; $qtype = $_POST['qtype']; $query = $_POST['query']; ### get form id from name $query = str_replace('*','',$query); $form_ids = false; if ( $qtype == 'form_id' && $query <> '' ){ $forms = $cformsSettings['global']['cforms_formcount']; for ($i=0;$i'' ) $where = \"AND $qtype LIKE '$querystr'\"; else $where = ''; if ($showIDs<>'') { if ( $showIDs<>'all' ) $in_list = 'AND sub_id in ('.substr($showIDs,0,-1).')'; else $in_list = ''; $sql=\"SELECT *, form_id, ip FROM {$wpdb->cformsdata},{$wpdb->cformssubmissions} WHERE sub_id=id $in_list $where ORDER BY $sortBy $sortOrder, f_id\"; $entries = $wpdb->get_results($sql); ?>

$entry->sub_id ){ if( $sub_id<>'' ) echo '

'; $sub_id = $entry->sub_id; $date = mysql2date(get_option('date_format'), $entry->sub_date); $time = mysql2date(get_option('time_format'), $entry->sub_date); echo '

'. '' . '' . '' . \"
'.__('Form:','cforms').' '. stripslashes($cformsSettings['form'.$entry->form_id]['cforms'.$entry->form_id.'_fname']) . ' (ID:' . $entry->sub_id . ') ' . $time.'   '.$date. '   '.__('Delete this entry', 'cforms').'  

\\n\"; } $name = $entry->field_name==''?'':stripslashes($entry->field_name); $val = $entry->field_val ==''?'':stripslashes($entry->field_val); if (strpos($name,'[*')!==false) { // attachments? preg_match('/.*\\[\\*(.*)\\]$/i',$name,$r); $no = $r[1]==''?$entry->form_id:($r[1]==1?'':$r[1]); $temp = explode( '$#$',stripslashes(htmlspecialchars($cformsSettings['form'.$no]['cforms'.$no.'_upload_dir'])) ); $fileuploaddir = $temp[0]; $fileuploaddirurl = $temp[1]; $subID = ($cformsSettings['form'.$no]['cforms'.$no.'_noid'])?'':$entry->sub_id.'-'; if ( $fileuploaddirurl=='' ) $fileurl = $cformsSettings['global']['cforms_root'].substr($fileuploaddir,strpos($fileuploaddir,$cformsSettings['global']['plugindir'])+strlen($cformsSettings['global']['plugindir']),strlen($fileuploaddir)); else $fileurl = $fileuploaddirurl; $passID = ($cformsSettings['form'.$no]['cforms'.$no.'_noid']) ? '':$entry->sub_id; $fileInfoArr = array('name'=>strip_tags($val), 'path'=>$fileurl, 'subID'=>$passID); if ( function_exists('my_cforms_logic') ) $fileInfoArr = my_cforms_logic( $results, $fileInfoArr, 'fileDestinationTrackingPage'); if( ! array_key_exists('modified', $fileInfoArr) ) $fileInfoArr['name'] = $subID . $fileInfoArr['name']; $fileurl = $fileInfoArr['path'] . '/' . $fileInfoArr['name'] . $format; echo '

'; echo substr($name, 0,strpos($name,'[*')); if ( $entry->field_val == '' ) echo '
' . __('-','cforms') . '

' . \"\\n\"; else echo '

' . \"\\n\"; } elseif ($name=='page') { // special field: page echo '

'; _e('Submitted via page', 'cforms'); echo '
' . str_replace(\"\\n\",\"
\", strip_tags($val) ) . '

' . \"\\n\"; echo '

'; _e('IP address', 'cforms'); echo '

' . \"\\n\"; } elseif ( strpos($name,'Fieldset')!==false ) { if ( strpos($name,'FieldsetEnd')===false ) echo '

 
' . strip_tags($val) . '

' . \"\\n\"; } else { echo '

' . $name . '

' . '

' . str_replace(\"\\n\",\"
\", strip_tags($val) ) . '

' . \"\\n\"; } } echo ''; else : ?>

When I click on download I get this error:

cformssubmissions = $wpdb->prefix . 'cformssubmissions'; $wpdb->cformsdata = $wpdb->prefix . 'cformsdata'; ### new global settings container, will eventually be the only one! $cformsSettings = get_option('cforms_settings'); ### get custom functions $CFfunctionsC = dirname(dirname(dirname(dirname(__FILE__)))).$cformsSettings['global']['cforms_IIS'].'cforms-custom'.$cformsSettings['global']['cforms_IIS'].'my-functions.php'; $CFfunctions = dirname(dirname(dirname(__FILE__))).$cformsSettings['global']['cforms_IIS'].'my-functions.php'; if ( file_exists($CFfunctionsC) ) include_once($CFfunctionsC); else if ( file_exists($CFfunctions) ) include_once($CFfunctions); ### get form names for ($i=1; $i '' ){ $forms = $cformsSettings['global']['cforms_formcount']; for ($i=0;$i'' ) $where = \"AND $qtype LIKE '$querystr'\"; else $where = ''; if ( !$sortBy || $sortBy=='undefined' ) $sortBy = 'id'; if ( !$sortOrder || $sortOrder=='undefined' ) $sortOrder = 'desc'; if ($sub_ids<>'') { $in_list = ($sub_ids<>'all')?'AND id in ('.substr($sub_ids,0,-1).')':''; $count = $wpdb->get_var(\"SELECT COUNT(id) FROM {$wpdb->cformssubmissions} WHERE TRUE $where $in_list\"); if( !is_writable($tempfile) ){ $err = sprintf( __('File (data.tmp) in %s not writable! %sPlease adjust its file permissions/ownership!','cforms'),\"\\r\\n\\r\\n —> 

\".dirname(__FILE__).\"\\r\\n\\r\\n\",\"\\r\\n\\r\\n\"); header(\"Pragma: public\"); header(\"Expires: 0\"); header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\"); header(\"Content-Type: application/force-download\"); header(\"Content-Type: text/download\"); header(\"Content-Type: text/txt\"); header(\"Content-Disposition: attachment; filename=\\\"error.txt\\\"\"); header(\"Content-Transfer-Encoding: binary\"); header(\"Content-Length: \" .(string)(strlen($err)) ); echo $err; die(); } $temp = fopen($tempfile, \"w\"); ### UTF8 header if ( $charset=='utf-8' ) fwrite($temp, pack(\"CCC\",0xef,0xbb,0xbf)); switch ( $format ){ case 'xml': getXML(); break; case 'csv': getCSVTAB('csv'); break; case 'tab': getCSVTAB('tab'); break; } fclose($temp); header(\"Pragma: public\"); header(\"Expires: 0\"); header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\"); header(\"Content-Type: application/force-download\"); header(\"Content-Type: text/download\"); header(\"Content-Type: text/$format\"); header(\"Content-Disposition: attachment; filename=\\\"formdata.\" . $format . \"\\\"\"); header(\"Content-Transfer-Encoding: binary\"); header(\"Content-Length: \" .(string)(filesize($tempfile)) ); ob_clean(); flush(); readfile( $tempfile ); $temp = fopen($tempfile, \"w\"); fclose($temp); exit(); } function getCSVTAB($format='csv'){ global $fnames, $wpdb, $count, $temp, $where, $in_list, $sortBy, $sortOrder, $cformsSettings, $charset; $results = $wpdb->get_results( \"SELECT ip, id, sub_date, form_id, field_name,field_val FROM {$wpdb->cformsdata},{$wpdb->cformssubmissions} WHERE sub_id=id $where $in_list ORDER BY $sortBy $sortOrder, f_id ASC\" ); /* mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); @mysql_select_db(DB_NAME) or die( \"Unable to select database\"); $sql = \"SELECT ip, id, sub_date, form_id, field_name,field_val FROM {$wpdb->cformsdata},{$wpdb->cformssubmissions} WHERE sub_id=id $where $in_list ORDER BY $sortBy $sortOrder, f_id ASC\"; $r = mysql_query($sql); */ $br=\"\\n\"; $buffer=array(); $body=''; $sub_id=''; $format = ($format==\"csv\")?\",\":\"\\t\"; $ipTab = ($_GET['addip']=='true'?$format:''); $head = ($_GET['header']=='true')?$format . $format . $ipTab:''; $last_n = ''; foreach( $results as $key => $entry ) { ### while( $entry = mysql_fetch_array($r) ){ if ( $entry->field_name=='page' || strpos($entry->field_name,'Fieldset')!==false ) continue; $next_n = ( $entry->form_id=='' )?'1':$entry->form_id; if( $sub_id<>$entry->id ){ ### new record starts if ( $buffer[body]<>'' ){ if( $_GET['header']=='true' && $buffer[last_n]<>$buffer[last2_n]) fwrite($temp, $buffer[head] . $br . $buffer[body] . $br); else fwrite($temp, $buffer[body] . $br); } $buffer[body] = $body; ### save 1 line $buffer[head] = $head; ### save 1 line $buffer[last2_n]= $buffer[last_n]; $buffer[last_n] = $last_n; $body = '\"'.__('Form','cforms').': ' . encData($fnames[$next_n]). '\"'. $format .'\"'. encData($entry->sub_date) .'\"' . $format . ($_GET['addip']=='true'?$entry->ip.$format:''); $head = ($_GET['header']=='true')?$format . $format . $ipTab:''; $last_n = $next_n; $sub_id = $entry->id; } $url=''; $urlTab=''; if( $_GET['addurl']=='true' && strpos($entry->field_name,'[*') ){ preg_match('/.*\\[\\*(.*)\\]$/i',$entry->field_name,$t); $no = $t[1]==''?$entry->form_id:($t[1]==1?'':$t[1]); $urlTab = $format; $entry->field_name = substr($entry->field_name,0,strpos($entry->field_name,'[*')); $t = explode( '$#$',stripslashes(htmlspecialchars($cformsSettings['form'.$no]['cforms'.$no.'_upload_dir'])) ); $fdir = $t[0]; $fdirURL = $t[1]; $subID = $cformsSettings['form'.$no]['cforms'.$no.'_noid'] ? '' : $entry->id.'-'; if ( $fdirURL=='' ) $url = $cformsSettings['global']['cforms_root'].substr( $fdir, strpos($fdir,$cformsSettings['global']['plugindir']) + strlen($cformsSettings['global']['plugindir']), strlen($fdir) ); else $url = $fdirURL; $passID = ($cformsSettings['form'.$no]['cforms'.$no.'_noid']) ? '':$entry->id; $fileInfoArr = array('name'=>strip_tags($entry->field_val), 'path'=>$url, 'subID'=>$passID); if ( function_exists('my_cforms_logic') ) $fileInfoArr = my_cforms_logic( $results, $fileInfoArr, 'fileDestinationTrackingPage' ); if( ! array_key_exists('modified', $fileInfoArr) ) $fileInfoArr['name'] = $subID . $fileInfoArr['name']; $url = $fileInfoArr['path'] . '/' . $fileInfoArr['name'] . $format; } $head .= ($_GET['header']=='true')?'\"'.encData(stripslashes($entry->field_name)).'\"' . $format . $urlTab:''; $body .= '\"' . str_replace('\"','\"\"', encData(stripslashes($entry->field_val))) . '\"' . $format . $url; } ### foreach ### clean up buffer if ( $buffer[body]<>'' ){ if( $_GET['header']=='true' && $buffer[last_n]<>$buffer[last2_n]) fwrite($temp, $buffer[head] . $br . $buffer[body] . $br); else fwrite($temp, $buffer[body] . $br); } ### clean up last body if( $_GET['header']=='true' && $buffer[last_n]<>$next_n) fwrite($temp, $head . $br . $body . $br); else fwrite($temp, $body . $br); /* mysql_free_result($r); mysql_close(); */ return; } function getXML(){ global $fnames, $wpdb, $count, $temp, $where, $in_list, $sortBy, $sortOrder, $cformsSettings, $charset; if( $charset=='utf-8' ) fwrite($temp, \"\\n\\n\"); else fwrite($temp, \"\\n\\n\"); $results = $wpdb->get_results( \"SELECT ip, id, sub_date, form_id, field_name,field_val FROM {$wpdb->cformsdata},{$wpdb->cformssubmissions} WHERE sub_id=id $where $in_list ORDER BY $sortBy $sortOrder, f_id ASC\" //,\"ARRAY_A\" ); // echo '
'.print_r($results,1).'

'; /* mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); @mysql_select_db(DB_NAME) or die( \"Unable to select database\"); $sql = \"SELECT ip, id, sub_date, form_id, field_name,field_val FROM {$wpdb->cformsdata},{$wpdb->cformssubmissions} WHERE sub_id=id $where $in_list ORDER BY $sortBy $sortOrder, f_id ASC\"; $r = mysql_query($sql); */ // $sub_id =''; foreach( $results as $key => $entry ) { ### while( $entry = mysql_fetch_array($r) ){ if ( $entry->field_name=='page' || strpos($entry->field_name,'Fieldset')!==false ) continue; //echo '
'.\"$key =>\".print_r($entry,1).'

'; $n = ( $entry->form_id=='' )?'1':$entry->form_id; if( $sub_id<>$entry->id ){ if ( $sub_id<>'' ) fwrite($temp, \"\\n\"); fwrite($temp, '\\n\"); $sub_id = $entry->id; } fwrite($temp, 'field_val) ).']]>'.\"\\n\"); //echo '
'.$entry->field_name.\"=\".$entry->field_val.'

'; } ### while /* mysql_free_result($r); mysql_close(); */ if($sub_id<>'') fwrite($temp, \"\\n\\n\"); return; } function encData ( $d ){ global $charset; $d = str_replace( array('\"',\"\\r\",\"\\n\"), array('\"',\"\",\"\\r\"),$d ); $d = ( $charset=='utf-8' ) ? $d : utf8_decode($d); return $d; } function encDataXML ( $d ){ global $charset; $d = str_replace( array('\"'), array('\"'),$d ); $d = ( $charset=='utf-8' ) ? $d : utf8_decode($d); return $d; } ?>

Any ideas as I use this plugin a lot.

Thanks.

February 5, 2013
12:15 pm
Aruffell
Guest

Anyone?

Thanks,

Andy

February 8, 2013
3:33 pm
Aruffell
Guest

I was going to donate, but if i cant even get support, then what is the point?

February 8, 2013
4:30 pm
MikeM
Guest

Based on your above statement, you weren't planning on donating (wiki) Andy.

You were going to make a payment after receiving free support on top of a free plugin and after evaluating the situation, just like you're doing now.

No worries though it's a pretty often misunderstood concept.

Mike 

February 8, 2013
4:45 pm
Aruffell
Guest

I was going to donate. I even sent a mail in after not getting any support saying that I was happy to donate for a plugin that does what I need.

I'm still happy to do that, but why would I donate for a plugin that doesn't seem as though it's supported any more.

Would you donate to a plugin and then go and find something else and never use that plugin again? I think not.

Andy

February 10, 2013
8:48 am
zeeker
Guest

I think Mike's got a point Andy.

First, if you had read the Forum sticky posts you would have seen that Oliver (for good reasons) stopped providing free, 24x7 Forum support and asked the user community to step up.

Secondly, take a look at the plugin's History.txt file and you'll notice that over the last 6 some years it has been continuously maintained. I do have to add, that I wish Oliver would find the time to issue maintenance releases on a more frequent schedule. :)

Lastly, getting free support seems to be the sole criteria for you to decide whether you make a "donation" or not – a stance which is not only contradicting (just don't call it donation!) but also leads to many fantastic plugin developers having to focus on their day jobs more and more in the first place – think about that one.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)