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 setting up with the "FTP / localhost" method #88

Closed
unquietwiki opened this issue Sep 5, 2024 · 6 comments · May be fixed by #90
Closed

Issues setting up with the "FTP / localhost" method #88

unquietwiki opened this issue Sep 5, 2024 · 6 comments · May be fixed by #90
Assignees

Comments

@unquietwiki
Copy link

Hey there. I tried following the FTP/localhost instructions, and had a few questions that would help me in getting the app to work, and maybe expand the install instructions with appropriate knowledge.

  1. Already figured out how to get index.php to load with Nginx 1.27.1 & PHP-FPM 8.2. I have Nginx set to serve the www folder from the application directory.
  2. The index.php file doesn't seem to accept the PHP error debugging commands at all.
  3. Should the $rootDir value in index.php be set to anything in particular? And does DIRECTORY_SEPARATOR need to be changed at all? I get the idea index.php is trying to find the vendor/app files, but if they're in the directory above, the web server might not allow access to them.

Thank you in advance.

@unquietwiki unquietwiki added the bug Something isn't working label Sep 5, 2024
@rancoud rancoud removed the bug Something isn't working label Sep 5, 2024
@rancoud
Copy link
Member

rancoud commented Sep 5, 2024

What do you mean by "The index.php file doesn't seem to accept the PHP error debugging commands at all."?

The $rootDir represent the path to the application one level before www folder.
For example if my index.php is located here /home/user/blueprintue-self-hosted-edition/www/index.php, the $rootDir will be /home/user/blueprintue-self-hosted-edition.

DIRECTORY_SEPARATOR is a PHP constant, in Windows it's \ in Linux it's /.

Web server need to only access to what is supposed to be exposed, here only www folder.
For security reasons other folders (app/storage/vendor) are not exposed in www.

Also if you use Nginx you will need to convert the rewrite rule of .htaccess.

@unquietwiki
Copy link
Author

@rancoud Thanks for getting back to me on this, and your patience.

So regarding the first issue, if I use either debugging command that's supposed to go after } catch (\Throwable $t) { , the page crashes. For comparison, I can put phpinfo(); there, and that will work.

The directory separator thing makes sense. I did verify the root dir is being set correctly, and the other variables too. Also verified there's no chroot being set on PHP-FPM; I don't think Nginx has one by default. I can do a symlink to a test HTML page to the upper-level directory, and that comes up fine. Also found a converter for the htaccess rules; most are fine, but the rewrite-redirect on / causes a redirect loop, so disabled that one for the time being.

I guess at this point, it's really just the first issue that's blocking me: the inability to see exactly what the PHP error is.

@rancoud
Copy link
Member

rancoud commented Sep 5, 2024

For testing you can remove all the try catch to have only the usefull part and set the PHP error reporting to error_reporting(E_ALL);

@unquietwiki
Copy link
Author

@rancoud that helped, TY; it started dumping stack traces to Nginx's error log. The main error was that www/medias/avatars & www/medias/blueprints folders were missing; probably need to add a step to create those. Also set things up so I have a symlink between the "normal" & "debug" versions of the index.php file.

The "app" loads now; will test with my users and report back. Assuming things work out alright, I can put together a Markdown doc of what all I had to do to set things up.

@unquietwiki
Copy link
Author

Further progress... I have a working install now, though anonymous doesn't work with it: I had run the no-anonymous SQL originally, but then ran the commands to create that user & it still didn't take; not a deal breaker. I feel like the stuff to do email registration could actually be automated by a config var; that's beyond the scope of this issue, but something I could dig into sometime (my PHP skills are extremely rusty compared to 10-15 years ago).

Nginx needed some stuff added to the http section of nginx.conf to get it to stop caching uploaded blueprints to itself; something that was being reported in the error log.

    client_body_buffer_size     8M;
    client_max_body_size        8M;

I'll continue to test with my users & then write up my findings for submission. Thanks again for the help with this!

@unquietwiki
Copy link
Author

#90 was submitted as an attempt to document my installation process. It's entirely possible I'm missing a step or two, but tried to account for outliers as well (such as use of HTTPS).

rancoud added a commit that referenced this issue Oct 11, 2024
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

Successfully merging a pull request may close this issue.

2 participants