WordPress unzip_file() for large file stopping script with no error on online server only

I’m developping a wordpress plugin which unzip a file of ~4mB.

It works perfectly well on my local server but, on my online server, unzipping the file stops the php script with no errors, even though debug mode is set to true in wp-config.php. No debug log is generated by wordpress.
What is even strange is that it works online for small zip files (~30kB) but not for large ones.

Read More

I changed some php.ini config on my local server to try and see if it wasn’t due to a lower memory limit but it isn’t.

I also tried to replace wordpress’ own unzip_file with the ZipArchive class but it isn’t supported by my host.

Here’s my code:

WP_Filesystem();
global $wp_filesystem;

unzip_file(ABSPATH.KMZ_DIR.$filename.$ext, ABSPATH.KMZ_DIR.$filename.'/');

how can i debug this?

thanks!

Related posts

Leave a Reply

1 comment