Skip to content

PHP runs out of memory #9

@XedinUnknown

Description

@XedinUnknown

Hi,

I'm using your class in my PHP script to make sure Composer is installed, and also to run CLI commands on it. However, when I run composer update ($wrapper->run('update', $output)), my script runs out of memory:

Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 291 bytes) in phar://path/to/my/script/composer.phar/vendor/composer/semver/src/VersionParser.php on line <b>403</b><br />

Surely, I could simply increase the PHP memory limit. However, what I can't understand is this: why is my script running out of memory? CLI commands are surely run on a different thread than my webpage. The worst case scenario would be the $output containing the PHP error text, and my page continuing to load.

Could you look into this, or at least provide some advice please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions