Repository: YOURLS/YOURLS

Issue #2350: Unable to get YOURLS to install [Uncaught PDOException] on nginx
Created: 2018-01-08T19:56:11Z
Technical details regarding my environment

YOURLS version: 1.7.3 Fresh install

Plugins enabled: None


PHP version:  7.0.22-0ubuntu0.16.04.1
Any other useful information depending on context (server OS & version, MySQL version, browser version, …)
Nginx version: 1.10.3-0ubuntu0.16.04.2

Bug description
What is the current behavior?
When I'm trying to install a fresh instance of YOURLS, I get everything set up and working and click "Install YOURLS", at which point the browser returns a 500 error.  Looking at the error log, it looks like this is being caused by something in PDO:
     2018/01/08 19:42:35 [error] 21546#21546: *5 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or acces$ Stack trace: #0 /usr/share/nginx/YOURLS/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute() #1 /usr/share/nginx/YOURLS/includes/functions-install.php(252): Aura\Sql\ExtendedPdo->perform('CREATE TABLE IF...') #2 /usr/share/nginx/YOURLS/admin/install.php(46): yourls_create_sql_tables() #3 {main} thrown in /usr/share/nginx/YOURLS/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748" while reading response header from upstream, client: 173.239.228.14$
This is a bug because…
What is the expected or desired behavior?
It shouldn't throw an exception and install should complete.
Reproducible bug summary


I've double checked by DB credentials, and they look good.  My nginx config looks like this (with server details removed)
# Rewrites
  location / {
    # Try static files, then yourls-loader.php
    try_files $uri $uri/ /yourls-loader.php?$args;
  }
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php7.0-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        include /etc/nginx/fastcgi.conf;
     }


What am I missing?

Duplicate issue #2564: HTTP ERROR 500 when clicking on install.
Created: 2019-10-09T10:54:15Z
I have installed yourls on my Ubuntu Server with LEMP Stack, and configured the config file. When i go on the webpage and click the "install button" i get a HTTP ERROR 500.
Steps to reproduce the behavior:

Configure yourls on Ubuntu 18.04 with LEMP Stack
Try to install yourls on domain/admin/install.php

Expected behavior
It should start some kind of setup.
Actual behavior
I get a HTTP ERROR 500
Screenshots
Video
Versions
yourls 1.7.4
ubuntu 18.04
mariadb 15.4
nginx 1.14.0 (ubuntu)
php7.2
output in error.log:
`PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes in /srv/YOURLS/includes/vendor/aura/s$
Stack trace:
#0 /srv/YOURLS/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute()
#1 /srv/YOURLS/includes/functions-install.php(252): Aura\Sql\ExtendedPdo->perform('CREATE TABLE IF...')
#2 /srv/YOURLS/admin/install.php(46): yourls_create_sql_tables()
#3 {main}
thrown in /srv/YOURLS/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748" while reading response header from upstream, client: IP, server: DOMAIN, request: "POST /admin/install.php? HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "DOMAIN", referrer: "http://DOMAIN/admin/install.php"
`

Closing comment (2019-10-09T11:39:40Z): Duplicate of #2350, #2394, #2431, maybe more. Workaround details in #2115.