Results 1 to 26 of 26

Thread: Issues with installation: 4.10, 4.9, & 4.4 | contao:install-web-dir & scriptHandler

  1. #1
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default Issues with installation: 4.10, 4.9, & 4.4 | contao:install-web-dir & scriptHandler

    Hello,

    I've attempted a clean installation of 4.x using the contao-manager.phar installer. Each version presents an error in the scriptHandler.php during the "composer install" phase. The only difference with 4.4 from 4.9/4.10 is that I can install the Contao CMS afterwards. On 4.9 & 4.10 the Contao CMS is missing and cannot be installed without throwing errors with the package updates.

    With all installations, I am able to access the Contao Manager afterwards, but with 4.9 & 4.10 I cannot install the Contao CMS - it throws a 404 error. On 4.4 I can use the install tool to install the CMS.

    Contao 4.10:
    Code:
    Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
    Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception
    In ScriptHandler.php line 95:
    
    An error occurred while executing the "contao:install-web-dir" command:
    
    install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [...]
    Process terminated with exit code 1
    Result: General error
    Contao 4.9:
    { Received same error as 4.10 }

    Contao 4.4:
    Code:
    Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
    Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception
    In ScriptHandler.php line 113:
    
    An error occurred while executing the "cache:warmup" command:
    In 92da9b7be0f3e39acac0688ecaaa96aa765326d41e9aca5df03d4962681f3698.php lin
    e 351:
    
    Error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40960 bytes)
    
    cache:warmup [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--
    verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--en
    v ENV] [--no-debug] [--]
    
    install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [...]
    Process terminated with exit code 1
    Result: General error
    I have attempted another installation of 4.4 on a different server (same hosting company) and received the following error:
    Code:
    > Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
    Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception
    In ScriptHandler.php line 113:
                                                                     
      An error occurred while executing the "cache:warmup" command:  
                                                                     
    install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>...]
    # Process terminated with exit code 1
    # Result: General error
    Any thoughts or suggestions would be helpful as I would rather install 4.10 and know that the system is upgradable down the road without issue. Thank you.
    Last edited by spirescreative; 01/10/2021 at 21:09.

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Could you please post the full console output?
    Contao Community Moderator
    → Support options

  3. #3
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    Here is the full text from the 4.10 installation: https://www.dropbox.com/s/le3vptap43...error.txt?dl=0

  4. #4
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    You could try to connect to your webspace via SSH and then run the following command in the Contao root directory:

    Code:
    vendor/bin/contao-console contao:install-web-dir
    Contao Community Moderator
    → Support options

  5. #5
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    I've performed the SSH command on both 4.10 and 4.4 installations. The command is received with no output response. Assume it was accepted.

  6. #6
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    If I perform a update of the Contao Open Source CMS in the 4.10 Contao Manager I get a similar message:

    Code:
    $ /usr/local/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=UTC /home/oldberwi/contao/contao/web/contao-manager.phar.php composer install --prefer-dist --no-dev --no-progress --no-suggest --no-ansi --no-interaction --optimize-autoloader
    composer/package-versions-deprecated: Generating version class...
    composer/package-versions-deprecated: ...done generating version class
    contao/manager-plugin: Generating plugin class...
    contao/manager-plugin: ...done generating plugin class
    Loading composer repositories with package information
    Installing dependencies from lock file
    Nothing to install or update
    Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
    Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
    Generating optimized autoload files
    Deprecation Notice: Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///home/oldberwi/contao/contao/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201
    80 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    > Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
    Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception
    In ScriptHandler.php line 95:
                                                                               
      An error occurred while executing the "contao:install-web-dir" command:  
                                                                               
    install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>...]
    # Process terminated with exit code 1
    # Result: General error
    Using the "Update Pacakges" option exits with a 143 code.

  7. #7
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Quote Originally Posted by spirescreative View Post
    The command is received with no output response.
    No output? Maybe you've to specify the php command, too.

    What do you get if you run the command php -v on the command line?

    Do you get an output if you run
    Code:
    php vendor/bin/contao-console contao:install-web-dir
    or
    Code:
    /usr/local/bin/php vendor/bin/contao-console contao:install-web-dir
    in the Contao's root directory?
    Contao Community Moderator
    → Support options

  8. #8
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    php -v outputs the php version information (PHP 7.3/23) and build information.

    Running the following command "php vendor/bin/contao-console contao:install-web-dir" outputs the following:
    Code:
    Updated the web/.htaccess file.
    Added the web/preview.php file.
    Added the web/app.php file.
    Added the web/index.php file.

  9. #9
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    FYI, the Install Tool, inside of the Contao Manager, now throws a 500 Internal Server Error.

  10. #10
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Please confirm that
    • you have set the DocumentRoot of the domain to the web/ subfolder
    • that the web server processes .htaccess files and that the mod_rewrite module is active


    So, you are saying that you get an Error 500 when you run https://example.com/contao/install ? Can you access the Contao install tool via https://example.com/index.php/contao/install ?
    Contao Community Moderator
    → Support options

  11. #11
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Quote Originally Posted by spirescreative View Post
    Running the following command "php vendor/bin/contao-console contao:install-web-dir" outputs the following:
    Code:
    Updated the web/.htaccess file.
    Added the web/preview.php file.
    Added the web/app.php file.
    Added the web/index.php file.
    Yeah, that was the missing part from the install process.
    Contao Community Moderator
    → Support options

  12. #12
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    Quote Originally Posted by xchs View Post
    Please confirm that
    • you have set the DocumentRoot of the domain to the web/ subfolder
    • that the web server processes .htaccess files and that the mod_rewrite module is active


    So, you are saying that you get an Error 500 when you run https://example.com/contao/install ? Can you access the Contao install tool via https://example.com/index.php/contao/install ?
    The doc root is pointing to the web folder, yes.
    RewriteEngine is On.
    Accessing the page with the "index.php/contao/install" rewrites to /contao/install" and comes up with a 500 Internal Server Error.

  13. #13
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    This is the .htaccess file in the web folder (first part is from the server which was generated when the MultiPHP settings in the cPanel enabled certain functions, including Allow_url_fopen):


    Code:
    # BEGIN cPanel-generated php ini directives, do not edit
    # Manual editing of this file may result in unexpected behavior.
    # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    <IfModule php7_module>
       php_flag display_errors Off
       php_value max_execution_time 30
       php_value max_input_time 60
       php_value max_input_vars 1000
       php_value memory_limit 32M
       php_value post_max_size 8M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
       php_value upload_max_filesize 2M
       php_flag zlib.output_compression Off
    </IfModule>
    <IfModule lsapi_module>
       php_flag display_errors Off
       php_value max_execution_time 30
       php_value max_input_time 60
       php_value max_input_vars 1000
       php_value memory_limit 32M
       php_value post_max_size 8M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
       php_value upload_max_filesize 2M
       php_flag zlib.output_compression Off
    </IfModule>
    # END cPanel-generated php ini directives, do not edit
    
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        <IfModule mod_headers.c>
            # Assets in /assets and /bundles either contain a hash in their filename
            # or are called with a ?version suffix, therefore cache them for 1 year.
            RewriteRule ^(assets|bundles)/ - [ENV=CONTAO_ASSETS:true]
            Header set Cache-Control "max-age=31536000" env=CONTAO_ASSETS
    
            # Allow CORS on the Contao TinyMCE skin.
            RewriteRule ^assets/tinymce4/js/skins/contao/fonts/ - [ENV=CONTAO_TINYMCE_SKIN:true]
            Header set Access-Control-Allow-Origin "*" env=CONTAO_TINYMCE_SKIN
        </IfModule>
    
        # Determine the RewriteBase automatically and set it as environment variable.
        # If you are using Apache aliases to do mass virtual hosting or installed the
        # project in a subdirectory, the base path will be prepended to allow proper
        # resolution of the index.php file and to redirect to the correct URI. It will
        # work in environments without path prefix as well, providing a safe, one-size
        # fits all solution. But as you do not need it in this case, you can comment
        # the following 2 lines to eliminate the overhead.
        RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
        RewriteRule ^(.*) - [E=BASE:%1]
    
        # Sets the HTTP_AUTHORIZATION header removed by Apache
        RewriteCond %{HTTP:Authorization} .
        RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect to URI without front controller to prevent duplicate content
        # (with and without `/index.php`). Only do this redirect on the initial
        # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
        # endless redirect loop (request -> rewrite to front controller ->
        # redirect -> request -> ...).
        # So in case you get a "too many redirects" error or you always get redirected
        # to the start page because your Apache does not expose the REDIRECT_STATUS
        # environment variable, you have 2 choices:
        # - disable this feature by commenting the following 2 lines or
        # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
        #   following RewriteCond (best solution)
        RewriteCond %{ENV:REDIRECT_STATUS} ^$
        RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
    
        # If the requested filename exists, simply serve it.
        # We only want to let Apache serve files and not directories.
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^ - [L]
    
        # Rewrite all other queries to the front controller.
        RewriteRule ^ %{ENV:BASE}/index.php [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
        <IfModule mod_alias.c>
            # When mod_rewrite is not available, we instruct a temporary redirect of
            # the start page to the front controller explicitly so that the website
            # and the generated links can still be used.
            RedirectMatch 302 ^/$ /index.php/
            # RedirectTemp cannot be used instead
        </IfModule>
    </IfModule>

  14. #14
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Please try to increase the PHP memory limit from 32 MB (the current value) to e.g. 128 MB:

    Code:
    php_value memory_limit 128M
    Maybe you can increase that directly in the cPanel accordingly.
    Contao Community Moderator
    → Support options

  15. #15
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    Change made. Still a 500 error.
    My feeling is that some of the core parts have not installed, but I'm not sure what would have come after the contao:install-web-dir directive.

  16. #16
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Have you tried again to run a package update in the Contao Manager?

    Otherwise, you can also execute these commands (in this order):

    Code:
    rm -rf var/cache/prod
    php vendor/bin/contao-console contao:install-web-dir --env=prod
    php vendor/bin/contao-console cache:clear --no-warmup --env=prod
    php vendor/bin/contao-console cache:clear --no-warmup --env=dev
    php vendor/bin/contao-console cache:warmup --env=prod
    php vendor/bin/contao-console assets:install web --symlink --relative --env=prod
    php vendor/bin/contao-console contao:install web --env=prod
    php vendor/bin/contao-console contao:symlinks web --env=prod
    Contao Community Moderator
    → Support options

  17. #17
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Furthermore, I would also try to rename your current web/.htaccess file to e.g. web/.htaccess.bak and create a new .htaccess file with the following directives only:

    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        <IfModule mod_headers.c>
            # Assets in /assets and /bundles either contain a hash in their filename
            # or are called with a ?version suffix, therefore cache them for 1 year.
            RewriteRule ^(assets|bundles)/ - [ENV=CONTAO_ASSETS:true]
            Header set Cache-Control "max-age=31536000" env=CONTAO_ASSETS
    
            # Allow CORS on the Contao TinyMCE skin.
            RewriteRule ^assets/tinymce4/js/skins/contao/fonts/ - [ENV=CONTAO_TINYMCE_SKIN:true]
            Header set Access-Control-Allow-Origin "*" env=CONTAO_TINYMCE_SKIN
        </IfModule>
    
        # Determine the RewriteBase automatically and set it as environment variable.
        # If you are using Apache aliases to do mass virtual hosting or installed the
        # project in a subdirectory, the base path will be prepended to allow proper
        # resolution of the index.php file and to redirect to the correct URI. It will
        # work in environments without path prefix as well, providing a safe, one-size
        # fits all solution. But as you do not need it in this case, you can comment
        # the following 2 lines to eliminate the overhead.
        RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
        RewriteRule ^(.*) - [E=BASE:%1]
    
        # Sets the HTTP_AUTHORIZATION header removed by Apache
        RewriteCond %{HTTP:Authorization} .
        RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect to URI without front controller to prevent duplicate content
        # (with and without `/index.php`). Only do this redirect on the initial
        # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
        # endless redirect loop (request -> rewrite to front controller ->
        # redirect -> request -> ...).
        # So in case you get a "too many redirects" error or you always get redirected
        # to the start page because your Apache does not expose the REDIRECT_STATUS
        # environment variable, you have 2 choices:
        # - disable this feature by commenting the following 2 lines or
        # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
        #   following RewriteCond (best solution)
        RewriteCond %{ENV:REDIRECT_STATUS} ^$
        RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
    
        # If the requested filename exists, simply serve it.
        # We only want to let Apache serve files and not directories.
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^ - [L]
    
        # Rewrite all other queries to the front controller.
        RewriteRule ^ %{ENV:BASE}/index.php [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
        <IfModule mod_alias.c>
            # When mod_rewrite is not available, we instruct a temporary redirect of
            # the start page to the front controller explicitly so that the website
            # and the generated links can still be used.
            RedirectMatch 302 ^/$ /index.php/
            # RedirectTemp cannot be used instead
        </IfModule>
    </IfModule>
    This one is the Contao's default .htaccess file.
    Contao Community Moderator
    → Support options

  18. #18
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    Package update fails with the same error as above (regarding contao:install-web-dir.)

    Additional Tests
    Maintenance > Composer Dependencies > Run Installer: I get the same error as when the Contao Manager first installed (regarding contao:install-web-dir.)

    Maintenance > Composer Dependencies > Update Composer, I get the following:

    composer update (using Resolver Cloud): [This section completes with a green check mark]
    Code:
    > Resolving dependencies using Composer Cloud v2.4.11
    !!! Current server is sponsored by: Contao Association !!!
    [6.4MiB/0.20s] Loading composer repositories with package information
    [6.8MiB/0.31s] Updating dependencies
    [559.0MiB/31.42s] Package operations: 173 installs, 0 updates, 0 removals
    [559.0MiB/31.42s]   - Installing composer/package-versions-deprecated (1.11.99.1)
    [559.0MiB/31.43s]   - Installing contao-components/installer (1.4.1)
    [559.0MiB/31.43s]   - Installing symfony/polyfill-php80 (v1.22.0)
    [559.0MiB/31.43s]   - Installing symfony/polyfill-php73 (v1.22.0)
    [559.0MiB/31.43s]   - Installing symfony/deprecation-contracts (v2.2.0)
    [559.0MiB/31.44s]   - Installing psr/log (1.1.3)
    [559.0MiB/31.44s]   - Installing symfony/polyfill-ctype (v1.22.0)
    [559.0MiB/31.44s]   - Installing symfony/polyfill-mbstring (v1.22.0)
    [559.0MiB/31.44s]   - Installing symfony/polyfill-php72 (v1.22.0)
    [559.0MiB/31.45s]   - Installing symfony/polyfill-intl-normalizer (v1.22.0)
    [559.0MiB/31.45s]   - Installing symfony/polyfill-intl-idn (v1.22.0)
    [559.0MiB/31.45s]   - Installing symfony/mime (v5.2.1)
    [559.0MiB/31.46s]   - Installing symfony/http-foundation (v4.4.18)
    [559.0MiB/31.46s]   - Installing symfony/http-client-contracts (v2.3.1)
    [559.0MiB/31.46s]   - Installing psr/container (1.0.0)
    [559.0MiB/31.47s]   - Installing symfony/event-dispatcher-contracts (v1.1.9)
    [559.0MiB/31.47s]   - Installing symfony/event-dispatcher (v4.4.18)
    [559.0MiB/31.47s]   - Installing symfony/var-dumper (v4.4.18)
    [559.0MiB/31.48s]   - Installing symfony/debug (v4.4.18)
    [559.0MiB/31.48s]   - Installing symfony/error-handler (v4.4.18)
    [559.0MiB/31.48s]   - Installing symfony/http-kernel (v4.4.18)
    [559.0MiB/31.49s]   - Installing symfony/service-contracts (v2.2.0)
    [559.0MiB/31.49s]   - Installing symfony/filesystem (v4.4.18)
    [559.0MiB/31.50s]   - Installing symfony/config (v4.4.18)
    [559.0MiB/31.50s]   - Installing symfony/routing (v4.4.18)
    [559.0MiB/31.50s]   - Installing symfony/dependency-injection (v4.4.18)
    [559.0MiB/31.51s]   - Installing contao/manager-plugin (2.11.0)
    [559.0MiB/31.51s]   - Installing symfony/options-resolver (v5.2.1)
    [559.0MiB/31.51s]   - Installing symfony/lock (v4.4.18)
    [559.0MiB/31.52s]   - Installing paragonie/random_compat (v9.99.99)
    [559.0MiB/31.52s]   - Installing psr/cache (1.0.1)
    [559.0MiB/31.53s]   - Installing symfony/var-exporter (v5.2.1)
    [559.0MiB/31.53s]   - Installing symfony/cache-contracts (v2.2.0)
    [559.0MiB/31.54s]   - Installing symfony/cache (v4.4.18)
    [559.0MiB/31.54s]   - Installing toflar/psr6-symfony-http-cache-store (3.0.1)
    [559.0MiB/31.54s]   - Installing psr/simple-cache (1.0.1)
    [559.0MiB/31.55s]   - Installing symfony/yaml (v4.4.18)
    [559.0MiB/31.55s]   - Installing twig/twig (v2.14.3)
    [559.0MiB/31.56s]   - Installing symfony/translation-contracts (v2.3.0)
    [559.0MiB/31.56s]   - Installing symfony/twig-bridge (v4.4.18)
    [559.0MiB/31.57s]   - Installing symfony/twig-bundle (v4.4.18)
    [559.0MiB/31.57s]   - Installing symfony/finder (v4.4.18)
    [559.0MiB/31.58s]   - Installing symfony/framework-bundle (v4.4.18)
    [559.0MiB/31.58s]   - Installing symfony/web-profiler-bundle (v4.4.18)
    [559.0MiB/31.59s]   - Installing symfony/polyfill-iconv (v1.22.0)
    [559.0MiB/31.59s]   - Installing doctrine/lexer (1.2.1)
    [559.0MiB/31.60s]   - Installing egulias/email-validator (2.1.25)
    [559.0MiB/31.60s]   - Installing swiftmailer/swiftmailer (v6.2.4)
    [559.0MiB/31.61s]   - Installing symfony/swiftmailer-bundle (v3.5.1)
    [559.0MiB/31.61s]   - Installing symfony/stopwatch (v4.4.18)
    [559.0MiB/31.62s]   - Installing symfony/security-core (v4.4.18)
    [559.0MiB/31.62s]   - Installing symfony/polyfill-intl-grapheme (v1.22.0)
    [559.0MiB/31.63s]   - Installing symfony/string (v5.2.1)
    [559.0MiB/31.63s]   - Installing symfony/property-info (v5.2.1)
    [559.0MiB/31.64s]   - Installing symfony/property-access (v5.2.1)
    [559.0MiB/31.64s]   - Installing symfony/security-http (v4.4.18)
    [559.0MiB/31.65s]   - Installing symfony/security-guard (v4.4.18)
    [559.1MiB/31.66s]   - Installing symfony/security-csrf (v5.2.1)
    [559.1MiB/31.66s]   - Installing symfony/security-bundle (v4.4.18)
    [559.1MiB/31.67s]   - Installing zendframework/zend-eventmanager (3.2.1)
    [559.1MiB/31.68s]   - Installing zendframework/zend-code (3.4.1)
    [559.1MiB/31.68s]   - Installing ocramius/proxy-manager (2.2.3)
    [559.1MiB/31.69s]   - Installing symfony/proxy-manager-bridge (v4.4.18)
    [559.1MiB/31.69s]   - Installing symfony/process (v4.4.18)
    [559.1MiB/31.70s]   - Installing monolog/monolog (1.26.0)
    [559.1MiB/31.71s]   - Installing symfony/monolog-bridge (v4.4.18)
    [559.1MiB/31.71s]   - Installing symfony/monolog-bundle (v3.6.0)
    [559.1MiB/31.72s]   - Installing symfony/http-client (v4.4.18)
    [559.1MiB/31.72s]   - Installing symfony/expression-language (v4.4.18)
    [559.1MiB/31.73s]   - Installing doctrine/event-manager (1.1.1)
    [559.1MiB/31.74s]   - Installing doctrine/collections (1.6.7)
    [559.1MiB/31.74s]   - Installing doctrine/cache (1.10.2)
    [559.1MiB/31.75s]   - Installing doctrine/annotations (1.11.1)
    [559.1MiB/31.75s]   - Installing doctrine/persistence (2.1.0)
    [559.1MiB/31.76s]   - Installing symfony/doctrine-bridge (v4.4.18)
    [559.1MiB/31.76s]   - Installing symfony/dotenv (v4.4.18)
    [559.1MiB/31.77s]   - Installing symfony/debug-bundle (v4.4.18)
    [559.1MiB/31.77s]   - Installing symfony/console (v4.4.18)
    [559.1MiB/31.78s]   - Installing composer/ca-bundle (1.2.8)
    [559.1MiB/31.78s]   - Installing ua-parser/uap-php (v3.9.14)
    [559.1MiB/31.79s]   - Installing nelmio/security-bundle (v2.10.1)
    [559.1MiB/31.79s]   - Installing nelmio/cors-bundle (2.1.0)
    [559.1MiB/31.80s]   - Installing symfony/translation (v4.4.18)
    [559.1MiB/31.80s]   - Installing lexik/maintenance-bundle (v2.1.5)
    [559.1MiB/31.81s]   - Installing psr/http-message (1.0.1)
    [559.1MiB/31.82s]   - Installing php-http/message-factory (v1.0.2)
    [559.1MiB/31.83s]   - Installing clue/stream-filter (v1.5.0)
    [559.1MiB/31.83s]   - Installing php-http/message (1.10.0)
    [559.1MiB/31.84s]   - Installing php-http/discovery (1.13.0)
    [559.1MiB/31.84s]   - Installing psr/http-factory (1.0.1)
    [559.1MiB/31.85s]   - Installing psr/http-client (1.0.1)
    [559.1MiB/31.85s]   - Installing php-http/promise (1.1.0)
    [559.1MiB/31.86s]   - Installing php-http/httplug (2.2.0)
    [559.1MiB/31.86s]   - Installing php-http/client-common (2.3.0)
    [559.1MiB/31.87s]   - Installing friendsofsymfony/http-cache (2.10.0)
    [559.1MiB/31.88s]   - Installing friendsofsymfony/http-cache-bundle (2.10.1)
    [559.1MiB/31.88s]   - Installing doctrine/sql-formatter (1.1.1)
    [559.1MiB/31.89s]   - Installing doctrine/dbal (2.12.1)
    [559.1MiB/31.90s]   - Installing doctrine/doctrine-bundle (2.2.2)
    [559.1MiB/31.91s]   - Installing patchwork/utf8 (v1.3.3)
    [559.1MiB/31.91s]   - Installing wikimedia/less.php (1.8.2)
    [559.1MiB/31.92s]   - Installing webignition/disallowed-character-terminated-string (2.0)
    [559.1MiB/31.93s]   - Installing webignition/robots-txt-file (3.0)
    [559.1MiB/31.93s]   - Installing true/punycode (v2.1.1)
    [559.1MiB/31.94s]   - Installing terminal42/service-annotation-bundle (1.1.3)
    [559.1MiB/31.95s]   - Installing symfony/dom-crawler (v4.4.18)
    [559.1MiB/31.95s]   - Installing nyholm/psr7 (1.3.2)
    [559.1MiB/31.96s]   - Installing terminal42/escargot (1.0.1)
    [559.1MiB/31.96s]   - Installing symfony/asset (v4.4.18)
    [559.1MiB/31.97s]   - Installing symfony-cmf/routing (2.3.3)
    [559.1MiB/31.97s]   - Installing symfony-cmf/routing-bundle (2.4.2)
    [559.1MiB/31.98s]   - Installing thecodingmachine/safe (v1.3.3)
    [559.1MiB/31.98s]   - Installing paragonie/constant_time_encoding (v2.4.0)
    [559.1MiB/31.99s]   - Installing beberlei/assert (v3.3.0)
    [559.1MiB/31.99s]   - Installing spomky-labs/otphp (v10.0.1)
    [559.1MiB/32.00s]   - Installing simplepie/simplepie (1.5.6)
    [559.1MiB/32.00s]   - Installing scssphp/scssphp (v1.4.1)
    [559.1MiB/32.01s]   - Installing lcobucci/jwt (3.4.2)
    [559.1MiB/32.01s]   - Installing scheb/two-factor-bundle (v4.18.4)
    [559.1MiB/32.02s]   - Installing ramsey/uuid (3.9.3)
    [559.1MiB/32.03s]   - Installing phpunit/php-token-stream (4.0.4)
    [559.1MiB/32.03s]   - Installing phpspec/php-diff (v1.1.3)
    [559.1MiB/32.04s]   - Installing michelf/php-markdown (1.9.0)
    [559.1MiB/32.05s]   - Installing matthiasmullie/path-converter (1.1.3)
    [559.1MiB/32.06s]   - Installing matthiasmullie/minify (1.3.66)
    [559.2MiB/32.07s]   - Installing league/uri-parser (1.4.1)
    [559.2MiB/32.07s]   - Installing league/uri-interfaces (1.1.1)
    [559.2MiB/32.08s]   - Installing league/uri-schemes (1.2.1)
    [559.2MiB/32.09s]   - Installing league/uri-hostname-parser (1.1.1)
    [559.2MiB/32.09s]   - Installing league/uri-components (1.8.2)
    [559.2MiB/32.10s]   - Installing knplabs/knp-time-bundle (v1.14.0)
    [559.2MiB/32.11s]   - Installing knplabs/knp-menu (v3.1.2)
    [559.2MiB/32.12s]   - Installing knplabs/knp-menu-bundle (v3.1.0)
    [559.2MiB/32.13s]   - Installing imagine/imagine (1.2.4)
    [559.2MiB/32.14s]   - Installing dragonmantank/cron-expression (v2.3.1)
    [559.2MiB/32.15s]   - Installing doctrine/instantiator (1.4.0)
    [559.2MiB/32.16s]   - Installing doctrine/inflector (2.0.3)
    [559.2MiB/32.16s]   - Installing doctrine/common (3.1.0)
    [559.2MiB/32.17s]   - Installing doctrine/orm (2.8.1)
    [559.2MiB/32.18s]   - Installing contao/imagine-svg (1.0.2)
    [559.2MiB/32.18s]   - Installing webmozart/assert (1.9.1)
    [559.2MiB/32.19s]   - Installing webmozart/path-util (2.3.0)
    [559.2MiB/32.20s]   - Installing contao/image (1.0.3)
    [559.2MiB/32.21s]   - Installing contao-components/tinymce4 (4.9.12)
    [559.2MiB/32.22s]   - Installing contao-components/tablesorter (2.31.3)
    [559.2MiB/32.22s]   - Installing contao-components/tablesort (4.0.1)
    [559.2MiB/32.23s]   - Installing contao-components/swipe (2.2.0)
    [559.2MiB/32.24s]   - Installing contao-components/simplemodal (2.1.1)
    [559.2MiB/32.25s]   - Installing contao-components/mootools (1.6.0.6)
    [559.2MiB/32.26s]   - Installing contao-components/mediabox (1.5.5)
    [559.2MiB/32.27s]   - Installing contao-components/jquery-ui (1.12.1.1)
    [559.2MiB/32.28s]   - Installing contao-components/jquery (3.5.1)
    [559.2MiB/32.29s]   - Installing contao-components/highlight (9.18.1)
    [559.2MiB/32.30s]   - Installing contao-components/dropzone (5.7.2)
    [559.2MiB/32.30s]   - Installing contao-components/datepicker (2.3.1)
    [559.2MiB/32.31s]   - Installing contao-components/contao (9.1.1)
    [559.2MiB/32.32s]   - Installing contao-components/colorpicker (1.5.1)
    [559.2MiB/32.32s]   - Installing contao-components/colorbox (1.6.6)
    [559.2MiB/32.33s]   - Installing contao-components/chosen (1.2.4)
    [559.2MiB/32.34s]   - Installing contao-components/ace (1.4.12)
    [559.2MiB/32.34s]   - Installing dasprid/enum (1.0.3)
    [559.2MiB/32.35s]   - Installing bacon/bacon-qr-code (2.0.3)
    [559.2MiB/32.36s]   - Installing ausi/slug-generator (v1.1.1)
    [559.2MiB/32.37s]   - Installing contao/core-bundle (4.9.10)
    [559.2MiB/32.38s]   - Installing contao/installation-bundle (4.9.10)
    [559.2MiB/32.39s]   - Installing contao/manager-bundle (4.9.10)
    [559.2MiB/32.39s]   - Installing contao/calendar-bundle (4.9.10)
    [559.2MiB/32.40s]   - Installing contao/comments-bundle (4.9.10)
    [559.2MiB/32.41s]   - Installing contao/faq-bundle (4.9.10)
    [559.2MiB/32.42s]   - Installing contao/listing-bundle (4.9.10)
    [559.2MiB/32.43s]   - Installing contao/news-bundle (4.9.10)
    [559.2MiB/32.45s]   - Installing contao/newsletter-bundle (4.9.10)
    [559.2MiB/32.46s]   - Installing contao/conflicts (dev-master b1bab2b)
    [551.5MiB/32.47s] <warning>Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.</warning>
    [551.5MiB/32.47s] <warning>Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.</warning>
    [551.5MiB/32.47s] <warning>Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.</warning>
    [551.5MiB/32.47s] <warning>Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.</warning>
    [552.9MiB/32.49s] 82 packages you are using are looking for funding.
    [552.9MiB/32.49s] Use the `composer fund` command to find out more!
    [553.3MiB/32.49s] Memory usage: 553.3MB (peak: 2446.49MB), time: 32.5s.
    [553.3MiB/32.49s] Finished Composer Cloud resolving.
    # Job ID xA4TLEWaXGFPzPRP9o1UFrrxVmO2c1U30pD1yAHUWJ8xrWOkqg7wf9qsd1cQJv4N3gyBrRi7mshN completed in 29 seconds
    # Memory usage: 553.3MB (peak: 2446.49MB), time: 32.5s.
    Then the composer install: [exits with error and a red X]
    Code:
    $ /usr/local/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=UTC /home/oldberwi/contao/contao/web/contao-manager.phar.php composer install --prefer-dist --no-dev --no-progress --no-suggest --no-ansi --no-interaction --optimize-autoloader
    composer/package-versions-deprecated: Generating version class...
    composer/package-versions-deprecated: ...done generating version class
    # Process terminated with exit code 143
    # Result: Termination (request to terminate) [signal 15]
    I will try your SSH code next. Standby...

  19. #19
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    With regards to the following commands:
    Code:
    rm -rf var/cache/prod
    php vendor/bin/contao-console contao:install-web-dir --env=prod
    php vendor/bin/contao-console cache:clear --no-warmup --env=prod
    php vendor/bin/contao-console cache:clear --no-warmup --env=dev
    php vendor/bin/contao-console cache:warmup --env=prod
    php vendor/bin/contao-console assets:install web --symlink --relative --env=prod
    php vendor/bin/contao-console contao:install web --env=prod
    php vendor/bin/contao-console contao:symlinks web --env=prod
    This line
    Code:
    php vendor/bin/contao-console cache:clear --no-warmup --env=dev
    output the following:
    Code:
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/oldberwi/contao/contao/vendor/symfony/cache/Adapter/TagAwareAdapter.php on line 337
    Symfony\Component\ErrorHandler\Error\OutOfMemoryError^ {#3266
      -error: array:4 [
        "type" => 1
        "message" => "Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes)"
        "file" => "/home/oldberwi/contao/contao/vendor/symfony/cache/Adapter/TagAwar eAdapter.php"
        "line" => 337
      ]
      #message: "Error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes)"
      #code: 0
      #file: "./vendor/symfony/cache/Adapter/TagAwareAdapter.php"
      #line: 337
    }
    All other lines did not produce any output.

  20. #20
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    I already told you that a PHP memory limit of 32 MB is much too low. The problems are pretty much all due to the limited memory. Please increase the PHP memory limit to at least 128 MB (or more).
    Contao Community Moderator
    → Support options

  21. #21
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    When I look at the PHPInfo(), memory_limit it is set to 512M. I'm not sure what or how to change where this script is getting it's directive for 32M...

  22. #22
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,278

    Default

    Does this block still exist in your .htaccess?

    Code:
    # BEGIN cPanel-generated php ini directives, do not edit
    # Manual editing of this file may result in unexpected behavior.
    # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    <IfModule php7_module>
       php_flag display_errors Off
       php_value max_execution_time 30
       php_value max_input_time 60
       php_value max_input_vars 1000
       php_value memory_limit 32M
       php_value post_max_size 8M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
       php_value upload_max_filesize 2M
       php_flag zlib.output_compression Off
    </IfModule>
    <IfModule lsapi_module>
       php_flag display_errors Off
       php_value max_execution_time 30
       php_value max_input_time 60
       php_value max_input_vars 1000
       php_value memory_limit 32M
       php_value post_max_size 8M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
       php_value upload_max_filesize 2M
       php_flag zlib.output_compression Off
    </IfModule>
    # END cPanel-generated php ini directives, do not edit
    The PHP memory limit is set there to
    Code:
    php_value memory_limit 32M
    Contao Community Moderator
    → Support options

  23. #23
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    No. The limit has been updated to 512M since back when you first requested that the memory be increased.

  24. #24
    Official Contao Team andreas.schempp's Avatar
    Join Date
    06-10-09.
    Posts
    63

    Default

    increasing the memory limit in your .htaccess file will not affect the command line PHP version. You need to update the php.ini or create a specific php.ini in the contao-manager folder.
    terminal42 gmbh
    We are Contao Premium-Partner! For Isotope eCommerce support check out the Isotope Circle.

  25. #25
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    I was able to test the individual script commands above by adding -d memory_limit=128M to the front end of the commands, which effectively alters the memory limit per instance.
    Code:
    php -d memory_limit=128M vendor/bin/contao-console cache:clear --no-warmup --env=dev
    This script completed successfully, which confirms, at least in this instance, the memory limit is the issue. Until the memory limit has been increased as a directive in the php.ini file, we won't be able to verify if the "contao:install-web-dir" is also a memory issue or something else.

    I am working with the hosting company to increasing the memory limit for php commands. MultiPHP directives apply to locally executed scripts, but the Composer commands being executed via command line are working with the core php.ini file which sets the memory_limit directive to 32M by default. Not sure what they will do about this as they don't seem to have a clear path to a solution yet.

    I gave them a step by step outline on the process for installation of the Contao Manager - they'll be looking at this more closely in the coming days to see exactly where the hangups are when they perform their own install. I imagine there is no way to preface all Composer commands with the "-d memory_limit=128M" as a global variable for the system to include with each php command...?

    If you have any suggestions I should offer up to the hosting company to solve this problem, I'm all ears. Additionally, if there is any alternative ways to perform the installation, I would be eager to try it. Would like to know that Contao is a viable options for future projects as it has great potential, but if we can't get past this hurdle for install or updating future versions, we won't be able to utilize Contao CMS on shared hosting setups, unfortunately.

  26. #26
    New user
    Join Date
    01-10-21.
    Posts
    17

    Default

    Host corrected the php directive for SSH access, which is different than directives set using MultiPHP, if using a shared host.
    Memory issues certainly the problem; got 4.9 installed now without issue with memory_limit set to 128M.

    Recommendation for installation: check the memory_limit directive setting via SSH; if set to 32M, increase to 128M.

    This check would be a great addition to the Contao installer to alleviate some headaches when reaching some cryptic errors due to insufficient memory.

    Thank you for your help!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •