The JSON response of the API could not be parsed:

Im using Kirby 3.5 and keep getting this warning / error in the panel:
“The JSON response of the API could not be parsed”

I already removed the “media” folder, but the error stills pops up from time to time.
How do I fix it?

{“supported”:true,“locked”:false}{“status”:“error”,“exception”:“Whoops\Exception\ErrorException”,“code”:32,“message”:“PHP Startup: Unable to load dynamic library ‘pdo_pgsql.so’ (tried: /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pdo_pgsql.so (dlopen(/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pdo_pgsql.so, 9): Library not loaded: /Applications/MAMP/Library/pg/lib/libpq.5.dylib\n Referenced from: /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pdo_pgsql.so\n Reason: image not found), /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pdo_pgsql.so.so (dlopen(/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pdo_pgsql.so.so, 9): image not found))”,“details”:null,“file”:“known”,“line”:0}

Are you using any plugins?
This error messages sounds like something is trying to load an SQL driver your MAMP doesn’t provide

Check if this extensions is loaded in the php.ini that corresponds to your PHP version. If it is there and enabled, try disabling it.

Im using this plugin: https://github.com/rasteiner/k3-pagesdisplay-section

I commented the line ‘extension pdo_pgsql.so’ in the php.ini file (mamp pro). Fingers crossed.

I get this message/popup still (and quite often):

