[Really Solved this time] [4.0.0 RC2] I can't create any content at all, or update global settings

Post Reply
ezequielbruni
Jr. Bludit
Posts: 7
Joined: Fri Nov 02, 2018 8:04 pm

Update:

Closing out this issue as it appears to have been some weird, one-off crap. I woke up today, gave it another try... and it just worked. I hadn't updated any software, made any file or permissions changes since I tried it last. Nothing. It just decided to work.

I'm starting to wonder if my particular setup for Alpine Linux LXD containers, Nginx, and PHP-FPM might just be weird and messed up somehow... though I couldn't possibly tell you what's going on.

--------
Original post:

Okay, I left this as a bug report on the GitHub issues, but I thought I'd ask here in case I messed something up myself, though I should probably mention that my current configuration works flawlessly with both Typemill and WordPress:

Describe your problem
Every time I go to add content or change a global setting, I get the error message "Access denied or invalid endpoint". I am reasonably sure that permissions are not the issue, as the ownership of the directory is all set up properly, as is PHP-FPM, and I extracted the file using the web server user account.

Also, activating plugins seems to work just fine. Oh, and I can change themes and theme settings as well.

I mean... do the permissions look right?

Image

Oh, and here's my Nginx .conf file:

Code: Select all

server {
    listen 80;
    listen [::]:80;

    # virtual server name i.e. domain name #
    server_name bludit.server.test;

    # document root #
    root        /home/www/html; # << This root directory works fine because SELinux isn't installed in the LXD containers.

    # log files
    access_log  /var/log/nginx/www_access.log;
    error_log   /var/log/nginx/www_error.log;

    index       index.php index.html;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        /etc/nginx/fastcgi_params;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
    }

    location ^~ /bl-content/databases/ { deny all; }
    location ^~ /bl-content/workspaces/ { deny all; }
    location ^~ /bl-content/pages/ { deny all; }
    location ^~ /bl-kernel/*.php { deny all; }
}
Steps to reproduce the problem
1. Go to create new page or change global setting.
2. See error.
3. Sigh.

Bludit version
4.0.0 Release Candidate 2

Hosting or Webserver name
My own personal home test server. Rocky Linux host, with Nginx, PHP-FPM and Bludit running in an Alpine Linux LXD container behind an Nginx reverse proxy.

PHP version
PHP 8

Installed PHP modules include:

Code: Select all

php8-cli
php8-common
php8-curl
php8-dom
php8-fpm
php8-gd
php8-gd
php8-intl
php8-json
php8-mbstring
php8-mbstring
php8-mysql
php8-opcache
php8-pgsql
php8-session
php8-sqlite3
php8-xml
php8-zip
PHP logs

Basically only say this:

Code: Select all

[01-Apr-2022 18:23:52] NOTICE: configuration file /etc/php8/php-fpm.conf test is successful

[01-Apr-2022 18:23:52] NOTICE: fpm is running, pid 4540
[01-Apr-2022 18:23:52] NOTICE: ready to handle connections
Setting the log level to `debug` honestly didn't help.

Nginx Error Logs (Sample)

Code: Select all

2022/04/01 17:52:14 [error] 2633#2633: *332 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: bludit.server.test, request: "GET / HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "bludit.server.test"
2022/04/01 17:54:32 [error] 2633#2633: *359 FastCGI sent in stderr: "PHP message: [INFO] [4.0.0] [/api/plugins/pluginSearch] activatePlugin | Plugin installed" while reading response header from upstream, client: 127.0.0.1, server: bludit.server.test, request: "POST /api/plugins/pluginSearch HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "bludit.server.test", referrer: "http://bludit.server.test/admin/plugins"
2022/04/01 17:54:35 [error] 2633#2633: *363 FastCGI sent in stderr: "PHP message: [INFO] [4.0.0] [/api/plugins/pluginSearch] configurePlugin | Plugin configured: pluginSearch" while reading response header from upstream, client: 127.0.0.1, server: bludit.server.test, request: "PUT /api/plugins/pluginSearch HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "bludit.server.test", referrer: "http://bludit.server.test/admin/plugins-settings/pluginSearch"
2022/04/01 17:54:51 [error] 2633#2633: *371 FastCGI sent in stderr: "PHP message: [INFO] [4.0.0] [/api/plugins/pluginSearch] configurePlugin | Plugin configured: pluginSearch" while reading response header from upstream, client: 127.0.0.1, server: bludit.server.test, request: "PUT /api/plugins/pluginSearch HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "bludit.server.test", referrer: "http://bludit.server.test/admin/plugins-settings/pluginSearch"
Nginx Access Logs (Sample)

Code: Select all

127.0.0.1 - - [01/Apr/2022:18:12:36 -0600] "GET /admin/content HTTP/1.0" 200 15318 "http://bludit.server.test/admin/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.141 Safari/537.36"
127.0.0.1 - - [01/Apr/2022:18:12:37 -0600] "GET /admin/editor HTTP/1.0" 200 51090 "http://bludit.server.test/admin/content" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.141 Safari/537.36"
127.0.0.1 - - [01/Apr/2022:18:12:37 -0600] "GET /bl-kernel/img/default.svg HTTP/1.0" 304 0 "http://bludit.server.test/admin/editor" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.141 Safari/537.36"
127.0.0.1 - - [01/Apr/2022:18:12:37 -0600] "POST /api/pages HTTP/1.0" 401 48 "http://bludit.server.test/admin/editor" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.141 Safari/537.36"
Last edited by ezequielbruni on Sun Apr 10, 2022 4:20 am, edited 3 times in total.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Thank you for reporting the problem and creating the issue on GitHub.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
ezequielbruni
Jr. Bludit
Posts: 7
Joined: Fri Nov 02, 2018 8:04 pm

Ummmm... my B. Update to the update: It still won;t let me upload files. Just weird stuff all around.
ezequielbruni
Jr. Bludit
Posts: 7
Joined: Fri Nov 02, 2018 8:04 pm

Update to the update to the... you get the idea.

I can upload new content to the site when I create new posts, but not with existing posts. This bug also oocurs when attempting to upload a logo in the settings.

----

Annnnnnd that just started working. This time I did make some changes, specifically configuring uploads in Nginx and PHP-FPM. Gonna have to make those configurations part of my default server setup...
ezequielbruni
Jr. Bludit
Posts: 7
Joined: Fri Nov 02, 2018 8:04 pm

Last one I swear:

I made a test container and installed every. single. PHP module. that Alpine Linux has to offer and all of their dependencies. Bludit (and Typemill, incidentally) worked flawlessly.

On the downside... I have no idea WHICH module made it work. Installing 500MB worth of dependencies every time might be less than ideal. All things being equal.
User avatar
abdulhalim
Master Bludit
Posts: 128
Joined: Thu Mar 10, 2016 6:25 pm
Location: Bandar Abbas
Been thanked: 4 times
Contact:

I am using Zorin OS(Ubuntu 20.04 Based) I never could install Bludit in the HTML folder :lol: I gave up years ago. Instead, I use PHP Built-in web server, it's much easier than struggling with other ways (but only for testing purpose)

https://docs.bludit.com/en/getting-star ... tion-guide

A little tip for Ubuntu users

First step installing PHP

Code: Select all

sudo apt install php -y && sudo apt install php-mbstring php-gd php-dom php-json
Second step

Code: Select all

$ git clone https://github.com/bludit/bludit.git
$ cd bludit
$ php -S localhost:8000
ezequielbruni
Jr. Bludit
Posts: 7
Joined: Fri Nov 02, 2018 8:04 pm

abdulhalim wrote: Sun Apr 10, 2022 3:52 pm I am using Zorin OS(Ubuntu 20.04 Based) I never could install Bludit in the HTML folder :lol: I gave up years ago. Instead, I use PHP Built-in web server, it's much easier than struggling with other ways (but only for testing purpose)
[/code]
Thanks for the Ubuntu tips. Alpine Linux gets a bit more complex and finicky because it takes a very hard "only-what-you-specifically-need-and-ask-for" approach to installing software, so it's not unusual for me to run into issues that require PHP modules that come by default in most other distros. Like, the ones you listed wyould not be enough for an Alpine install.

I'm kinda sorry for going on about an issue that appears to have been enironment-related, but I seriously thought it was some kind of weird-ass permissions bug. At least when I do figure it out, I'll be able to answer this question for other people.
Post Reply