0

I am trying to install laravel on my cloud hosting shared server using putty through Putty.

When I try to execute commands i get following error

composer create-project laravel/laravel --prefer-dist

Installing laravel/laravel (v5.4.30)

  • Installing laravel/laravel (v5.4.30): Loading from cache Created project in /home1/repletub/skillforces/laravel

php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies (including require-dev)

Fatal error: Out of memory (allocated 803209216) (tried to allocate 32 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129

After looking for solutions over internet i found that, memory_limit property in php.ini must be set to -1.

So from cpanel i changed it for my domain. It still showed me the same error.

To cross-check i executed following sequence of commands , but here it does not reflect the changes.

php --ini

Configuration File (php.ini) Path: /opt/cpanel/ea-php73/root/etc
Loaded Configuration File:         /opt/cpanel/ea-php73/root/etc/php.ini
Scan for additional .ini files in: /opt/cpanel/ea-php73/root/etc/php.d
Additional .ini files parsed:      /opt/cpanel/ea-php73/root/etc/php.d/01-ioncube.ini,

cat /opt/cpanel/ea-php73/root/etc/php.ini

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 256M

Can anyone guide me resolving this issue.

java bee
  • 115
  • 3
  • 15
  • https://stackoverflow.com/questions/36107400/composer-update-memory-limit – Kevin Aug 07 '20 at 06:40
  • After change the php.ini you need to restart apache. – STA Aug 07 '20 at 06:41
  • @Kevin php -d memory_limit=-1 /opt/cpanel/composer/bin/composer update php -d memory_limit=512M /opt/cpanel/composer/bin/composer update i executed these 2 commands. still the same issue – java bee Aug 07 '20 at 06:46
  • @STA No facility to restart the server on shared hosting. If u have any trick for that on jailshell please provide it. – java bee Aug 07 '20 at 06:51
  • You can check your `php.ini` update or not by create a page with data `` – STA Aug 07 '20 at 06:53
  • @STA it shows properly in but not in SSH cmd in putty. – java bee Aug 07 '20 at 07:16

0 Answers0