Closed alapiere closed 3 years ago
@alapiere That version of PclZip should only be a development dependency that's used for running tests. How exactly did you install SatisPress?
Also, looking at that line of code where the error was generated, I see this:
$v_memory_limit = $v_memory_limit * 1048576;
And that $v_memory_limit
variable comes from line 1787:
$v_memory_limit = ini_get('memory_limit');
$v_memory_limit = trim($v_memory_limit);
$last = strtolower(substr($v_memory_limit, -1));
That would seem to suggest it's a configuration issue with your server. Is that what you're seeing?
Hi @bradyvercher , I saw you cut dependency with pclzip, so problem solved ! to answer your question, for trace, I donwloaded zip then run composer update to fetch dependencies. I'm not aware of any server misconfiguration, my wp is managed (kinsta).
Thanks for the update, @alapiere. I thought something like that may have been the case. For posterity's sake, WordPress uses a forked/patched version of PclZip as far as I know. The lines from above in the WordPress version look like this:
$v_memory_limit = ini_get('memory_limit');
$v_memory_limit = trim($v_memory_limit);
$v_memory_limit_int = (int) $v_memory_limit;
$last = strtolower(substr($v_memory_limit, -1));
There is that extra line ensuring the value from the ini_get()
call is an integer, which is what would have prevented the error you were getting.
In the future, you can download a packaged zip with all the dependencies already bundled from the releases page.
Or if you want to continue installing dependencies with Composer and you're not managing the whole site with Composer, then use something like this instead:
composer install --no-dev
That will install only the packages needed to run SatisPress and not the ones used for development.
I now understand better the composer philsophy : I think an even better proper way is to manage the master wordpress installation with composer as well, and pull satispress through git dependency :
Doing things this way, a composer install / update
always apply --no-dev by default :)
Hi, when composer-update on client website , during development testing :
I had debug mode activated on satispress server, so it fails to parse packages.json which returns this notice first .. Obviously it's fine when deactivating WP_DEBUG. Could be quite annoying for debugging , testing and development environments though.