Skip to content

Forge: Failed to open stream: phar error: invalid url or non-existent phar sqlite-worker.php #301

@duncanmcclean

Description

@duncanmcclean

Hello,

I'm trying to setup a Expose on one of my Forge servers so I can use a custom domain. However, when I attempt to run the expose serve expose.mydomain.com command, I get this error:

PHP Warning:  require(phar:///home/forge/.config/composer/vendor/beyondcode/expose/builds/expose/vendor/clue/reactphp-sqlite/res/sqlite-worker.php): Failed to open stream: phar error: invalid url or non-existent phar "phar:///home/forge/.config/composer/vendor/beyondcode/expose/builds/expose/vendor/clue/reactphp-sqlite/res/sqlite-worker.php" in Command line code on line 1

The same error continues a few times if I try and share from my laptop or try and use the Expose admin interface. I couldn't really find anything specific on Google or in the existing GH Issues for this particular error.

I've tried nuking my composer.lock and vendor directory, then reinstalling in case that makes a difference, but nope. (it's installed globally)

Config

Only made two changes:

  • Updated the admin database path:
        /*
        |--------------------------------------------------------------------------
        | Database
        |--------------------------------------------------------------------------
        |
        | The SQLite database that your expose server should use. This database
        | will hold all users that are able to authenticate with your server,
        | if you enable authentication token validation.
        |
        */
//        'database' => implode(DIRECTORY_SEPARATOR, [
//            $_SERVER['HOME'] ?? __DIR__,
//            '.expose',
//            'expose.db',
//        ]),

	'database' => '/home/forge/.expose/expose.db',
  • Setup a user for Expose admin access

Versions

I'm using Expose 2.1 and PHP 8.1 both on the server and locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions