I was finally able to get a ‘max execution time’ error to display, but was unable to increase the value on my shared hosting using ./php/phprc and .htaccess to increase the value so I added an ini_set to the function download_file() to never time out.
However, I’m now getting either a 404 page (from the WP front-end)
or a massive fatal error dump and then a ‘content encoding error’ output.
perhaps I need to move the ini_set to the actual populate_data() function instead…
I was finally able to resolve this. Since I still had debugging on PHP was throwing an error which set the header type automatically. Then the script couldn’t change the header type to download file and I ended up with a content encoding error. Turning off debugging would have worked, but I investigated the error:
Notice: Undefined index: description in /wp-content/plugins/ghost/class-ghost.php on line 394
I commented out the line:
'bio' => substr( $user_meta['description'][0], 0, 199 ),
and ran it again and was able to download a .json file successfully.
I looked at the codex and it seems correct, but perhaps the description is stored in that array value and not in another key, e.g. [‘description’] not [‘description’][‘0’]
tl;dr: there’s a bug that will break the output if debugging is turned on
Hi!
Whoa, thank you. Sorry I left your initial question unanswered, but glad you managed to resolve it. I’ll look at the code later today to see if I can hunt down that undefined index.
Also, thank you for all the other information. I’ll write up an FAQ / Troubleshooting piece as well.
Gabor
Hey i still get black page on shared host.
Resposne is 200. But no download is started. Any ideas?
Can i execute this maybe somehow form ssh console?