0

I have gone through all the solutions that I could find including these ones but couldn't resolve my problem.

I have made following changes to both php.ini production & development version;

post_max_size = 5000M
upload_max_filesize = 5000M

However it doesn't make any difference. If I am trying to upload image files of large value, I am receiving

below response error in my console-log;

<br />
<b>Warning</b>:  POST Content-Length of 11394639 bytes exceeds the limit of 
8388608 bytes in <b>Unknown </b> on line <b>0</b><br /> []

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

var data = JSON.parse(this.responseText);

I am hoping to have clarified my issue. Thanks for looking into it in advance !

Community
  • 1
  • 1
Gautam P Behera
  • 171
  • 2
  • 13

2 Answers2

1

I have made following changes to both php.ini production & development version;

post_max_size = 5000M upload_max_filesize = 5000M

I did have the same issue, but after changing the php.ini file and rebooting apache this worked for me.

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

I can see that you have some issue there. Check the file against any dodgy characters as it seems to be causing an issue. Sometimes when you want to upload a file, its name could have illegal characters for the database or js. Make sure that every character in the file name you try to upload does not have any illegal character, or it is encoded/decoded accordingly.

I hope I helped - this is my first post.

Let me know how did it go!

Best wishes, mateekk

Community
  • 1
  • 1
Mateekk
  • 11
  • 1
0

I had the same problem in my ubuntu 16.04. After the upgrading of php, I have several php.ini and at the begining I was mixed up.

Under /etc/php, I have the folders php5.5, php5.6, php7.0, php7.1, so be sure to correct the right one (because ,due to legacy, I was used to work in /etc/php5).