Support Forum

pupload error: JSON Parse error: Unrecognized token '<'

YA Yuko Amo
Yuko Amo
Member

An error message “JSON Parse error: Unrecognized token ‘<‘” is shown after click attch button. 

And another error message 

1.jpg: Error 999 – Unknown server error (check image size – may be exhausting memory)

is appeared below attachment D&D window.

My image size is small, 57 KB.

Pupload settings are:

Image quality of resized images (0-100): 100

Image quality of thumbnails (0-100):100

Maximum size of thumbnails:300

Maximum size (in bytes) of image files : 0  

Maximum width (in pixels) of image files (0 = no limit):0

Maximum height (in pixels) of image files (0 = no limit):0

 

In my php.ini (/usr/loca/lib/php/php.ini), settings of file size are following:

memory_limit = 1700M

post_max_size = 1600M

upload_max_filesize = 1500M
What can I do next ?

13 Answers

New Answer

MP Mr Papa
Mr Papa
Member

which version of SP and file uploader plugin?   which browser?

1700M??  really?

are your uploads locations valid?  see on forum – integration – storage locations…

anything in the error log?

can you try it running the default wp theme?  the theme or other plugin maybe adding stuff to the json response causing issues…

YA Yuko Amo
Yuko Amo
Member

Server Environment

Simple Press version 5.3.1
Pupload version 2.1.2
WordPress 3.6.1
Apache 2.4.6 and PHP 5.5.3 on FreeBSD 9.1

My Sorage Location is
SP storage location :sp-resources/forum-image-uploads
Status …..”Location Found” and “Write-OK”

Both under “memory_limit = 1700M post_max_size = 1600M upload_max_filesize = 1500M” and under default settings(memory_limit=128M etc.), upload is failed.

Local Environment
Browser is Safari 5.1.9 on Mac OS X 10.6.8.
I tried Firefox 23.0.1, but the situation is same.

Sadly…bbPress with GD bbPress Attachments works well.

YA Yuko Amo
Yuko Amo
Member

After image upload, my Erro log is following

2013年9月14日
11:37 AM
php file: /simple-press/forum/content/forms/sp-form-components.php
line: 469
function: Unavailable
Notice | Trying to get property of non-object
2013年9月14日
11:37 AM
php file: /simple-press/forum/content/forms/sp-form-components.php
line: 469
function: sp_post_editor_smileys_options
Notice | Trying to get property of non-object
2013年9月14日
11:37 AM
php file: /simple-press/forum/content/forms/sp-form-components.php
line: 469
function: Unavailable
Notice | Trying to get property of non-object
2013年9月14日
11:37 AM
php file: /simple-press/forum/content/forms/sp-form-components.php
line: 469
function: sp_post_editor_smileys_options
Notice | Trying to get property of non-object
YA Yuko Amo
Yuko Amo
Member

My WP theme is Twenty Twelve. This theme is included in WP distribution.

I try Google chrome browser, but I can’t attach image.

MP Mr Papa
Mr Papa
Member

cant attach an image?  why?  is it too large?  just adjust the image size and/or quality… the image upload limit here is large enough…

dont worry about the smileys notice…  its just a notice – not an error… harmless.. and already cleaned up in next version…

understand theme – good, generally eliminates that…  what about plugins?  can you try disabling them and seeing if any better?

has your server properly defined a temp file upload location (normally in php or uses system default)?

is this forum in English or translated?

YA Yuko Amo
Yuko Amo
Member

No, my image size is 57 KB named “1.jpg”. I think this is small size.

I deactivated all SP plugins. Only pupload was activated.

Activated WP plugins were Akismet, SimplePress and WP Multibyte Patch.

Then I try again, but I can not attach image.

In my php.ini, upload_tmp_dir =/tmp and its permission is 777.

I read this forum in English.

YS Yellow Swordfish
Yellow Swordfish
Member

It is not probably the issue but we have had a couple of users see problems with the multibyte plugin active. Could you try again with that deactivated? So we can discount it at least?

YA Yuko Amo
Yuko Amo
Member

I tried again under two environments:

(1) Japanese localized version of WP with “WP Multibyte Patch” deactivated.

(2)Newly clean installed Original (=English) version of WP3.6.1, with only simple-press plugin and pupload plugin.

In the both environment, I can not attach 57 KB small image file. The error message is “JSON Parse error: Unrecognized token ‘<‘” and 1.jpg: Error 999 – Unknown server error (check image size – may be exhausting memory).

This image file can be viewed using Safari and Preview. Image file has no problem.

MP Mr Papa
Mr Papa
Member

I wouldnt have my /tmp directory at 0777.. not the best security practice… but I doubt its related…

is this on net, where we can try it and look at the ajax responses?

YA Yuko Amo
Yuko Amo
Member

I prepare a test forum http://www9365uj.sakura.ne.jp/demo/

Please log in user:demouser pass:k93wsej4

 

Original (English) version WP3.6.1.

Simple Press version 5.3.1

Pupload version 2.1.2

Apache 2.4.6 and PHP 5.5.3 on FreeBSD 9.1

In my php.ini, upload_tmp_dir = /tmp, its permission is 1777.

I make sure the same error is reproduced on this site, logged in as demouser and attempted attach  another 115KB jpeg file named “1.jpg”.

 

I will try from different local environment in my office, another version of Mac OS or Windows 7, on next Tuesday (Next Monday is holiday in Japan).

MP Mr Papa
Mr Papa
Member

as indicated, its all about the json response..  this is the error being added to the json response:

<b>Fatal error</b>:  Call to undefined function imagecreatefromjpeg() in <b>/usr/problem-with-post-edit-buttonome/WWW/demo/wp-content/sp-resources/forum-plugins/plupload/library/sp-plupload-components.php</b> on line <b>170</b><br />

its because you server does not have the standard GD library compiled into php…  its needed by the file uploader…

YA Yuko Amo
Yuko Amo
Member

My first compile option of PHP was

./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=mysqlnd  –with-mysqli=mysqlnd –with-pdo-mysql –enable-mbstring  –enable-mbregex –with-libmbfl –enable-pcntl –with-zlib -with-openssl –with-gd –with-freetype-dir=/usr/local –with-curl=/usr/local

I compiled gd library before PHP installation with “

./configure –with-png=/usr/local –with-jpeg=/usr/local –with-freetype=/usr/local  –with-zlib=/usr/local “. I thought gd includes libjpeg and libpng. But it was my mistake.

On PHP configuration,   gd library bundled with PHP will be used with “–with-gd” option. gd library installed in /usr/local will not be used. 

Finally my new configuration is

./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=mysqlnd  –with-mysqli=mysqlnd –with-pdo-mysql –enable-mbstring  –enable-mbregex –with-gettext  –enable-ftp –with-libmbfl –enable-pcntl -with-openssl –with-gd –with-jpeg-dir=/usr/local –with-png-dir=/usr/local –with-zlib –with-freetype-dir=/usr/local –with-curl

I add install directory of libjpeg and libpng in the PHP configuration. Then I re-install PHP and restart apache, I success to upload image files.

 

Thank you for your support.

YS Yellow Swordfish
Yellow Swordfish
Member

That is great news. Thanks for the update…