The modern, privacy-aware URL Shortener built in PHP.

Overview

Build Status StyleCI Status GitHub GitHub release

About UrlHum

UrlHum is a modern, privacy-aware and fast URL Shortener built with PHP and the Laravel Framework. At the moment UrlHum is heavily under development, so we recommend you to don't use it in production.

UrlHum Screenshot

If you want, you can join our official Telegram Group.

What are UrlHum features?

UrlHum provides you advanced privacy-oriented options, such as IP hashing and anonymizing. More, you control pretty anything from the admin panel: you can decide if an unauthenticated user must be able to create a Short URL, if disallowing certain Short URLs from being created and so much more!

UrlHum offers in-depth analytics while still respecting users privacy. You can see clicks, real clicks, countries visits and HTTP referers from the admin panel. To view an URL analytics, it's enough to add a + after the Short URL!

How to install UrlHum?

You can learn how to install UrlHum following the documentation we provide.

Contributing

Thank you for considering contributing to UrlHum. You can send a pull request and we will take a look at it!

License

UrlHum is open source and is licensed under the MIT License

Comments
  • [Bug] Index length limit

    [Bug] Index length limit

    Describe the bug The installation fail during the database creation.

    www-data@urlhum:~/html$ php artisan migrate
    **************************************
    *     Application In Production!     *
    **************************************
    
     Do you really wish to run this command? (yes/no) [no]:
     > yes
    
    Migration table created successfully.
    Migrating: 2014_10_12_000000_create_users_table
    
       Illuminate\Database\QueryException  : SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. (SQL: alter table `users` add unique `users_email_unique`(`email`))
    

    To Reproduce Steps to reproduce the behavior:

    1. Use mariadb database this limitation is link to the default database innoDB and the char-set you use (utf8mb4_bin)

    The best is to reduce the index length or to use the char-set utf8_bin.

    Best regards, Az

    bug 
    opened by azlux 12
  • Site has no design for me.

    Site has no design for me.

    Hello, i installed successfully UrlHum on my webserver (Shared Hosting, HawkHost) after installation i visited "myurl.com/UrlHum/public" and what i see is: https://depressive.club/ZLe.png

    i dont see any design or anything what could it be?

    opened by Azocki 10
  • [Request] Clarify the difference between clicks and real clicks and views

    [Request] Clarify the difference between clicks and real clicks and views

    Its unclear to me as a user, what the difference is between clicks and real clicks, and also what is the difference between clicks and views.

    Make this clearer, either by documenting it or by reducing complexity and only talk about one kind of interactions: Since this project is only counting url requests and is not a usage analytics tool inside of a website (e.g. google analytics) with custom javascript, only talks about clicks and not views.

    As a user I am confused about what is shown on the analytics page of a shortened URL.

    feature request waiting opinions 
    opened by erdmenchen 7
  • No public forder

    No public forder

    To begin the installation, login into your server and configure Apache or Nginx to work with the new project. Remember: the root directory must point to app/public

    404 Not Found nginx/1.14.0 (Ubuntu)

    app$ ls Analytics.php Console DeletedUrls.php Exceptions Http IpAnonymizer.php Providers Rules Services Settings.php Url.php User.php ViewUrl.php

    documentation 
    opened by CarlosCasasnova 5
  • Got some errors when running docker-compose

    Got some errors when running docker-compose

    I got these errors when running UrlHum with docker-compose :

    `error: /usr/src/php/ext/php-gd does not exist

    usage: /usr/local/bin/docker-php-ext-install [-jN] ext-name [ext-name ...] ie: /usr/local/bin/docker-php-ext-install gd mysqli /usr/local/bin/docker-php-ext-install pdo pdo_mysql /usr/local/bin/docker-php-ext-install -j5 gd mbstring mysqli pdo pdo_mysql shmop

    if custom ./configure arguments are necessary, see docker-php-ext-configure

    Possible values for ext-name: bcmath bz2 calendar ctype curl dba dom enchant exif ffi fileinfo filter ftp gd gettext gmp hash iconv imap intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zend_test zip

    Some of the above modules are already compiled into PHP; please check the output of "php -i" to see which modules are already loaded. ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c apk add --no-cache composer && docker-php-ext-install mysqli pdo pdo_mysql php-gd' returned a non-zero code: 1 I addgdto end of docker-php-ext-install command then resolved:RUN apk add --no-cache composer && docker-php-ext-install mysqli pdo pdo_mysql gd`

    After that got error about 'zlib' and libpng-dev that required by 'virtual:world'. Added zlib-dev and libpng-dev to apk add resolved these errors.

    RUN apk add --no-cache composer zlib-dev libpng-dev

    Finally changes in line number 4 of Dockerfile to below line resolved my issue RUN apk add --no-cache composer zlib-dev libpng-dev && docker-php-ext-install mysqli pdo pdo_mysql gd

    bug 
    opened by MParvin 4
  • [Bug] QR Code is showing wrong url on scan

    [Bug] QR Code is showing wrong url on scan

    Describe the bug When trying to scan a QR code of a shortened url, it points to e.g. https://localhost/1 and not the real shortened url.

    To Reproduce Just try to open any generated QR code with current state of main branch.

    Expected behavior QR code should point to the shortened url.

    Additional context Bug is in App\Http\Controllers\QRCodeController, it uses the wrong parameter for $url:

    $qrCode = QrCode::format($format)->size(300)->generate(route('click', $url));
    
    should be
    
    $qrCode = QrCode::format($format)->size(300)->generate(route('click', $url->short_url));
    

    Source: https://github.com/urlhum/UrlHum/blob/5d0dead1158fe01505ce833c2333057a98afaddc/app/Http/Controllers/QRCodeController.php#L68

    opened by erdmenchen 2
  • Adding more missing steps to Dockerfile

    Adding more missing steps to Dockerfile

    Hi, while trying to use urlhum via the provided docker-compose.yml I encountered some problems during the build and fixed them via trial and error.

    Problems discovered

    Missing dependencys

    Missing php-gd

    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Installation request for simplesoftwareio/simple-qrcode 2.0.0 -> satisfiable by simplesoftwareio/simple-qrcode[2.0.0].
        - simplesoftwareio/simple-qrcode 2.0.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
    
      To enable extensions, verify that they are enabled in your .ini files:
        -
        - /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini
        - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
        - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
      You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
    ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c composer install' returned a non-zero code:
    

    Fixed by adding gd to the php-ext part of line 4 Making it: RUN apk add --no-cache composer && docker-php-ext-install mysqli pdo pdo_mysql gd

    Missing zlib

    configure: error: Package requirements (zlib) were not met:
    
    Package 'zlib', required by 'virtual:world', not found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables ZLIB_CFLAGS
    and ZLIB_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c apk add --no-cache composer && docker-php-ext-install mysqli pdo pdo_mysql gd' returned a non-zero code: 1:
    

    Fixed by adding zlib-dev to the apk add part of line 4 Making it: RUN apk add --no-cache composer zlib-dev && docker-php-ext-install mysqli pdo pdo_mysql gd

    Missing libpng

    configure: error: Package requirements (libpng) were not met:
    
    Package 'libpng', required by 'virtual:world', not found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables PNG_CFLAGS
    and PNG_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c apk add --no-cache composer zlib-dev && docker-php-ext-install mysqli pdo pdo_mysql gd' returned a non-zero code: 1
    

    Fixed by adding libpng-dev to the apk add part of line 4 Making it: RUN apk add --no-cache composer zlib-dev libpng-dev && docker-php-ext-install mysqli pdo pdo_mysql gd

    No JS and CSS Sources found when connecting directly to the urlhum container

    Fixed by

    • adding nodejs npm to the apk add part of line 4
      • Making it: RUN apk add --no-cache composer zlib-dev libpng-dev nodejs npm && docker-php-ext-install mysqli pdo pdo_mysql gd
    • adding a step for installing all the node modules after running the composer install
    • adding a step for building the assets after installing the node modules
    opened by nicolaiort 2
  • Found Some missing dependencys

    Found Some missing dependencys

    Hi, while trying to use urlhum via the provided docker-compose.yml I encountered some problems during the build and fixed them via trial and error.

    Problems discovered

    Missing php-gd

    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Installation request for simplesoftwareio/simple-qrcode 2.0.0 -> satisfiable by simplesoftwareio/simple-qrcode[2.0.0].
        - simplesoftwareio/simple-qrcode 2.0.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
    
      To enable extensions, verify that they are enabled in your .ini files:
        -
        - /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini
        - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
        - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
      You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
    ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c composer install' returned a non-zero code:
    

    Fixed by adding gd to the php-ext part of line 4 Making it: RUN apk add --no-cache composer && docker-php-ext-install mysqli pdo pdo_mysql gd

    Missing zlib

    configure: error: Package requirements (zlib) were not met:
    
    Package 'zlib', required by 'virtual:world', not found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables ZLIB_CFLAGS
    and ZLIB_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c apk add --no-cache composer && docker-php-ext-install mysqli pdo pdo_mysql gd' returned a non-zero code: 1:
    

    Fixed by adding zlib-dev to the apk add part of line 4 Making it: RUN apk add --no-cache composer zlib-dev && docker-php-ext-install mysqli pdo pdo_mysql gd

    Missing libpng

    configure: error: Package requirements (libpng) were not met:
    
    Package 'libpng', required by 'virtual:world', not found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables PNG_CFLAGS
    and PNG_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ERROR: Service 'urlhum' failed to build: The command '/bin/sh -c apk add --no-cache composer zlib-dev && docker-php-ext-install mysqli pdo pdo_mysql gd' returned a non-zero code: 1
    

    Fixed by adding libpng-dev to the apk add part of line 4 Making it: RUN apk add --no-cache composer zlib-dev libpng-dev && docker-php-ext-install mysqli pdo pdo_mysql gd

    I am of course open for discussion and also joining the Telegram Group :)

    opened by nicolaiort 2
  • Add QR Code Feature

    Add QR Code Feature

    This adds an .svg and .png QR code by navigating to /{shortcode}.svg or /{shortcode}.png This image is created on first fetch and then cached to the storage('qrcodes') directory.

    Right now this is accessed in the UI through the Analytics ({shortcode}+) and Edit (url/{shortcode}) pages.

    opened by michaellindahl 2
  • API access with API key

    API access with API key

    Each user should have the ability to get an api key, which they can use to shorten urls with using a singleGET request.

    This will allow us to integrate UrlHum with a lot of apps, e.g. DropShare - See the paragraph with "Compatible (open source) URL shorteners"

    feature request 
    opened by davidolrik 2
  • Using UrlHum with Postgres results in internal server errors

    Using UrlHum with Postgres results in internal server errors

    When using PostgreSQL as database, all pages that use queries with IFNULL results in internal an server error as this is a MySQL only function.

    As a temporary workaround I have changed it to COALESCE locally.

    I suggest moving this logic into the application and handle the possibility of null in code using something like $value ?? "default".

    enhancement 
    opened by davidolrik 2
  • Bump json5 from 1.0.1 to 1.0.2

    Bump json5 from 1.0.1 to 1.0.2

    Bumps json5 from 1.0.1 to 1.0.2.

    Release notes

    Sourced from json5's releases.

    v1.0.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295). This has been backported to v1. (#298)
    Changelog

    Sourced from json5's changelog.

    Unreleased [code, diff]

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump terser from 4.8.0 to 4.8.1

    Bump terser from 4.8.0 to 4.8.1

    Bumps terser from 4.8.0 to 4.8.1.

    Changelog

    Sourced from terser's changelog.

    v4.8.1 (backport)

    • Security fix for RegExps that should not be evaluated (regexp DDOS)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump guzzlehttp/guzzle from 7.3.0 to 7.4.5

    Bump guzzlehttp/guzzle from 7.3.0 to 7.4.5

    Bumps guzzlehttp/guzzle from 7.3.0 to 7.4.5.

    Release notes

    Sourced from guzzlehttp/guzzle's releases.

    Release 7.4.5

    See change log for changes.

    Release 7.4.4

    See change log for changes.

    Release 7.4.3

    See change log for changes.

    Release 7.4.2

    See change log for changes.

    Release 7.4.1

    See change log for changes.

    Release 7.4.0

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/guzzle's changelog.

    7.4.5 - 2022-06-20

    • Fix change in port should be considered a change in origin
    • Fix CURLOPT_HTTPAUTH option not cleared on change of origin

    7.4.4 - 2022-06-09

    • Fix failure to strip Authorization header on HTTP downgrade
    • Fix failure to strip the Cookie header on change in host or HTTP downgrade

    7.4.3 - 2022-05-25

    • Fix cross-domain cookie leakage

    7.4.2 - 2022-03-20

    Fixed

    • Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
    • Reject non-HTTP schemes in StreamHandler
    • Set a default ssl.peer_name context in StreamHandler to allow force_ip_resolve

    7.4.1 - 2021-12-06

    Changed

    • Replaced implicit URI to string coercion #2946
    • Allow symfony/deprecation-contracts version 3 #2961

    Fixed

    • Only close curl handle if it's done #2950

    7.4.0 - 2021-10-18

    Added

    Fixed

    • Make sure we always call restore_error_handler() #2915
    • Fix progress parameter type compatibility between the cURL and stream handlers #2936
    • Throw InvalidArgumentException when an incorrect headers array is provided #2916, #2942

    Changed

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies php 
    opened by dependabot[bot] 0
  • [Bug] PHP 8 not supported

    [Bug] PHP 8 not supported

    Hello, I love your project but when I want to install it (with composer install), I am told that PHP 7.1.3 is mandatory but I have version 8.0.20... Would it be possible to update your project to the latest version of PHP ? image Thank you in advance, Doncellup

    opened by Doncellup 5
  • [Bug] SQLite Database Type no longer supported

    [Bug] SQLite Database Type no longer supported

    Describe the bug Prior to the release that added the 2021_08_23_082401_increase_long_url_length migration, UrlHum worked great on installations that used SQLite. I've used this so that when deploying on shared hosting, the application doesn't have to make a network request to an external MySQL server and instead can just make a filesystem request. I understand under high loads this may be sub optional. It would be great if SQLite and MySQL could both be supported.

    To Reproduce Run php artisan migrate. See:

    Migrating: 2021_08_23_082401_increase_long_url_length
    
       Illuminate\Database\QueryException 
    
      SQLSTATE[HY000]: General error: 1 near "DROP": syntax error (SQL: ALTER TABLE `urls` DROP INDEX `urls_long_url_unique`;)
    
      at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
        708▕         // If an exception occurs when attempting to run a query, we'll format the error
        709▕         // message to include the bindings with SQL, which will make this exception a
        710▕         // lot more helpful to the developer instead of just the database's errors.
        711▕         catch (Exception $e) {
      ➜ 712▕             throw new QueryException(
        713▕                 $query, $this->prepareBindings($bindings), $e
        714▕             );
        715▕         }
        716▕     }
    
      1   [internal]:0
          Illuminate\Database\Schema\Blueprint::__construct("urls", Object(Closure), "")
    
          +7 vendor frames 
      9   database/migrations/2021_08_23_082401_increase_long_url_length.php:17
          Illuminate\Support\Facades\Facade::__callStatic("statement")
    

    Removing this line corrects it:

    DB::statement('ALTER TABLE `urls` DROP INDEX `urls_long_url_unique`;');
    

    But there is still this issue when visiting a page:

    Illuminate\Database\QueryException
    SQLSTATE[HY000]: General error: 1 near "`short_url`": syntax error (SQL: select "urls".*, (select count(*) from "clicks" where "urls"."short_url" = "clicks"."short_url") as "clicks_count", (select count(*) from "clicks" where "urls"."short_url" = "clicks"."short_url" and "real_click" = 1) as "real_clicks_count", (select count(*) from "clicks" where "urls"."short_url" = "clicks"."short_url" and "created_at" >= 2022-06-12 05:52:15) as "today_clicks_count" from "urls" where BINARY `short_url` = wholesale limit 1)
    
    opened by michaellindahl 0
Releases(v0.2.1)
Owner
UrlHum
The UrlHum organization
UrlHum
A modern, powerful, and robust URL shortener

?? A modern, minimalist, and lightweight URL shortener. Polr is an intrepid, self-hostable open-source link shortening web application with a robust A

Chaoyi Zha 4.6k Dec 30, 2022
A fast and powerful URL Shortener built with Laravel, VueJS, and Tailwind CSS.

A fast and powerful URL Shortener built with Laravel, VueJS, and Tailwind CSS.

Devpri 53 Dec 25, 2022
A simple URL shortener for PHP

Shorty Shorty is a simple URL shortener for PHP. Installation 1. Download and extract the files to your web directory. 2. Use the included database.sq

Mike Cao 210 Dec 19, 2022
A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain.

A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain. Table of Contents Full documentation Dock

null 1.7k Dec 29, 2022
URL shortener web application based on the Laravel PHP Framework.

UrlHub Warning: UrlHub is still in development, constantly being optimized and isn't still stable enough to be used in production environments. Whatev

Kei 349 Jan 4, 2023
URL shortener web application based on the Laravel PHP Framework.

UrlHub Warning: UrlHub is still in development, constantly being optimized and isn't still stable enough to be used in production environments. Whatev

Kei 348 Dec 23, 2022
Simpler Url Shortener for Laravel

Laravel Url Shortener Install composer require magarrent/laravel-url-shortener Run migrations: php artisan migrate Configuration If you want to config

Marc Garcia Torrent 51 Dec 17, 2022
🔗 Your Own URL Shortener

Your Own URL Shortener YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener, on your server. You'll have full control over

YOURLS 8.8k Jan 3, 2023
A URL shortener with various other utilities, backed by a custom lightweight framework.

da.gd What is da.gd? da.gd is both a URL shortener and a collection of quick-info tools written in PHP. It allows you to use curl (or any http client)

da.gd 76 Jan 2, 2023
A simple but powerful URL shortener

UrlShorter 这是一个足够简洁的Url短网址生成器 This is a simple Url shorter. 兼容性 在PHP7.X 与 PHP 8.0 下测试通过 安装 step 1: git clone [email protected]:soxft/UrlShorter.git step

xcsoft 74 Dec 21, 2022
URL - link shortener based on sqlite

link-url-shortener url - link shortener based on sqlite.

Okin On 1 Nov 12, 2021
Um encurtador de URL's gratuito e Open source. Torne suas URL's um tanto pequenas forma rápida e gratuita

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Kilderson Sena 30 Jun 30, 2022
Laravel based API to shorten URLs and share them easily. Redirects to the real URL by entering a short URL generated by the API

URL Shortener Requirements: PHP 7.4 or above composer node / npm Installation clone the project from the Github repository, enter the project folder,

Julio Vergara 5 Nov 20, 2021
Purl is a simple Object Oriented URL manipulation library for PHP 7.2+

Purl Purl is a simple Object Oriented URL manipulation library for PHP 7.2+ Installation The suggested installation method is via composer: composer r

Jonathan H. Wage 908 Dec 21, 2022
Laravel URL Localization Manager - [ccTLD, sub-domain, sub-directory].

Laravel URL Localization - (ccTLD, sub-domain, sub-directory). with Simple & Easy Helpers. Afrikaans Akan shqip አማርኛ العربية հայերեն অসমীয়া azərbayca

Pharaonic 2 Aug 7, 2022
Enables the possibility generating sanitized URL parts from persisted patterns.

#Persisted sanitized pattern mapping What does it do? Enables the possibility generating sanitized URL parts from persisted patterns. How does it work

Markus Hofmann 1 Apr 7, 2022
Checking an arbitrary URL for Micro-Framework HLEB

Checking an arbitrary URL for Micro-Framework HLEB The class RouteFinder is not included in the original configuration of the framework HLEB, so it mu

Foma Tuturov 1 Nov 4, 2021
Public Suffix List based domain parsing implemented in PHP

PHP Domain Parser PHP Domain Parser is a resource based domain parser implemented in PHP. Motivation While there are plenty of excellent URL parsers a

Jeremy Kendall 1k Jan 1, 2023
:earth_asia: Functions for making sense out of URIs in PHP

sabre/uri sabre/uri is a lightweight library that provides several functions for working with URIs, staying true to the rules of RFC3986. Partially in

sabre.io 283 Dec 22, 2022