String index out of range: -6

Ask a Question related to Coldfusion Security, Design and Development.

  1. #1

    Default String index out of range: -6

    I have a form that allows people to upload files to the server. Details about
    the users are stored to a database as is the location of their uploads on the
    CF server. The files themselves are stored as shown below. Each time I try to
    upload, however, I get the following message: String index out of range: -6.
    This is from the uploadaction page: <cfinsert datasource = 'pre_reg_info'
    tablename = 'upload_table' formfields = ''> <cffile action='upload'
    filefield='Form.file_upload' destination='D:\inetpub\ictmt7\uploads'
    accept='application/msword,application/pdf,application/vnd.ms-powerpoint,text/pl
    ain'> This from the uploadfileForm If I change the directory seting it simply
    changes the number at the end of the error alert. I've looked all over the
    internet for an answer but there is nothing specific to ColdFusion. Can anyone
    help me here?

    colesc8 Guest

  2. Similar Questions and Discussions

    1. String Index Out of Range: -2
      I have created a form that generates an error when i post it live and try to submit it. The action page generates an error that says: string index...
    2. STRING INDEX OUT OF RANGE: -12
      I am using a form to upload images into the images folder. Tha path to the image it is stored into the database. all works fine on my pc using...
    3. string index out of range: 0
      I cant see why I am getting this. I am passing some vars from one page to another and would only like to display the variable if it is defined. Here...
    4. String index out of range: -16
      I am using the CFFILE shown below to try and upload a PDF file. I get the error: String index out of range: -16 Am running CFMX 6.1 on a WIN2000...
    5. String Index Out of Range Error on String ComparisonQuery
      I am running CFMX 6.1 on Linux connecting to a PostgreSQL database server. I am performing a simple SELECT * where somestring = thisstring When I...
  3. #2

    Default String index out of range: -6

    I have a form that allows people to upload files to the server. Details about
    the users are stored to a database as is the location of their uploads on the
    CF server. The files themselves are stored as shown below. Each time I try to
    upload, however, I get the following message: String index out of range: -6.
    This is from the uploadaction page: <cfinsert datasource = 'pre_reg_info'
    tablename = 'upload_table' formfields = ''> <cffile action='upload'
    filefield='Form.file_upload' destination='D:\inetpub\ictmt7\uploads'
    accept='application/msword,application/pdf,application/vnd.ms-powerpoint,text/pl
    ain'> This from the uploadfileForm If I change the directory seting it simply
    changes the number at the end of the error alert. I've looked all over the
    internet for an answer but there is nothing specific to ColdFusion. Can anyone
    help me here?

    colesc8 Guest

  4. #3

    Default Re: String index out of range: -6

    Apologies: meant to add this from the uploadfileFOrm: <cfif upload NEQ ''>
    <cffile action='upload' filefield='upload' destination='C:\temp'
    nameconflict='makeunique'> <cfset upload_file= #file.ServerFile#>

    colesc8 Guest

  5. #4

    Default Re: String index out of range: -6

    Apologies: meant to add this code from the uploadfileForm: <cfif upload NEQ ''>
    <cffile action='upload' filefield='upload' destination='C:\temp'
    nameconflict='makeunique'> <cfset upload_file= #file.ServerFile#>

    colesc8 Guest

  6. #5

    Default Re: String index out of range: -6

    Just as a point of interest, the solution to this as I have since discovered is
    to write the correct path to the CFserver. Unless the path to the server is
    exactly right it will throw up the string index error. Colin

    colesc8 Guest

  7. #6

    Default Re: String index out of range: -6

    Just as a point of interest, the solution to this as I have since discovered is
    to write the correct path to the CFserver. Unless the path to the server is
    exactly right it will throw up the string index error. Colin

    colesc8 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139