Problem with Installation

Good Day

I’m trying to install Gibbon and having followed the instructions at https://docs.gibbonedu.org/administrators/getting-started/installing-gibbon/install-ubuntu-debian/, I try to access the web interface and I get an error.

It seems as if there’s a rewrite of the URL that has placed an additional /installer/ in the URL.

My environment is as follows:
Ubuntu Server 18.04.4 LTS
Gibbon v19.0.00
Nginx
MySQL
Php 7.2

Any help would be appreciated. Thanks in advance.

Hi DaFresh,

Are you able to try visiting 192.168.0.15 directly, and be sure to not include the /installer in the url, this is added automatically by the installer re-direct. There aren’t any rewrite rules in the install process, so in theory the /installer/install.php should only be redirected once when accessing the root directory.

Hello Sandra

Yes, just the raw IP, 192.168.0.15 and then it gives me the URL rewrite with the double installer in the path.

I tried to fiddle around and realized that the gibbon.php file has a rewrite in there.

// Handle Gibbon installation redirect
if (!$gibbon->isInstalled() && !$gibbon->isInstalling()) {
header(“Location: ./installer/install.php”);
exit;
}

I tried fooling around with that header string but no dice.

Location: /installer/install.php - Gives the error “The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”

Location: installer/install.php - Gives the same double installer in the URL path and the 404 error.

The only thing I can think of, is maybe the problem is in the server block in the nginx configuration file

server {
listen 80;
server_name _;
root /var/www/gibbon;
index index.php;

access_log /var/log/nginx/gibbon-access.log;
error_log /var/log/nginx/gibbon-error.log;

client_max_body_size 100M;

autoindex off;

location / {
    try_files $uri $uri/ /index.php;
 }

location ~ \\.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;
}

}

As I don’t know much about php or programming, i’m just throwing stuff against the wall and seeing if anything sticks :slight_smile:

Sandra

By the grace of God i’ve found the problem and thus the solution.

In my nginx server block under location ~\.php$, was the line “include snippets/fastcgi-php.conf” and it was this file that was causing nginx to not properly redirect as intended.

More specifically, two lines in that file caused the problem:

set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;

By commenting out those two lines, then the page loaded without issue.

Because that snippet has always been there and all other sites work okay, I didn’t want to comment out those lines in that file and possibly break another site, so I just took all the other entries from the fastcgi-conf file and placed them in the location block and left the file as is. So the location block now looks like this:

    location ~ \\.php$ {
            fastcgi_split_path_info ^(.+\\.php)(/.+)$;
            try_files $fastcgi_script_name =404;
            fastcgi_index index.php;
            include fastcgi.conf;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }

Thanks for the assist regardless, now lemme finally put Gibbon through the paces.