Page 1 of 1

Image upload issues (empty DB BLOB field)

Posted: Thu Mar 06, 2014 4:47 pm
by vnbuser
Hi all,

I am using nuBuilder 2.x for a couple of projects for a couple of years and love it!
Excited about 3.0, I installed it and tried to make it my own. When trying to upload images I encounter a problem.

Upload looks fine but the DB field with the image data is empty. No error is shown and the debug info looks good as well.

Code: Select all

Array
(
    [userfile] => Array
        (
            [name] => IMG_1485.JPG
            [type] => image/jpeg
            [tmp_name] => /tmp/phpyXUvxF
            [error] => 0
            [size] => 4165498
        )

)
Any pointers?

Regards,

Joe

Re: Image upload issues (empty DB BLOB field)

Posted: Thu Mar 06, 2014 11:50 pm
by admin
Joe,

Have you the latest updates from github and run nuinstall.php?

Steven

Re: Image upload issues (empty DB BLOB field)

Posted: Fri Mar 07, 2014 2:49 pm
by vnbuser
Hi Steven,

I did. To be sure I did it again. It seems like the file is not uploaded to the /tmp folder.
As far is I understand it, It should be in the folder before hitting 'save' right? Permissions for the folder seem ok.
Any ideas?

Kind regards,

Joe

P.S.:Unlikely that it is related but perhaps it's worth mentioning that I have this http://forums.nubuilder.cloud/viewtopic.php?f=17&t=8357 issue?

Re: Image upload issues (empty DB BLOB field)

Posted: Sat Mar 08, 2014 3:25 am
by admin
vnbuser,

I don't know. Are you using windows or linux?

Steven

Re: Image upload issues (empty DB BLOB field)

Posted: Mon Mar 10, 2014 10:30 am
by vnbuser
Steven,

I'm using linux / apache.

Regards,
Joe

Re: Image upload issues (empty DB BLOB field)

Posted: Mon Mar 10, 2014 11:33 am
by vnbuser
Steven,

First of all I have to admit that I'm an idiot. I thought I had 'magic quotes' deactivated through .htaccess but I forgot that with my webhost I have to do it with php.ini.
With magic quotes turned off It works.

Having said that.... Now I can upload the image file. Upon pressing 'save' I get a JSON parse error popup. However, leaving the screen I can see that the image is saved successfully in the DB. So there appears to be some bug there.

Edit: I receive the 'Requested JSON parse failed.' with every submit. I'll create a different topic.

Kind regards,

Joe

Re: Image upload issues (empty DB BLOB field)

Posted: Wed Mar 26, 2014 5:46 pm
by vnbuser
Steven and all,

I discovered the source of my issues. First: my webhost defaults to PHP 5.2x which caused issue with escaping quotes. Manually switching to PHP 5.5 fixed the issue.

The JSON parse errors are caused by foreign key constraints in the DB. My create script put them in. Nubuilder 2.x didn't like them and, apparently Pro doesn't either.

Thanks again for this great product,

Joe

Re: Image upload issues (empty DB BLOB field)

Posted: Thu Mar 27, 2014 12:55 am
by admin
Thanks Joe.