Member
Member
klaus   2012-01-10, 19:39
#1

Here is the error:
DSC05812.JPG 143.38 KB Error: SyntaxError: JSON.parse: unexpected character

I am using the RC3 for 1.4.2

PHP 5.2.17
Mysql 5.0.77

This happens with the jquery uploader only
the flash and http work fine

Not sure if this is functioning yet or not or if there is a fix, but thought I would check since this is my preferred method of uploading.

Thanks

Member
Member
sbillard   2012-01-10, 22:20
#2

Probably going to need more details since I am unable to reprocduce the error. Not sure what, though, so as much information as possible.

Member
Member
klaus   2012-01-12, 04:11
#3

Ok, here's what I can give you

Hosted at godaddy
Fresh install of 1.4.2
PHP and MySQL listed above

Uploading the file using the jQuery uploaded (drag and drop or clicking)

I'm trying to upload from a Mac using ltest Firefox

Anything else you need to know to help point in the right direction
I'm going to try the upload on a PC and in different browsers to see if that could be it

Member
Member
sbillard   2012-01-12, 04:21
#4

My tests were on PCs, so I await your next post. The JSON processing does happen on the client, so it could be specific to the MAC.

Member
Member
klaus   2012-01-12, 04:38
#5

OK, two things.

First, on the PC, it I get the confirmation that the file was uploaded (the green acknowledgment) but the file does not appear.

I then used firebug on the mac and got the following Warning:

move_uploaded_file(/public_html/zp-core/admin-jQuery/files/Danger.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /public_html/zp-core/admin-jQuery/uploader.php on line 313
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpF87uuh' to '/public_html/zp-core/admin-jQuery/files/Danger.jpg' in /public_html/zp-core/admin-jQuery/uploader.php on line 313

Fatal error: Call to a member function setOwner() on a non-object in /public_html/zp-core/admin-jQuery/uploader.php on line 317

Danger.jpg is the name of my test file.
Now I noticed it's looking for a "files" folder in the admin-jQuery folder. This doesn't exist so I would guess I also have a path issue possibly.
Does that need to be set somewhere since it's not getting my albums folder??

Member
Member
klaus   2012-01-12, 04:58
#6

I looked at line 78 and 79 of uploader.php. Maybe that has something to do with the problem.

        'upload_dir' => dirname(__FILE__).'/files/',
        'upload_url' => dirname($_SERVER['PHP_SELF']).'/files/',

since that folder doesn't exist anyway

Member
Member
sbillard   2012-01-12, 05:43
#7

What are your file permissions for the admin-jquery folder?

Member
Member
sbillard   2012-01-12, 05:49
#8

Never mind. Lines 78 and 79 are a red herring. The actual folders are set by the class instantiation to point to the album folder where the image is to go.

Member
Member
klaus   2012-01-12, 13:53
#9

This must be a server thing
I updated my PC firefox to the latest and it produces the same error

Also if using Safari on Mac, the error is slightly different in that it says something along the lines of
Error invalid identifier '

Member
Member
klaus   2012-01-12, 16:56
#10

Well, permissions didn't change anything but I tested locally and on a completely separate server and I get the error on all three.

Then I tried using PHP 5.2.13 on local server - error appeared.
Then upgraded to 5.3.2 and no more error.

Just for fun I tested the old uploader in 1.4.1.6 and it works fine with drag and drop files.

So it looks to me (at first glance) that PHP 5.3 may be the minimum requirement to use the jQuery uploader. Anything less seems to cause the error.

Does that sound about right?

Member
Member
klaus   2012-01-12, 18:10
#11

Maybe I spoke too soon.
Test locally it's fine. Updated my server to 5.3.6 but the error still occurs

Although with firebug, the only warning is:

Fatal error: Call to a member function setOwner() on a non-object in /public_html/zp-core/admin-jQuery/uploader.php on line 273

Although now the files actually get uploaded correctly.
Just no confirmation of successful upload.

Member
Member
sbillard   2012-01-12, 19:24
#12

Your error above indicates that there is still something failing in the upload. There should be something in the debug log tracking this--a bad album or image instantiation.

As to the PHP level, it could be a PHP level issue. There is no documentation of any level requirement with the jquery uploader source, though. Still, it could well be a bug in PHP 5.2.13.

Member
Member
klaus   2012-01-13, 01:31
#13

I reset the debug log, ran a test, got the error but nothing shows in the debug.
I'm at a loss.

Member
Member
sbillard   2012-01-13, 02:47
#14

The only thing I can see is that the line numbers for these errors seem to be off from the current nightly build. I did not think there have been changes to the uploader.php file since RC3, but maybe try the nightly build and see what happens.

If you do still get the errors, report back again exactly the errors that show up against the nightly build.

Any chance that the image already exists on disk? If so what are its file permissions?

Member
Member
jackdaw   2012-04-30, 14:55
#15

Perhaps this can be of help, since I get the same error, but only when uploading an image that already exists in the database, at least with the same filename. When I delete the existing image and try again, the jquery upload works fine.

Member
Member
brufferman   2018-04-26, 09:34
#16

I'm having the same problem also. Have tried a reinstall and even set up a new database etc. No joy. It works OK for the first say 10 photos uploaded to the gallery, but any more and it's a no go. I get the same/similar errors with both http and jquery.

Administrator
Administrator
acrylian   2018-04-26, 09:58
#17

Any special chars in the failing images' filename in question maybe?

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.