Hello,
I'm trying to populate a gallery. And although I can do it by FTP, I want to make sure it works via the gallery interface.
So far, I have the following results:
– Uploading a zip file via http works fine, except for lack of feedback.
– Uploading a zip file via flash works fine. It's unfortunate that "zip" is not part of the allowable zip files, but once I select "show all files", I am able to upload a zip file successfully.
– Uploading a zip file via "jQuery" doesn't work. The file is completely uploaded, but then, I get the following error message:
church-building02.zip 50.27 MB
Error: SyntaxError: JSON.parse: unexpected character
(and the garbage can appears at the end of the line,
but nothing happens when I click on it)
– Same problem happens when I load a batch of jpg files... or even individual files
Question: Is it a problem with the jQuery language, my setup... or my own problem? As far as I know, there are no space or accented characters in the file names, whether on my own hard disk or on the server.
Thanks
***************
Paths on the server:
/photos/albums/church-building
(uploaded photos are going in that folder)
File names on my own hard disk:
F:\SITES\SiteWeb_StJames-2011\photos\albums\church-building
File uploaded: church-building02.zip
with file names such as NamesThroughHistory_DSC_6506.jpg
Zenphoto setup
Zenphoto version 1.4.2 [9095] (Official Build)
Current locale setting: en_US.UTF8
Current gallery theme: Zenpage_sja (same problem occurs with Zenpage)
PHP version: 5.2.17
Graphics support: PHP GD library bundled (2.0.34 compatible)
PHP memory limit: 200M (with 80 Mb per file)
Plugins :
Only the standard ones are there. All activated except:
admin-approval
ajaxFilemanager
downloadList
dynamic-locale
email-newuser
federated_logon
GoogleMap
googleVerify
image_effects
jplayer
quota_manager
Rating
register_user
show_not_logged-in
static_html_cache
tweet_news
user-expiry
wordpress_import
xmp_Metadata
Comments
Individual files do seem to work correctly.
This morning, I tested with Firefox 10.0.2 on Windows 7. Tonight, I tried uploading a single file and got the following error message with Firefox 10.0.2 on Windows XP
CopiedeDSC_6630.jpg -- 3.27 MB
Error: SyntaxError: JSON.parse: unexpected character
I have the same problem with the latest Chrome.
On the other hand, Opera 11.61 processes the file for about 1 minute, then goes back to the album view (list of images)... but without the new images. Internet Explorer 8 on XP uploads the images as it should.
********************
Debug Log file:
This is the most recent entry, and I have a few like that from a few minutes before that and from Tue Feb 21 at 2:00 GMT. Yet interestingly enough, I tried that function this morning (at around 9:30 a.m., and tonight at 21:45 (Eastern Time), but never yesterday. And the administrative overview page shows the correct time.
`
{Wed, 22 Feb 2012 02:14:01 GMT}
Backtrace: Bad gallery in instantiation of album worship-and-education.
Album->__construct called
from getUploadLimitedAlbums (image_upload_limiter.php [179])
from uploadLimiterJS (image_upload_limiter.php [79])
from call_user_func_array (unknown)
from zp_apply_filter (functions-filter.php [149])
from admin-upload.php [300]
Backtrace: Bad gallery in instantiation of album worship-and-education.
Album->__construct called
from getUploadImagesInAlbum (image_upload_limiter.php [207])
from uploadLimiterJS (image_upload_limiter.php [80])
from call_user_func_array (unknown)
from zp_apply_filter (functions-filter.php [149])
from admin-upload.php [300]
`
Tell me if you need other info.
Thanks
I have uploaded the complete debug log here:
http://stjamestheapostle.ca/ZP_sja220222_debug.zip
/zp-core/undefined&album=&publishalbum=checked&albumtitle=&folderdisplay=&autogen=checked&new
This happens if I attempt to switch to jQuery or Flash uploader.
I'm back on Firefox 10.0.2 with Windows 7 (French).
When I disable image_upload_limiter and only that one (quota_manager was already disabled), I get the same error message:
CopiedeDSC_6629.jpg -- 2.99 MB
Error: SyntaxError: JSON.parse: unexpected character
I also get the feeling that even though I have disabled "image_upload_limiter" (and even logged off, then on), it still is active somehow.
I tried to disable most plugins, then to activate all default plugins except jPlayer, and no change.
For your info, when all extensions were enabled, I had:
– image_upload_limiter: Allow album creation; 999 files
– quota_manager : Allow zip files; quota: 250 000 k
and I tried more "reasonable" limits of 99 files and 25 000 k
I then reset the limits to the larger numbers and disabled those two extensions.
In the unlikely case it would be a problem, I also changed the name of the file to something totally different: no change.
Still... same result : it doesn't work with Firefox and Chrome, and the content of the log file doesn't change, whether extensions are off or on..
Regards
*************************
Log file : `
{Thu, 23 Feb 2012 13:27:46 GMT}
Backtrace: Bad gallery in instantiation of album worship-and-education.
Album->__construct called
from getUploadLimitedAlbums (image_upload_limiter.php [179])
from uploadLimiterJS (image_upload_limiter.php [79])
from call_user_func_array (unknown)
from zp_apply_filter (functions-filter.php [149])
from admin-upload.php [300]
Backtrace: Bad gallery in instantiation of album worship-and-education.
Album->__construct called
from getUploadImagesInAlbum (image_upload_limiter.php [207])
from uploadLimiterJS (image_upload_limiter.php [80])
from call_user_func_array (unknown)
from zp_apply_filter (functions-filter.php [149])
from admin-upload.php [300]
`
(Interestingly, whereas yesterday's log time was totally wrong, today, the log time is almost OK: 16:11 Eastern, or 13:11 Pacific, which is where the server is located).
I have even removed the image_upload_limiter plugin and there is no change.
I have also reset the debug log file. No entries appear in the file when I try uploading stuff.
I have tried another gallery (in French), on a different server but with the same characteristics and I have the same behaviour. And the same thing happens if ModRewrite is disabled.
Finally, I then tried on the local server (Windows XP running XAMPP, with modRewrite disabled), and it works on that one!
***********************
Sbillard,
I just looked around the forum for other clues, and my problem seems very similar to what is described here:
http://www.zenphoto.org/support/topic.php?id=10236
Regards,
Could it be that the jquery routine (or its implementation) is different on Apache vs XAMPP on Windows? Or could it be related to the version of Apache server or of PHP?
My online servers have the following credentials:
– Apache 2.2.21
– PHP 5.2.17
My local server has the following credentials:
- XAMPP portable with Control panel 2.5 (16 March 2011)
– Apache 2.2.21
– PHP 5.3.8
Although it doesn't have a real impact on gallery use and configuration, I also see a difference between the Admin Toolbox which, for the administrator, has 14 items on the local server and 5 items on the (remote) online server.
Do you have an idea where I could start looking for "understandable" information on the differences between PHP 5.2.x and 5.3, or the jquery routines used to upload files?
Regards,
Even though jQuery is a javascript framework, I suspect it calls procedures that may behave slightly differently with different versions of Apache or PHP (most likely). Otherwise, I can't see why things don't work remotely, whatever browser I use, whereas things work fine on the local server.
The only other possibility I see might be obscure php.ini flags (all the ones described in setup.php and in the documentation are set up correctly).
Are there any differences (for the host, I mean) between who is the user when a file is stored by http vs Flash (both work) vs jQuery?
And P.S. By the way, who is the "Group"?
Regards,
I also ran Firebug and asked the console to provide me all error messages and warnings. Nothing interesting, except nothing happens:
`
POST http://stjamestheapostle.ca/photos/zp-core/admin-jQuery/uploader.php
–> 200 OK - 14.86s
–> jquery.js (ligne 4)
En-têtesPost
(Nothing in the table)
(warning) The « nodeName » attribute is obsolete. Use « name » instead.
–> jquery.js (ligne 2)
(warning) The « nodeValue » attribute is obsolete. Use « value » instead.
–> jquery.js (ligne 2)
`
The last two warnings seem trivial (other working features provide plenty of warnings. As for the first line, if I understand correctly, it means the POST command is sent but that nothing is transferred.
I looked at different memory-related php.ini parameters. I don't find a "allowed_memory_size" that was referred to in the link sbillard provided. Here are the other memory-related parameters I have:`
memory_limit: 200 Mb
post_max_size: 150 Mb
upload_max_filesize: 80 Mb
upload_tmp_dir: no value (do we need to define one?)
user_dir: no value (do we need to define one?)
json 1.2.1 enabled`
I tried to look at the code, but my PHP skills are a bit minimal...
As a workaround I now convert my filenames until I have the time to find this particular line.
For photo folders I use an automator script to convert all filenames at once/in batches, which I found on a forum here: http://forums.macrumors.com/showthread.php?t=817077
Anyway, neither phpSavePath nor upload_tmp_dir were defined. So I defined them within my php.ini file and I created those folders. No change.
Two other interesting bits of information:
– I used only lowercase letters (dsc3443.jpg) : no change.
– I tried to upload two photos and create a new unpublished sub-album at the same time. The sub-album was indeed created, but no photos were uploaded. Nothing was saved in the upload_temp_dir directory, and the following was saved in the phpSavePath directory:`
file: sess_137with quite a few letters at the end
content: uploadtype|s:6:"jQuery";`
`(SyntaxError: JSON.parse: unexpected character)`
When I peruse through the zp-core/admin-jQuery folder, am I right to figure that `upload_form.php` and `uploader.php` are yours, while the others are from the jQuery Uploader developer?
I had looked before at the site referred to in the header of the jquery.fileupload.js file and I haven't found anything. I'll look at the discussion forum to see if, by any chance, I find anything.