# PSR-17 Fatal Error

**URL:** <https://community.auth0.com/t/psr-17-fatal-error/183099>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, auth0-php\
**Created:** [March 1, 2025, 2:16pm UTC](https://community.auth0.com/t/psr-17-fatal-error/183099 "2025-03-01T14:16:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crosslands](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/crosslands/32/71185_2.png) [@crosslands](https://community.auth0.com/u/crosslands)\
**Post date:** [March 1, 2025, 2:16pm UTC](https://community.auth0.com/t/psr-17-fatal-error/183099/1 "2025-03-01T14:16:36Z")

</div>

Hi,

I’m building my first Auth0 app. It’s running fine locally, but when I moved to my production server I get a fatal error:

> **Fatal error** : Uncaught InvalidArgumentException: Could not find a PSR-17 compatible request factory. Please install one, or provide one using the `setHttpRequestFactory()` method.

I’ve got the exact same setup locally and remote, my composer.json looks like this:

```auto
{
    "require": {
        "symfony/http-client": "^7.2",
        "nyholm/psr7": "^1.8",
        "auth0/auth0-php": "^8.13",
        "steampixel/simple-php-router": "^0.7.1",
        "guzzlehttp/guzzle": "^7.9",
        "guzzlehttp/psr7": "^2.7",
        "http-interop/http-factory-guzzle": "^1.2"
    },
    "config": {
        "allow-plugins": {
            "php-http/discovery": false
        }
    }
}

```

I’ve tried setting the request factory explicitly like this, but it doesn’t work either:

```auto
$auth0 = new Auth0([
    'domain' => 'YOUR_AUTH0_DOMAIN',
    'client_id' => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'redirect_uri' => 'YOUR_REDIRECT_URI',
    'request_factory' => $psr17Factory, // Pass the factory here
]);

```

Anyone got any tips on how to troubleshoot this?

Thanks.

---

<div class="post-metadata">

**Author:** ![crosslands](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/crosslands/32/71185_2.png) [@crosslands](https://community.auth0.com/u/crosslands)\
**Post date:** [March 3, 2025, 3:31pm UTC](https://community.auth0.com/t/psr-17-fatal-error/183099/2 "2025-03-03T15:31:04Z")

</div>

Oops. I re-built my composer packages and it solved the problem. Must’ve had a conflict somewhere.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 17, 2025, 3:31pm UTC](https://community.auth0.com/t/psr-17-fatal-error/183099/3 "2025-03-17T15:31:14Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
