I've got this mod in use in my forums and it works well
However I need to use it in a slightly different way for part of our forum so thought it would be a nice simple idea to duplicate the files and change their names slightly to keep the original files as they were, and then to have the second renamed set which I can then customise for the new purpose - it should be easy enough I thought.
The problem is when a link is clicked to bring up the renamed 'pop_upload_new.asp' - it displays correctly. However when the form entry is then sent to the renamed 'outputFile.asp' it results in a HTTP500 error.
All three files in the mod have been renamed as such:
pop_upload_new.asp to pop_upload_new_ads.asp outputFile.asp to outputFile_ads.asp upload.asp to upload_ads.asp
There was one reference to the outputFile.asp file in the pop_upload_new_ads.asp file which I have changed to outputFile_ads.asp
There was one reference to uploads.asp in outputFile_ads.asp which I changed to uploads_ads.asp
and one reference to pop_upload_new.asp in outputFile_ads.asp which I have changed to pop_upload_new_ads.asp
All in all I cannot see why it should not work and yet if I use the files in their original names it does work, so it has to be something connected to the file name change, doesn't it?
I've double checked all the permissions for the 'uploaded' folder, it is the same folder that I am using to upload to with the first (original) lot of files
I've just run the files through Firefox and it resulted in this error:
Microsoft VBScript runtime error '800a004c'
Path not found
/forum/outputFile_ads.asp, line 57
Lines 55,56 & 57 read in outputFile_ads.asp:
55 'Create and Write to a File 56 pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14 57 Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd) & SUBFOLDER & "\" & filename)
..which are identical to the original outputFile.asp file and using the original files it works
I tried swapping the Form Action to point to the original outputFile.asp file and it works then, however simply adding a '2' to the end of the original file name (ie outputFile2.asp) and changing the Form Action to outputFile2.asp causes the above problem..
I cannot see any other reference to the original file name in either the outputFile.asp file or the upload.asp file, so once again am baffled
The len statement specifies the LENgth of the string (in this case, the file path). When you added the "_ads" to the file names, you made the string 4 characters longer.