1. This is regarding my copy of ASPImage v2.x
2. Below is area of my my script page with the corresponding error line number. (I will post the entire script on the first responce to this post)
3. I recieve this error message at upload:
"Microsoft _VBScript runtime error '800a000b'
Division by zero
/admin/ProductsImagesInsert.asp, line 194 "
4. My server's OS is: Windows2000
5. My server's IIS is: IIS5
6. I was initially getting: "Server object error 80040154." until my server company restarted their server for me. Now I get the new, afformention: "Microsoft _VBScript runtime error '800a000b' Division by zero /admin/ProductsImagesInsert.asp, line 194"
7. I have narrowed this down to being an error in creating or writing my different sized versions of the uploaded image and associated scripted name/nomenclature as from my ProductsImagesInsert.asp page because:
A. My image uploader records the uploaded Image ID, File Source Path, File Short Name wich includes the Image ID, and the Bytes Uploaded. The origional file is then uploaded to my ProductImages folder under the name of Work+Image ID#.jpg
B. The script worked on the last project I worked on (but on a different server). When it worked it wrote several different sized versions of the images and named them for example: Zoom"& ImageID & ".jpg" or Gallery"& ImageID & ".jpg"
C. It creates an image ID that is associated with the product information that is added to the database just prior to the second part of the multi-part form then allowing for the uploading of the associated product image. I can see that they are associated correctly when I go to edit the products image record as it show there the Product and associated image ID together.
D. I just spoke with my server host and made sure that I had write permissions for my Product Images folder. (although if you suspect it still might be that I would gladly check again.
8. I have attempted to un-comment out the variables Image.MaxX and Image.MaxY as they are both commented out so they have no value assigned them and I hoped mabee this woud do so. This script had functioned, however, with the script as is(with adresses changed) on another server. Unfortunatly when I uncomment out lines 87-92 it just moves the same error to line 206(the same line of code pretty much: Image.ResizeR intXSize, (intXSize / Image.MaxX) * Image.MaxY If I comment that section it just moves the error down to the next sabe line of code in the next section.
9. PLEASE, if you can not help could you be so kind as to inform as such. Any assistance would be greatly appreciated!
This is the script area I get the error message:
187' strMessage = "Steve's Widget Factory" & vbCrLf & "123 Park Avenue" & _
188' VbCrLf & "Anytown, USA 012345"
189
190' Image.MaxX = Image.TextWidth (strMessage)
191' Image.MaxY = Image.TextHeight (strMessage)
192
193
194 Image.ResizeR intXSize, (intXSize / Image.MaxX) * Image.MaxY
195 Image.FileName = "D:\Inetpub\wwwroot\woodstockearth\ProductImages\Zoom"& ImageID & ".jpg"
196 Image.SaveImage
197' Response.Write "<CENTER>" & Image.FileName & "
"
198 Set Image = nothing
2. Below is area of my my script page with the corresponding error line number. (I will post the entire script on the first responce to this post)
3. I recieve this error message at upload:
"Microsoft _VBScript runtime error '800a000b'
Division by zero
/admin/ProductsImagesInsert.asp, line 194 "
4. My server's OS is: Windows2000
5. My server's IIS is: IIS5
6. I was initially getting: "Server object error 80040154." until my server company restarted their server for me. Now I get the new, afformention: "Microsoft _VBScript runtime error '800a000b' Division by zero /admin/ProductsImagesInsert.asp, line 194"
7. I have narrowed this down to being an error in creating or writing my different sized versions of the uploaded image and associated scripted name/nomenclature as from my ProductsImagesInsert.asp page because:
A. My image uploader records the uploaded Image ID, File Source Path, File Short Name wich includes the Image ID, and the Bytes Uploaded. The origional file is then uploaded to my ProductImages folder under the name of Work+Image ID#.jpg
B. The script worked on the last project I worked on (but on a different server). When it worked it wrote several different sized versions of the images and named them for example: Zoom"& ImageID & ".jpg" or Gallery"& ImageID & ".jpg"
C. It creates an image ID that is associated with the product information that is added to the database just prior to the second part of the multi-part form then allowing for the uploading of the associated product image. I can see that they are associated correctly when I go to edit the products image record as it show there the Product and associated image ID together.
D. I just spoke with my server host and made sure that I had write permissions for my Product Images folder. (although if you suspect it still might be that I would gladly check again.
8. I have attempted to un-comment out the variables Image.MaxX and Image.MaxY as they are both commented out so they have no value assigned them and I hoped mabee this woud do so. This script had functioned, however, with the script as is(with adresses changed) on another server. Unfortunatly when I uncomment out lines 87-92 it just moves the same error to line 206(the same line of code pretty much: Image.ResizeR intXSize, (intXSize / Image.MaxX) * Image.MaxY If I comment that section it just moves the error down to the next sabe line of code in the next section.
9. PLEASE, if you can not help could you be so kind as to inform as such. Any assistance would be greatly appreciated!
This is the script area I get the error message:
187' strMessage = "Steve's Widget Factory" & vbCrLf & "123 Park Avenue" & _
188' VbCrLf & "Anytown, USA 012345"
189
190' Image.MaxX = Image.TextWidth (strMessage)
191' Image.MaxY = Image.TextHeight (strMessage)
192
193
194 Image.ResizeR intXSize, (intXSize / Image.MaxX) * Image.MaxY
195 Image.FileName = "D:\Inetpub\wwwroot\woodstockearth\ProductImages\Zoom"& ImageID & ".jpg"
196 Image.SaveImage
197' Response.Write "<CENTER>" & Image.FileName & "
"
198 Set Image = nothing