{“status”:“ok”,“code”:200,“name”:“main-col-0-fields”,“type”:“fields”,“fields”:{“featuredimage”:{“default”:,“disabled”:false,“label”:“Image”,“layout”:“cards”,“link”:true,“min”:1,“multiple”:false,“name”:“featuredimage”,“parent”:“pages/collectie+dreamsequence”,“parentModel”:{“content”:{},“translations”:null,“children”:null,“drafts”:null},“query”:“page.files”,“required”:true,“saveable”:true,“search”:true,“signature”:“bcabdfdf246a97d9bd7287450d4ea808”,“size”:“auto”,“strict”:true,“translate”:true,“type”:“files”,“uploads”:{“accept”:““},“width”:“1/1”},“text”:{“autofocus”:false,“buttons”:true,“counter”:true,“default”:”“,“disabled”:false,“files”:[],“font”:“sans-serif”,“label”:“Description”,“name”:“text”,“required”:false,“saveable”:true,“signature”:“6cccd242ef2559b5be81e55a94e51055”,“spellcheck”:true,“strict”:true,“translate”:true,“type”:“textarea”,“uploads”:{“accept”:””},“width”:“1/1”},“artist”:{“autofocus”:false,“disabled”:false,“label”:“Artist”,“name”:“artist”,“options”:[{“text”:“Andy”,“value”:“artiesten/andy”},{“text”:“Anita”,“value”:“artiesten/anita”},{“text”:“Anke Boulanger”,“value”:“artiesten/anke-boulanger”},{“text”:“Anne”,“value”:“artiesten/anne”},{“text”:“Ataol”,“value”:“artiesten/ataol”},{“text”:“Bart C.”,“value”:“artiesten/bart-c”},{“text”:“Bart J.”,“value”:“artiesten/bart-j”},{“text”:“Ben J.”,“value”:“artiesten/ben-j”},{“text”:“CVE”,“value”:“artiesten/cve”},{“text”:“Cynthia”,“value”:“artiesten/cynthia”},{“text”:“Christel”,“value”:“artiesten/christel”},{“text”:“Daniel”,“value”:“artiesten/daniel”},{“text”:“Devin”,“value”:“artiesten/devin”},{“text”:“Ellen”,“value”:“artiesten/ellen”},{“text”:“Erik T.”,“value”:“artiesten/erik-t”},{“text”:“EVI”,“value”:“artiesten/evi”},{“text”:“EW”,“value”:“artiesten/ew”},{“text”:“Filip”,“value”:“artiesten/filip”},{“text”:“GD”,“value”:“artiesten/gd”},{“text”:“GW”,“value”:“artiesten/gw”},{“text”:“Jill”,“value”:“artiesten/jill”},{“text”:“Jonas”,“value”:“artiesten/jonas”},{“text”:“JM”,“value”:“artiesten/jm”},{“text”:“Kathleen B.”,“value”:“artiesten/kathleen-b”},{“text”:“LB”,“value”:“artiesten/lb”},{“text”:“Lode”,“value”:“artiesten/lode”},{“text”:“Liesbeth”,“value”:“artiesten/liesbeth”},{“text”:“Linea”,“value”:“artiesten/linea”},{“text”:“Loick”,“value”:“artiesten/loick”},{“text”:“LW”,“value”:“artiesten/lw”},{“text”:“Marnik”,“value”:“artiesten/marnik”},{“text”:“Martijn”,“value”:“artiesten/martijn”},{“text”:“MD”,“value”:“artiesten/md”},{“text”:“Mich-Mich”,“value”:“artiesten/mich-mich”},{“text”:“MVH”,“value”:“artiesten/mvh”},{“text”:“Myrthe”,“value”:“artiesten/myrthe”},{“text”:“Nina”,“value”:“artiesten/nina”},{“text”:“Oli. H”,“value”:“artiesten/oli-h”},{“text”:“Peter”,“value”:“artiesten/peter”},{“text”:“Philippe”,“value”:“artiesten/philippe”},{“text”:“Roel”,“value”:“artiesten/roel”},{“text”:“Reds”,“value”:“artiesten/reds”},{“text”:“Sabine”,“value”:“artiesten/sabine”},{“text”:“SM”,“value”:“artiesten/sm”},{“text”:“Sophie”,“value”:“artiesten/sophie”},{“text”:“SS”,“value”:“artiesten/ss”},{“text”:“Steve”,“value”:“artiesten/steve”},{“text”:“Suey”,“value”:“artiesten/suey”},{“text”:“Tim V.”,“value”:“artiesten/tim-v”},{“text”:“Tom E.”,“value”:“artiesten/tom-e”},{“text”:“tommot”,“value”:“artiesten/tommot”},{“text”:“Tony”,“value”:“artiesten/tony”},{“text”:“Veerle”,“value”:“artiesten/veerle”}],“placeholder”:“\u2014”,“query”:{“fetch”:“site.find(‘artiesten’).children”,“text”:“{{ page.title }}”,“value”:“{{ page }}”},“required”:true,“saveable”:true,“signature”:“ca63b0291f5517706eefa34afad53e4d”,“strict”:true,“translate”:true,“type”:“select”,“width”:“1/1”},“info”:{“label”:“Help”,“name”:“info”,“saveable”:false,“signature”:“5233db3d8653716e88c531dcea1250eb”,“strict”:true,“text”:"

To manage artists, go to the ‘Artiesten’ page in this panel</p>“,“type”:“info”,“width”:“1/1”},“indexnumber”:{“autofocus”:false,“counter”:true,“disabled”:false,“label”:“Index number”,“name”:“indexnumber”,“required”:false,“saveable”:true,“signature”:“2c2af92c14c06ff9ab22e8d68a5008c8”,“spellcheck”:false,“strict”:true,“translate”:true,“type”:“text”,“width”:“1/1”},“available”:{“autofocus”:false,“default”:true,“disabled”:false,“label”:“Beschikbaar”,“name”:“available”,“required”:false,“saveable”:true,“signature”:“4782aeab4b642cc7460ae9648a9b5b60”,“strict”:true,“translate”:true,“type”:“toggle”,“width”:“1/1”},“date”:{“autofocus”:false,“calendar”:true,“default”:“2020-12-25 00:00:00”,“disabled”:true,“display”:“YYYY-MM-DD”,“icon”:“calendar”,“label”:“Date”,“name”:“date”,“required”:false,“saveable”:true,“signature”:“6cc6116c4459b2a703520e5c590ab8b2”,“step”:{“size”:1,“unit”:“day”},“strict”:true,“time”:false,“translate”:true,“type”:“date”,“width”:“1/2”},“time”:{“autofocus”:false,“default”:“21:18:00”,“disabled”:true,“display”:“HH:mm”,“icon”:“clock”,“label”:“Time”,“name”:“time”,“notation”:24,“required”:false,“saveable”:true,“signature”:“6ff8b378aace35604f2792ea9d57036e”,“step”:{“size”:1,“unit”:“minute”},“strict”:true,“translate”:true,“type”:“time”,“width”:“1/2”},“tags”:{“accept”:“all”,“autofocus”:false,“default”:,“disabled”:false,“help”:”

Tag, Tag 2, Tag 3, …</p>“,“icon”:“tag”,“label”:“Tags”,“name”:“tags”,“options”:[{“text”:“Informatie”,“value”:“informatie”},{“text”:“Aanbod”,“value”:“aanbod”},{“text”:“Kunstuitleen”,“value”:“kunstuitleen”},{“text”:“Collectie”,“value”:“collectie”},{“text”:“Foto’s”,“value”:“fotos”},{“text”:“Agenda”,“value”:“agenda”},{“text”:”(W)onderweg (anoroc extra’s)“,“value”:“coaching”},{“text”:“Artiesten”,“value”:“artiesten”},{“text”:“Error”,“value”:“error”},{“text”:“Homepage”,“value”:“homepage”},{“text”:“Login”,“value”:“login”},{“text”:“Logout”,“value”:“logout”},{“text”:“Trooper”,“value”:“trooper”}],“query”:“site.children.published”,“required”:false,“saveable”:true,“separator”:”,",“signature”:“a6d02844f71e01472c534d0421c030ec”,“strict”:true,“translate”:true,“type”:“tags”,“width”:“1/1”}}}{“status”:“error”,“exception”:“Whoops\Exception\ErrorException”,“code”:2,“message”:“Cannot modify header information - headers already sent by (output started at /Users/jarne/Development/wonderweg/index.php:5)”,“details”:null,“file”:“wonderweg/kirby/src/Http/Response.php”,“line”:284}{“status”:“error”,“exception”:“Whoops\Exception\ErrorException”,“code”:32,“message”:“PHP Startup: Unable to load dynamic library ‘pgsql.so’ (tried: /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so (dlopen(/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so, 9): Library not loaded: /Applications/MAMP/Library/pg/lib/libpq.5.dylib\n Referenced from: /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so\n Reason: image not found), /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so.so (dlopen(/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so.so, 9): image not found))”,“details”:null,“file”:“known”,“line”:0}

Hm, that’s a wild mixture of messages…

Do you happen to have any whitespace of the top of your index.php or config.php?

Then again there are these messages that refer to seemingly missing PHP extensions. Try to disable them all in your php.ini, or try using a different PHP version.

See also (don’t know if you have also upgraded Mamp and your OS to Big Sur): Updated MAMP Pro to v6.0.1 nothing works - #17 by meltajon

1 Like

Yeah, updated to Big Sur and Mamp Pro 6.0.1.
This issue doesn’t seem to be Kirby related.

I get a lot of errors, usually referring to images / media.

This is my last one:

PHP Startup: Unable to load dynamic library ‘pgsql.so’ (tried: /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so (dlopen(/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so, 9): Library not loaded: /Applications/MAMP/Library/pg/lib/libpq.5.dylib Referenced from: /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so Reason: image not found), /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so.so (dlopen(/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/pgsql.so.so, 9): image not found))

Have you tried the suggestions from the thread I posted above?

This is nothing we can solve, the error messages are really the same as in that thread.

I think I will be able to solve some issues with the link you shared. Thanks again for the quick help and I wish you happy holidays!