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
Comments
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
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 <b>/public_html/zp-core/admin-jQuery/uploader.php</b> on line <b>313</b>
<b>Warning</b>: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpF87uuh' to '/public_html/zp-core/admin-jQuery/files/Danger.jpg' in <b>/public_html/zp-core/admin-jQuery/uploader.php</b> on line <b>313</b>
<b>Fatal error</b>: Call to a member function setOwner() on a non-object in <b>/public_html/zp-core/admin-jQuery/uploader.php</b> on line <b>317</b>
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??
'upload_dir' => dirname(__FILE__).'/files/',
'upload_url' => dirname($_SERVER['PHP_SELF']).'/files/',
since that folder doesn't exist anyway
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 '<'
Next I'll try changing all permissions on the folders to see if that makes a difference
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?
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.
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.
I'm at a loss.
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?
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.
Any special chars in the failing images' filename in question maybe?