Want more timely Centmin Mod News Updates?
Become a Member

PHP Fatal Error

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

  1. Doni

    Doni Member

    32
    1
    8
    Aug 23, 2014
    Ratings:
    +3
    Local Time:
    11:23 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

    989
    268
    63
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +441
    Local Time:
    6:23 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    try to raise php memory limit in custom php.ini file
     
    • Like Like x 1
  3. Doni

    Doni Member

    32
    1
    8
    Aug 23, 2014
    Ratings:
    +3
    Local Time:
    11:23 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

    32
    1
    8
    Aug 23, 2014
    Ratings:
    +3
    Local Time:
    11:23 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

    34,660
    7,661
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,779
    Local Time:
    2:23 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
..