close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File upload

Thread began 8/18/2014 2:53 pm by rgolab68503 | Last modified 8/22/2014 8:31 am by rgolab68503 | 2874 views | 7 replies |

rgolab68503

File upload

Hi Jason,

Kind of a multiple problem here. I have been struggling with out IT department to change permission on the upload folders to allow for my files to be placed on the server. They kept arguing that the 777 setting is not a "Windows" setting. I'm dealing with that part with them. Needless to say after trying their fixes I have managed to mess my "insert record.php" file to where it doesn't write the names to the designated tables.

To make a long story short I added the error reading code as you asked in a previous site. Below is the error code which I received on this new page which you mentioned that the permissions are not set correctly. Like I said i am trying to get them to change this with a bit of frustration.

First they stated that this code was missing in the form and would fix the issue. enctype="multipart/form-data" and they tested it and say it worked. If i add this code in the form then nothing happens and it doesn't write to the database at all.

If i don't have this code in place then it writes to the database except for renaming the file names to the "AdPicture" text field and writes nothing to the database. Any ideas on why it would not pick up on that name? Is it because the file upload is failing? I believe i have bound default file name to the "AdPicture" hidden text file correctly but did i miss something?

Any help would be very much appreciated.

BTW, when I add the text ... enctype="multipart/form-data" to the form, I get no error message but then again it doesn't write to the database at all.


error code -

INSERT INTO `admatdetails` (`AdProdCode`,`ProductLocation`,`OrderT`,`Ttype`,`Tlanguage`,`Colour`,`AdDesription`,`coop`,`Tname`,`TDesription`,`TdescriptionFR`,`AdPicture`,`AdJPG`,`ADPDF`,`ADZIP`,`published`) VALUES ('test-1-5','','1','G','E','C','A','90','test-1-5 Name','test-1-5 E','test-1-5 F','test-1-5','','','','Y')


( ! ) Notice: Undefined variable: FILES in C:\wamp\www\toyo_dev\Admaterials\admatdetails_insert.php on line 596
Call Stack
# Time Memory Function Location
1 0.0002 369048 {main}( ) ..\admatdetails_insert.php:0

null
Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
WA_UploadResult1_2:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
WA_UploadResult1_3:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
WA_UploadResult1_4:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
Status object: WA_UploadResult3
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult3_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
Status object: WA_UploadResult4
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult4_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded

Sign in to reply to this post

rgolab68503

Server file size

Hi Jason,

After all the fiddling around it ends up being the file size allowed for uploads that was making the file crap out. Everything seems to be working now. Hopefully! :)

Sign in to reply to this post

Jason ByrnesWebAssist

the encoding type attribute:
enctype="multipart/form-data"

is needed in the form tag, without that there is no way for file upload to work at all.

If that is causing the insert to fail altogether, I Would suspect the size of the files you are uploading, it may be that your uploaded files size is exceeding the max_input_size setting on the server or another of the max form settings,

Sign in to reply to this post

rgolab68503

Hi Jason,

Thanks for that. We changed the file to include the line, we have the size limit changed to 60 megs but received a timeout message. We raised the time limit to 600 and it seems to go to 100% but we still get this message:


( ! ) Fatal error: Maximum execution time of 600 seconds exceeded in C:\wamp\www\toyo_dev\Admaterials\admatdetails_insert.php on line 1
Call Stack
# Time Memory Function Location
1 0.0003 370416 {main}( ) ..\admatdetails_insert.php:0

Now I watch the progress of the upload percentage at the bottom of the page and timed it ... after about 45 seconds (files are about 35 megs in total) it reaches the 100% mark (or says 99% ... then waiting for server ...) and then the error message above comes up. Do you have any ideas on what else could be causing this?

As always, your help in this would be appreciated.

"addition"
BTW, I have error logging on and it doesn't write any errors except for the time out error above.

Sign in to reply to this post

Jason ByrnesWebAssist

the max execution time for scripts is set to 600 seconds, and it is taking longer than that to upload the file.

add the following at line 1:
<?php set_time_limit(0); ?>

to remove a time limit for execution.

Sign in to reply to this post

rgolab68503

Thanks jason, I tried this and received the same error.


( ! ) Fatal error: Maximum execution time of 600 seconds exceeded in C:\wamp\www\toyo_dev\Admaterials\admatdetails_insert.php on line 1
Call Stack
# Time Memory Function Location
1 0.0002 370416 {main}( ) ..\admatdetails_insert.php:0

I tested a few other files and seem to be OK up to about 15 megs. This actual test of files I would have uploaded are close to 38 megs. Just wondering if the size is interfering with the upload even though it is set to 60megs.

Sign in to reply to this post

Jason ByrnesWebAssist

The problem is the execution time, in other words, the time it takes to upload the file, even though you have it set to allow up to 60 megs, you may not be able to deliver those 60 megs in the time allowed.

With the set time limit:
<?php set_time_limit(0); ?>

that should over ride the max execution time setting, but you are still getting the same error and the same report of the execution time being set to 600. this would mean the host has a setting in place preventing you from over riding the execution time. you will need to work with them to have the execution time increased.

Sign in to reply to this post

rgolab68503

Thanks Jason,

They did find another setting on the server that was defaulted to 60 seconds. Expanded that time limit and now it works!

Have a great day!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...