The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/showthread.php 26 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/showthread.php 137 forum_permissions
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1533) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 79 errorHandler->error
/showthread.php 1533 eval



FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File upload does not work
#1
Hello. I was sure to select YES to upload field in step 2. I used the API method. The form submits but to file in uploads folder. No error messages. I DID set my upload field to "field" and set the options.
See attached pic showing all my tabs.
I am working on a php version of the site's existing html page so it is not linking from home but is a direct url until I solve the upload issue.
http://www.premiumprotectivecoatings.com...monial.php
I am sure that the thankyou.php page cleared out the previous session.
Thank you for any help in solving this.
   
   
Reply
#2
Hi Jim,

Sorry you're having trouble!
From the screenshots you posted, I don't see anything misconfigured. Two things to try:

1. did you try the tests on the Settings -> Files tab? There, click on the two buttons next to the File Upload Path and File Upload URL. Click each one. They test that (a) the file upload folder that's specified is valid, and (b) the URL entered maps to the folder.

If that works properly, try this:
2. Create a new blank submission in your form, then in the admin interface, try uploading a file for the field. Does that work?

If that also works, it's a problem with your form. The two likely candidates are:
(a) your <form> tag doesn't include an enctype="multipart/form-data" attribute on the form page,
(b) the params passed to the ft_api_process_form() function isn't being passed the "files" => $_FILES key-value pair.

Let me know how it goes!

- Ben
Reply
#3
1)I checked Settings-> Files Tab and both tests passed. While there I upped the allowable file size to 5 megs (but the images I tried were 124k)

2)I am not totally clear what you mean in step two so I skipped that.

3)(a)I DID NOT have enctype="multipart/form-data" in my <form> tag so I added it.
I did two submissions and both worked. I have two files in my upload folder plus the client email has a link to image. The images changed names but I wonder if that if part of the normal process.
The images became named "files.jpg" and "1_files.jpg"

3(b) I did not have to change this but you mention "files" => $_FILES key-value pair Should I have that in the Form php code at top (see attached image of my php code)
Thanks Ben


Attached Files Thumbnail(s)
   
Reply
#4
Hi Jim,

So you mentioned the submissions are working now? It's all good?

Quote:3(b) I did not have to change this but you mention "files" => $_FILES key-value pair Should I have that in the Form php code at top (see attached image of my php code)

Sorry! My mistake: what you have is correct: I meant "file_data" not "files".

Quote:The images changed names but I wonder if that if part of the normal process.
The images became named "files.jpg" and "1_files.jpg"

Yeah, Form Tools does that automatically to prevent overwriting files with the same name (all files for a field are uploaded to the same folder, so it's careful to rename them in case there's a conflict). It also strips out any characters other than 0-9, a-Z, and _. This is just to ward against problems with weird characters confusing some filesystems.

- Ben

Reply
#5
Yes It is working good. Thank you.
Reply
#6
Hi
I am new to Form Tools but followed the instructions (I think). The upload of my first form was all going so well until step 5 then when I pressed NEXT this happened (in red - I have learned that is never a good colour)

Error:
Failed query in ft_finalize_form, /home/tyct1/public_html/ftools/global/code/forms.php, line 237:

