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

UE4 File upload doesnt upload or write to database

Thread began 10/21/2010 6:08 am by Suggs | Last modified 10/22/2010 9:51 am by Jason Byrnes | 1341 views | 8 replies |

Suggs

UE4 File upload doesnt upload or write to database

Hi Folks,

Can you help.
Im getting the following error when uploading an image from the update page.

session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/bakerbed/public_html/development/admin/range_Update.php:1) in /home/bakerbed/public_html/development/webassist/file_manipulation/helperphp.php on line 70

The image doesnt get uploaded, nor does it write the image name to the database.
ive gone through and done the normal, making sure theres no gaps between opening and closing php's etc and still it doesnt write.

If i remove the file upload facility and return the hidden text box to normal and type anything into it, it writes this value to the database without problems.

Cheers

Paul

Sign in to reply to this post

Jason ByrnesWebAssist

most likely the include file is being included using the virtual() function instead of the require_once() function.

The virtual() function has a bug where it will write a carat at the start of the file causing the headers already sent error.

In the Site Settings, on the local info tab, there is a setting for "Create Links Relative To". Choosing "Site" causes Dreamweaver to use the virtual function. Chose "Document" instead, and Dreamweaver will use the require once function and avoid the headers already sent.

another thing to check is that the forms encoding type gets set to multipart/form-data.

If you insert the file field by going to Insert -> Form -> File Field, Dreamweaver will do this for you automatically, if you are just changing the hidden fields type to file manually though, you will also need to manually change the encoding type. do this by electing the form tag, and then in the property inspector, change the enctype dropdown list.

For storing the uplaoded file name in the database, you will need to use the data assist insert record server behavior.

See the "How to apply Digital File Pro to DataAssist Insert and Update pages" tutorial on the DataAssist support page:
dataassist/

Sign in to reply to this post

Suggs

Hi Jason,
The include files are all require once.
Im also using a dataassist generated insert page so the forms enc type is correct as well.
I have used DFP loads of times in projects and now im getting this error in this particular project using UE4

Any further help will be greatly appreciated

Sign in to reply to this post

Jason ByrnesWebAssist

the other cause of the error at line 1 is an issue if the Unicode BOM signature is included in the page.

Go to Modify -> Page Properties

Select the Title and Encoding section.

make sure the Include Unicode Signature (BOM) option is not checked.

You may also need to open the file in an external text editor and select Save As and change the encoding to Western ISO 1

Sign in to reply to this post

Suggs

Hi Jason,
Non of that worked.
The only code on the page is generated by both DataAssist and UE4's file manipulation and HTML Editor.
ive removed HTML editor, UE4 and taken it back to just dataassist and it then works fine and records whatever you put in the text field in the database.
The issue seems to be with UE4

Ive attached it to see if you can identify the issue.

Cheers

Paul

Attached Files
range_Update.zip
Sign in to reply to this post

Jason ByrnesWebAssist

i think the issue may be caused by using the mysql reserved word "range" for your table name.


This is a newer reserved word in mysql 5.5.:
reserved-words.html


when i tried to recreate your page, i got an SQL error message about range being invalid syntax.

try changing line 45:

php:
$query_WADArange = sprintf("SELECT RangeID, RangeName, RangeDescription, RangeSpec, RangeImageLarge, RangeImageThumb, RangeImage3, RangeImage4, RangeCategory FROM range WHERE RangeID = %s", GetSQLValueString($ParamRangeID_WADArange, "int"));




to:

php:
$query_WADArange = sprintf("SELECT RangeID, RangeName, RangeDescription, RangeSpec, RangeImageLarge, RangeImageThumb, RangeImage3, RangeImage4, RangeCategory FROM `range` WHERE RangeID = %s", GetSQLValueString($ParamRangeID_WADArange, "int"));




basicly, where changing "FROM range" to "FROM `range`"

Sign in to reply to this post

Suggs

Hi Jason,

This doesnt work.

Would that reserved mysql word not prevent me from writing anything to the database?
If i take out UE4 file manipulation and return it to a text box and write anything in it, it happily writes to the database, something that isnt happening when i reapply the UE4 file manipulation.

I have used DFP on other projects without any issues whatsoever, however I just cannot seem to understand where the error is laying with UE4 file manipulation incorporation

Cheers

Paul

Sign in to reply to this post

Suggs

Hi Jason

Ive rebuilt the page and ran a new instance of DataAssist and and included UE4 and file manipulation is running fine now,

I appreciate all your help and time.

Cheers

Sign in to reply to this post

Jason ByrnesWebAssist

OK, glad to hear it is working.

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