close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Upload PDF to MySQL LONGBLOB size issue

Thread began 7/25/2018 2:37 pm by anonymous | Last modified 11/13/2018 10:29 am by Ray Borduin | 90 views | 10 replies |

anonymous

Upload PDF to MySQL LONGBLOB size issue

I have conferred with our server guy. The PHP ini is set to allow 256M file size. Our MySQL field is LONG BLOB.

We still cannot upload a file over 1MB. The files are licenses and contracts, and I specifically want them inside the database. If the file is over 1MB, the form submits, the page refreshes but data field is empty. No errors. If the file is under 1MB, the form submits, the page refreshes and the data field has the file in it which we can retrieve.

Its a real PIA.

The file is chosen through regular html form and the update query is via WebAssist MySQLi update query function. Is there anything in WebAssist that sets file size permissions for the transaction? Is this something that is set in MySQL?

Sign in to reply to this post

Ray BorduinWebAssist

Can I see your php.ini settings? Create a page with

<?php
phpinfo();
?>

And then send me a link to it.

Have you considered uploading the files to a folder and then storing the folder location in the database instead of the actual file.

It might be a good test to try uploading a file to a folder to determine if the restriction is coming from the file upload or the database.

Sign in to reply to this post

anonymous

Blob issue, php info

Attachment. Sorry took so long to respond.

Sign in to reply to this post

anonymous

I've created a form for file upload and used the server behaviours to upload the file to a directory, but it doesn't work and gives no errors.

Sign in to reply to this post

Ray BorduinWebAssist

Did you set the form enctype="multipart/form-data"? Does the upload folder have read/write permissions? Those are the most common issues. If you attach a copy of the page I might be able to look and see a problem.

Sign in to reply to this post

anonymous

added enctype to script. had our IT ppl correct the read/write permissions. It it now uploads without a problem. I tried a 1mb and a 5mb file. No errors.

However this is not what I wish to do. I wish to store legal documents and storing online in a directory is not an option.

Sign in to reply to this post

Ray BorduinWebAssist

What I like to do in cases like this is to save the files in a directory above the web root. That way they are completely inaccessible from the outside world. Then you can use our file download to allow them to be downloaded by logged in users that you have verified have access.

You could also save the file into a BLOB field in your database, but I don't think that is any more secure, and databases are notoriously inefficient when it comes to file storage.

Sign in to reply to this post

anonymous

I am trying to save as BLOB. Directory storage is not an option. Efficiency is not a concern.

I added this line to each form that requires an upload

<input type="hidden" name="MAX_FILE_SIZE" value="20000000">

and it now works up to 20mb.

Sign in to reply to this post

Ray BorduinWebAssist

That is odd... that shouldn't have any effect.... maybe that is something your hosting provider has put into place. A hidden form element wouldn't normally effect the file upload size. That parameter would usually have to be set in the php.ini file.

Sign in to reply to this post

anonymous

It seems like a default HTML setting?

Sign in to reply to this post
loading

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...