Componser install problems

IM tryig to install ELGG on Ubuntu 18.04 with NGINX so im followig the steps on the ELGG install page



  • Hi sorry i solved it, i had the wrong version of something, but now im getting this other error when i try to access the index.php file for the first time

    2020/05/12 09:55:56 [error] 22816#22816: *6 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client:, server:, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: ""


    I executed these steps, so dont know which version it got


    cd /path/to/wwwroot/
    composer self-update
    composer global require "fxp/composer-asset-plugin:~1.3"
    composer create-project elgg/starter-project:dev-master .
    composer install


    When i access the website i get error 502 BAD GATEWAY in the browser, the server log gave that error above.

  • My NGINX config file


    Elgg Nginx configuration. Customize and put into /etc/nginx/sites-enabled

    # Rewrite http://(www.)? to

    #server {
    #   listen 80;
    #   server_name;
    #   rewrite ^$request_uri permanent;

    # Rewrite to

    #server {
    #   include /etc/nginx/ssl.conf;
    #   server_name;
    #   rewrite ^$request_uri? permanent;

    server {
        listen 80;

        # Server root, replace it with your elgg installation location
        root /var/www/html/elgg;
        index index.php index.html index.htm;

        gzip on;
            # text/html is always compressed by HttpGzipModule

        # Server logs, replace it with your project names

        # Server logs, replace it with your project names
        error_log /var/log/nginx/error.log error;
        access_log /var/log/nginx/access.log;

        # Max post size
        client_max_body_size 8M;

        location ~ (^\.|/\.) {
            return 403;

        location = /rewrite.php {
            rewrite ^(.*)$ /install.php;

        location / {
            try_files $uri $uri/ @elgg;

        # pass the PHP scripts to FastCGI server listening on
        location ~ \.php$ {
            try_files $uri @elgg;
            fastcgi_index index.php;
            fastcgi_pass localhost:9000;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;

        location @elgg {
            fastcgi_pass localhost:9000;

            include /etc/nginx/fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root/index.php;
            fastcgi_param SCRIPT_NAME     /index.php;
            fastcgi_param QUERY_STRING    __elgg_uri=$uri&$args;



  • FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

    Check your ALL paths:

     root /var/www/html/elgg;
    ​fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  • The thing i dont like about the CLI part of the installation "sudo vendor/bin/elgg-cli install"

    is that If you make a mistake after you type that, so you try to run it again, it doesnt ask you the same questions the second time, so you cant fix it, it just runs thru everything and then keeps giving the same error.


    Like i got the database name wrong, so i try to run the elgg-cli install again, but it doesnt ask me for database name it just runs thru to the end and gives an error.

    So now im unable to change the database name because i typed it wrong the first time i ran that command because i didnt know weather it wanted an existing database, or it would try to create  new one. So i gave it a new  database name that doesnt exist and it gave an error, so i try to run the command again, but now it doesnt ask me anything, it just runs to the end and gives error that it cant connect to the database.

    Now Im stuck



  • Thanks for you help, i change the database name in the settings.php

    Maybe i should start the installation over from scratch?

    when i run the elgg-cli  install

    An error occured during the execution of the command 'vendor/bin/elgg-cli': An exception occurred while executing 'SELECT * FROM config':

    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'elgg_db.config' doesn't exist




  • C'mon... 

    Delete all your www and database content.

    And run the fresh install.

    Believe me, it's easier than you're gonna ask us again about your errors.