# Trying to move to composer, still getting PHP errors

**URL:** <https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [May 21, 2022, 12:09am UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173 "2022-05-21T00:09:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 21, 2022, 12:09am UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/1 "2022-05-21T00:09:08Z")

</div>

Following the instructions to move to composer (not happy about this move as I am completely lost).

> **[How to switch to Composer](https://docs.mautic.org/en/setup/switch-to-composer)**
>
> . Up until Mautic 4, users could download Mautic as a ZIP file and install it on any PHP server. However, many users were running into installation and update errors, many of which caused considerable frustration and in some cases, significant...

ran the command

```auto
composer create-project mautic/recommended-project:^4 Mautic-new --no-interaction

```

After a few seconds, I was greeted with this.

```auto
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108872 bytes) in phar:///usr/sbin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108872 bytes) in phar:///usr/sbin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.root@localhost:/home/runcloud/webapps#

```

I understood that the whole reason to move to composer was to avoid PHP and memory errors. So why am I still getting PHP memory errors!?!?!?

\*\* **Prepare for personal rant** \*\*

I will repeat myself from other posts I have made. This decision to move to composer for installs and updates, while it may be a good approach, was made by a developer, not by a user. I am not a developer. I don’t use Github to house my own projects. I have no idea how any of this works and most of the CLI stuff is beyond my current level of understanding. I can build websites and I know how to set up hosting. Transferring files via FTP and configuring the sites in my hosting. If CLI is the better way then why do we have WHM and cPanel and Plesk? Because not everyone is a developer and many people need a UI with options to choose from to make heads or tails of things.

I have nothing against learning but this topic is outside of my area of study nor am I particularly interested in going down that path. I am a small business owner (photographer) that looks after my own stuff. I don’t develop applications for a living nor do I manage networks or large IT installations.

In this situation, I am trying to decipher the manual and apply it to my installation which is managed by a third party, Runcloud. The directory structure is different and running into complications leaves me in the lurch. Runcloud will not advise as it’s not part of their support.

I am pleading with you. Simplify this process.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 21, 2022, 6:58am UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/2 "2022-05-21T06:58:31Z")

</div>

This seems like a php memory setting issue.  
Do you know how to check your php memory settings?  
If yes, can you plz share here?

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 25, 2022, 1:01pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/3 "2022-05-25T13:01:27Z")

</div>

Hi Joeyk,

But PHP is not used when updating with composer. That was the whole point of moving to composer, to avoid the PHP problems people were having doing updates in the browser UI.

How can that be?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [May 25, 2022, 3:47pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/4 "2022-05-25T15:47:32Z")

</div>

I am not sure about updating but composer is a dependency manager for php.

The error produced tells us that your php is lacking memory so try increasing memory in php.ini and try again.

And I do somewhat agree with your rant but oh well … I preferred to stay away from CLI. Cpanel or web management etc offer CLI as part of the package now. It depends on the host provider to have it enabled or not.

I had to enable my Cpanel terminal account then use a certain string with composer to install it in Cpanel’s tree structure directories since when I tried to install Mautic outside of the rootdoc folder, it wouldn’t function property and give off a bunch of errors in log.

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 25, 2022, 3:57pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/5 "2022-05-25T15:57:05Z")

</div>

So my Mautic PHP memory limit is set to 512MB.

It needs more than that in order to perform an upgrade?!

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 25, 2022, 5:14pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/6 "2022-05-25T17:14:39Z")

</div>

\*\* **UPDATE** \*\*

Going by the error message it is trying to take up 1.6GB of memory

Why does it need that much memory to update PHP files and possibly update a DB?

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 25, 2022, 5:14pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/7 "2022-05-25T17:14:47Z")

</div>

\*\* **UPDATE 2** \*\*

So, mistake there. The error is saying it’s used 1.6GB of memory and could not allocate another 67MB it needed.

I checked my PHP settings and they are set to 512MB. So I have no idea how it was able to consume 1.6GB when it was set to 1/3 of that.

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 25, 2022, 5:25pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/8 "2022-05-25T17:25:14Z")

</div>

> [@aglyons](#):
>
> `https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors`

Reading this doc, I’m not quite sure what I need to do to resolve this.

Are these CLI commands that I am typing into an SSH session?

If so, in the instances where ‘\<…\>’ is in the command, is this supposed to be replaced with something? What is it expecting me to include?  
.  
.  
.

To get the current `memory_limit` value, run:

```auto
php -r "echo ini_get('memory_limit').PHP_EOL;"

```

Try increasing the limit in your `php.ini` file (ex. `/etc/php5/cli/php.ini` for Debian-like systems):

```auto
; Use -1 for unlimited or define an explicit value like 2G
memory_limit = -1

```

Composer also respects a memory limit defined by the `COMPOSER_MEMORY_LIMIT` environment variable:

```auto
COMPOSER_MEMORY_LIMIT=-1 composer.phar <...>

```

Or, you can increase the limit with a command-line argument:

```auto
php -d memory_limit=-1 composer.phar <...>

```

This issue can also happen on cPanel instances, when the shell fork bomb protection is activated. For more information, see the [documentation](https://documentation.cpanel.net/display/68Docs/Shell+Fork+Bomb+Protection) of the fork bomb feature on the cPanel site.

---

<div class="post-metadata">

**Author:** ![gary.harrison](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gary.harrison/32/2864_2.png) [@gary.harrison](https://forum.mautic.org/u/gary.harrison)\
**Post date:** [May 26, 2022, 12:00am UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/9 "2022-05-26T00:00:36Z")

</div>

We had our hosting provider upgrade our memory to 4096 and it solved the problem above.

After following all the steps, we got a bunch of 500 errors and gave up.

If someone gets this working - we would love to know how…

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [May 26, 2022, 2:53pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/10 "2022-05-26T14:53:03Z")

</div>

500 error would be recorded in the httpd or php error logs …

Let us know what error was recorded in log and we may be able to assist you with this…

---

<div class="post-metadata">

**Author:** ![gary.harrison](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gary.harrison/32/2864_2.png) [@gary.harrison](https://forum.mautic.org/u/gary.harrison)\
**Post date:** [May 26, 2022, 3:36pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/11 "2022-05-26T15:36:14Z")

</div>

Hi Bill,

No log file was created. My assumption is that the local.php paths need to be updated after the move, but i’m not sure to where. I plan on doing a clean install so i can see how composer is handling the local.php paths when i have time.

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [May 26, 2022, 3:38pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/12 "2022-05-26T15:38:57Z")

</div>

Let you know 500 errors most of the time is a server side log file not the logs in Mautic. You need to check your web server for those two logs file and check browser console to see if any javascript error when loading a page too.

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [May 27, 2022, 7:35pm UTC](https://forum.mautic.org/t/trying-to-move-to-composer-still-getting-php-errors/24173/13 "2022-05-27T19:35:21Z")

</div>

Sorry, but what about the person that started this thread?
