Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues installing on FreeBSD 13.2 #113

Open
donfeduardo opened this issue Jul 20, 2023 · 0 comments
Open

Issues installing on FreeBSD 13.2 #113

donfeduardo opened this issue Jul 20, 2023 · 0 comments

Comments

@donfeduardo
Copy link

I see a few open issues about incomplete installation instructions, but I'm not sure how different things are on FreeBSD. Since I'm a weirdo not running Linux, here's what I had to resolve on FreeBSD 13.2 with PHP 8.1:

PHP dependencies

Even though I had installed every dependency listed in the prerequisites document, composer wouldn't run successfully until I also installed the following packages (assume all package names are prefaced with the specific PHP version, in this case 'php81-')

pcntl
posix
simplexml
xmlwriter
sodium

After installation I also ended up needing to install the php81-pecl-imagick-im7 package but I don't have a note as to why.

Laravel

  1. When I was cleaning up dependencies I ran php artisan test and had several failures that were fixed when I ran composer require osiemsiedem/laravel-autolink . Is that a requirement overall, or just a requirement for development?

  2. Laravel also ignores umask when writing files and creating directories, and the settings in config/filesystems.php turned out not to work for me with Pixelfed running under its own account:

        'local' => [
            'driver' => 'local',
            'root'   => storage_path('app'),
            'permissions' => [
                'file' => [
                    'public' => 0644,
                    'private' => 0600,
                ],
                'dir' => [
                    'public' => 0755,
                    'private' => 0700,
                ],
            ],
        ],

This may be a bug, but even though images were being written with public permissions (0644), they were being placed in folders with private permissions (0700), which meant that my web server couldn't read them. This problem won't show up if Pixelfed is running under the same account as the HTTP server, but it was a problem for me. As a workaround I had to set the private permissions on directories to 0750.

Other

Even after resolving the autolink issue, there's still one test failure:

  at tests/Feature/LoginTest.php:14
     10▕     public function view_login_page()
     11▕     {
     12▕         $response = $this->get('login');
     13▕ 
  ➜  14▕         $response->assertSee('Forgot Password');
     15▕     }
     16▕ }
     17▕ 

The HTML in the assertion failure is a "Sorry, this page isn't available" error, and I don't know enough to know whether that test is outdated or depends on tools that aren't present in a prod environment. So that could either be documented or the test suite could be rewritten to skip it if a developer-only dependency is missing.

And one last annoying thing: I initially configured my storage as local-only just to get it up and running, but once I got my cloud storage (Digital Ocean Spaces) configured, I wanted to use the migrate2cloud function to move the first few images I'd uploaded in order to have them all in one place. Turns out that migrate2cloud ignores images less than two days ago (->where('created_at', '<', now()->subDays(2))) and that seems like a thing that also could maybe be documented somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant