Giter VIP home page Giter VIP logo

dyndns-kit's People

Contributors

michaelesmith avatar

Watchers

 avatar  avatar

dyndns-kit's Issues

GenericHandler: No handler could be found

trying the basic usage example, my failed?
/var/ directory exists and is writeable
PHP 7.3

request: https://testuser:s3cret@localhost/dyndns/update.php?hostname=test.example.com
error:
PHP Fatal error: Uncaught RuntimeException: No handler could be found to handle the current request in /var/www/html/dyndns/vendor/michaelesmith/dyndns-kit/src/Server.php:59\nStack trace:\n#0 /var/www/html/dyndns/vendor/michaelesmith/dyndns-kit/src/Server.php(43): DynDNSKit\\Server->doExecute(Object(Symfony\\Component\\HttpFoundation\\Request))\n#1 /var/www/html/dyndns/update.php(27): DynDNSKit\\Server->execute(Object(Symfony\\Component\\HttpFoundation\\Request))\n#2 {main}\n thrown in /var/www/html/dyndns/vendor/michaelesmith/dyndns-kit/src/Server.php on line 59

update.php:

<?php
use DynDNSKit\Authenticator\AuthenticatorException;
use DynDNSKit\Authenticator\HttpBasicAuthenticator;
use DynDNSKit\Authenticator\User\RegexUser;
use DynDNSKit\Handler\GenericHandler;
use DynDNSKit\Handler\HandlerException;
use DynDNSKit\Processor\JsonProcessor;
use DynDNSKit\Processor\ProcessorException;
use DynDNSKit\Server;
use DynDNSKit\Transformer\DynDNSTransformer;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

require_once __DIR__.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php';

$server = new Server(
    [
        new GenericHandler(
            new DynDNSTransformer(),
            new HttpBasicAuthenticator([new RegexUser('testuser', 's3cret', '.+')]),
            new JsonProcessor(__DIR__.'/var/dns.json')
        ),
    ]
);


$server->execute(Request::createFromGlobals());
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.