Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Image upload issues (empty DB BLOB field)

Locked
vnbuser
Posts: 11
Joined: Wed Sep 26, 2012 2:29 pm

Image upload issues (empty DB BLOB field)

Unread post 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
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Image upload issues (empty DB BLOB field)

Unread post by admin »

Joe,

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

Steven
vnbuser
Posts: 11
Joined: Wed Sep 26, 2012 2:29 pm

Re: Image upload issues (empty DB BLOB field)

Unread post 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?
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Image upload issues (empty DB BLOB field)

Unread post by admin »

vnbuser,

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

Steven
vnbuser
Posts: 11
Joined: Wed Sep 26, 2012 2:29 pm

Re: Image upload issues (empty DB BLOB field)

Unread post by vnbuser »

Steven,

I'm using linux / apache.

Regards,
Joe
vnbuser
Posts: 11
Joined: Wed Sep 26, 2012 2:29 pm

Re: Image upload issues (empty DB BLOB field)

Unread post 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
vnbuser
Posts: 11
Joined: Wed Sep 26, 2012 2:29 pm

Re: Image upload issues (empty DB BLOB field)

Unread post 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
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Image upload issues (empty DB BLOB field)

Unread post by admin »

Thanks Joe.
Locked