CREATE TABLE frm_form_1 (

submission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,

PRIMARY KEY(submission_id),

col_1 VARCHAR(255),

col_2 VARCHAR(255),

col_3 VARCHAR(255),

col_4 VARCHAR(255),

col_5 VARCHAR(255),

col_6 VARCHAR(255),

col_7 VARCHAR(255),

col_8 VARCHAR(255),

col_9 VARCHAR(255),

col_10 VARCHAR(255),

col_11 VARCHAR(255),

col_12 VARCHAR(255),

col_13 VARCHAR(255),

col_14 VARCHAR(255),

col_15 VARCHAR(255),

col_16 VARCHAR(255),

col_17 VARCHAR(255),

col_18 VARCHAR(255),

col_19 VARCHAR(255),

col_20 VARCHAR(255),

col_21 VARCHAR(255),

col_22 VARCHAR(255),

col_23 VARCHAR(255),

col_24 VARCHAR(255),

col_25 VARCHAR(255),

col_26 VARCHAR(255),

col_27 VARCHAR(255),

col_28 VARCHAR(255),

col_29 VARCHAR(255),

col_30 VARCHAR(255),

col_31 VARCHAR(255),

col_32 VARCHAR(255),

col_33 VARCHAR(255),

col_34 VARCHAR(255),

col_35 VARCHAR(255),

col_36 VARCHAR(255),

col_37 VARCHAR(255),

col_38 VARCHAR(255),

col_39 VARCHAR(255),

col_40 VARCHAR(255),

col_41 VARCHAR(255),

col_42 VARCHAR(255),

col_43 VARCHAR(255),

col_44 VARCHAR(255),

col_45 VARCHAR(255),

col_46 VARCHAR(255),

col_47 VARCHAR(255),

col_48 VARCHAR(255),

col_49 VARCHAR(255),

col_50 VARCHAR(255),

col_51 VARCHAR(255),

col_52 VARCHAR(255),

col_53 VARCHAR(255),

col_54 VARCHAR(255),

col_55 VARCHAR(255),

col_56 VARCHAR(255),

col_57 VARCHAR(255),

col_58 VARCHAR(255),

col_59 VARCHAR(255),

col_60 VARCHAR(255),

col_61 VARCHAR(255),

col_62 VARCHAR(255),

col_63 VARCHAR(255),

col_64 VARCHAR(255),

col_65 VARCHAR(255),

col_66 VARCHAR(255),

col_67 VARCHAR(255),

col_68 VARCHAR(255),

col_69 VARCHAR(255),

col_70 VARCHAR(255),

col_71 VARCHAR(255),

col_72 VARCHAR(255),

col_73 VARCHAR(255),

col_74 VARCHAR(255),

col_75 VARCHAR(255),

col_76 VARCHAR(255),

col_77 VARCHAR(255),

col_78 VARCHAR(255),

col_79 VARCHAR(255),

col_80 VARCHAR(255),

col_81 VARCHAR(255),

col_82 VARCHAR(255),

col_83 VARCHAR(255),

col_84 VARCHAR(255),

col_85 VARCHAR(255),

col_86 VARCHAR(255),

col_87 VARCHAR(255),

col_88 VARCHAR(255),

col_89 VARCHAR(255),

col_90 VARCHAR(255),

col_91 VARCHAR(255),

col_92 VARCHAR(255),

col_93 VARCHAR(255),

col_94 VARCHAR(255),

col_95 VARCHAR(255),

col_96 VARCHAR(255),

col_97 VARCHAR(255),

col_98 VARCHAR(255),

col_99 VARCHAR(255),

col_100 VARCHAR(255),

col_101 VARCHAR(255),

col_102 VARCHAR(255),

col_103 VARCHAR(255),

col_104 VARCHAR(255),

col_105 VARCHAR(255),

col_106 VARCHAR(255),

col_107 VARCHAR(255),

col_108 VARCHAR(255),

col_109 VARCHAR(255),

col_110 VARCHAR(255),

col_111 VARCHAR(255),

col_112 VARCHAR(255),

col_113 VARCHAR(255),

col_114 VARCHAR(255),

col_115 VARCHAR(255),

submission_date DATETIME NOT NULL,

last_modified_date DATETIME NOT NULL,

ip_address VARCHAR(15),

is_finalized ENUM('yes','no') default 'yes')

TYPE=MyISAM DEFAULT CHARSET=utf8

Debug:

Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

Any ideas?

Thanks
Reply
#7
Haha yes, red is a colour you generally want to avoid. Smile

So the problem is best described right at the end: "Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs".

MyISAM tables (the database storage format most commonly used by most MySQL applications, including Form Tools) have a total VARCHAR max size of 65,535 bytes (64K). So for cases where you have a REALLY large tables with a lot of VARCHAR fields, you can run into the limit.

The error handling for this case is very poor, for which I apologize. It's slightly better handled in 2.1.0 (Internal forms automatically adjust the default field size down when it approaches the max), but there can still be problems with External forms. I'll jot this down as a bug and try to slip a fix into an upcoming 2.1.0 build.

But in your case, just change a number of the varchar(255) ("Medium" field size) fields to something smaller or larger, depending on what's appropriate for the field in question. Odd though it may seem, the larger field sizes aren't VARCHAR, they're stored as TEXT/MEDIUMTEXT types which are not included in the total row size. So increasing the size can actually help.

Good luck!

- Ben
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)