Welcome to Centmin Mod Community
Register Now

PHP Fatal Error

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Doni, May 31, 2017.

  1. Doni

    Doni Member

    45
    2
    8
    Aug 23, 2014
    Ratings:
    +5
    Local Time:
    5:28 PM
    nginx/1.7.4
    mysql Ver 15.1 Distrib 5.5.39-MariaDB, for Linux (x86_64) using readline 5.1
    Hi Eva,

    I try to add wordpress nginx vhost through menu 22, and then i find an error. This is the first time i encounter this kind of error. What could possibly wrong?

    "
    Code:
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 22
    --------------------------------------------------------
    ------------------------------------------------------------
    Update wp-cli tool
    ------------------------------------------------------------
    updating...
    -------------------------------------------------------------
    install wp-cli https://github.com/eriktorsner/wp-checksum
    Installing package eriktorsner/wp-checksum (dev-master)
    Updating /root/.wp-cli/packages/composer.json to require the package...
    Using Composer to install the package...
    ---
    Loading composer repositories with package information
    Updating dependencies
    PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777216 bytes) in phar:///usr/bin/wp/vendor/composer/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 126
    -------------------------------------------------------------
    install wp-cli https://github.com/markri/wp-sec
    Installing package markri/wp-sec (dev-master)
    Updating /root/.wp-cli/packages/composer.json to require the package...
    Using Composer to install the package...
    ---
    Loading composer repositories with package information
    Updating dependencies
    PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777216 bytes) in phar:///usr/bin/wp/vendor/composer/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 126
    -------------------------------------------------------------
    update wp-cli packages
    Using Composer to update packages...
    ---
    Loading composer repositories with package information
    Updating dependencies
    PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777216 bytes) in phar:///usr/bin/wp/vendor/composer/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 126
    -------------------------------------------------------------
    

    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.1
    • PHP Version Installed: 5.6.30
    • MariaDB MySQL Version Installed: 10.1.23
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config:
    Code:
    NGXDYNAMIC_NGXPAGESPEED='y'
    NGINX_PAGESPEED='y'
    


     
  2. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:28 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    try to raise php memory limit in custom php.ini file
     
  3. Doni

    Doni Member

    45
    2
    8
    Aug 23, 2014
    Ratings:
    +5
    Local Time:
    5:28 PM
    nginx/1.7.4
    mysql Ver 15.1 Distrib 5.5.39-MariaDB, for Linux (x86_64) using readline 5.1
    Manage to resolved the error by increasing the memory limit

    Check current PHP memory limit by using this command:
    Code:
    php -r "echo ini_get('memory_limit').PHP_EOL;"
    
    Change it to more higher number, in my case, i increase memory_limit from 256 to 1G. Add it on custom php.ini
    Code:
    nano /etc/centminmod/php.d/a_customphp.ini
    
    And then restart the PHPFPM
    Code:
    fpmrestart
    
    Its all good now.
     
  4. Doni

    Doni Member

    45
    2
    8
    Aug 23, 2014
    Ratings:
    +5
    Local Time:
    5:28 PM
    nginx/1.7.4
    mysql Ver 15.1 Distrib 5.5.39-MariaDB, for Linux (x86_64) using readline 5.1
    Yep that exactly what i do, thank you :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,894
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    8:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+