WindTalk

2

WindTalk wrote

Why are you arguing a nonsensical point with me? Public Domain is perfectly valid for an author to grant in the USA.

3

WindTalk wrote

I'm talking about deleted content on riddle, answers in the forums. It was technical.

1

WindTalk wrote

I don't have time to research what is going on with this site, but it seems highly motivated suddenly in a negative way. Best I depart.

3

WindTalk wrote (edited )

Well, I was hoping to draw some help on this, and with emma's public departure and deletion of some technical info here... I may not continue this effort.

I do not know PHP and any of the PHP framework systems being used. But I can say from decades of experience: emma's code is very well structured and readable. As open source code goes, it's great, and in many ways I find it superior to the demo code that the Symfony project publishes! Emma has a great talent for organic growth of code, and her commit history shows a great ability to build up a functional app where basics are important. Emma also shows a regularity of motivation and contribution to the project.

I come from very very old social media, like 1980's social media, and I can say that the current Internet has a real problem drawing mom-and-pop cottage-operators for forums. I think Postmill is incredibly powerful and cheap to operate for a few thousand active users - and it emotionally bothers me how many users on reddit won't pick it up and go start their own independently operated/admin sites built around various topics. I just don't get why people can't see the problem of so much power concentrated in owners who care more about the brand and count of users.

The features of Postmill are good enough for most purposes, and feature wish lists aren't important. But emma clearly has made the code clean and able to be expanded by other developers... and there has to be experienced PHP people out there would be willing to make contributions.

Anyway, I'm not in the position to contribute good code on basic features. My hacking motives were motivated by some other projects I have, I was hoping to coattail on a project that was so cleanly coded and would attract a couple active developers. I still hope for that, as I really think Postmill's server efficiency and clean simplicity should encourage more small-time site operators.

In any event, if I have not made clear enough: Thank you emma.

6

WindTalk wrote (edited )

I'm curious who is funding the servers, domain registration, installing updates, etc?

I assumed emma was doing all that. Not sure how far 'admin' role departure is. I guess I'll see if Postmill continues to get code updates.

2

WindTalk wrote

Wow, emma deleted a bunch of technical details on Postmill setup

5

WindTalk wrote (edited )

I think a lot of people love their job. More than they love their own children and spouse. I've witnessed people disown their children, but that same person would not disown their employer (for far worse values). When you talk to middle-age people going through a divorce, often the thing they consider most important is their job stability and how important it is to pay for their lawyer and child custody battle. I scratch my head, as every child has lived through a marriage - the marriage of their parents - and the problem-solving they are educating to their children.

On the other hand, i also question if people have not altered the very meaning of the word "love" to mean something entirely different from a serious classical meaning.

2

WindTalk wrote (edited )

how far does that go? If a comment gets downvoted, but that comment gets second-level replies... ?

I view the social behavior with suspicion of sickness. As people can't just consider zero-voting, noop. If something draws your comment, there isn't a need to punish.

2

WindTalk wrote (edited )

meta^2: currently 52 comments with -1 posting vote after 14 hours. People downvote the posting to make sure others don't come along and read what comments they wrote?

11

WindTalk wrote

I think the hate-motivating in general is best avoided. Especially hate as a long-term strategy.

1

WindTalk wrote

I brought in the base Twig template, but ran into troubles

Postmill and the Demo Blog app both use a src/Twig/AppExtension.php - and It isn't clear to me how to integrate them. The config/services.yaml for the Demo Blog app has 3 binding references that Postmill does not normally use, but I've been unable to figure out how to make those bindings work. templates/base.html.twig loops through the locales() function - and without those bindings working - it fails.

1

WindTalk wrote

Ok, I think I figured out the difference between the two apps... the Symfony demo has annotations @Route tags enabled via ./config/routes/annotations.yaml - where Postmill does not use them.

1

WindTalk wrote (edited )

ok, so I did a complete setup of PHP 7.2, PostgreSQL 10.1, nginx/1.10.3 and managed to get Postmill runing via nginx.

  1. my root folder is /home/myuser/PostmillSite0/Postmill (I did a git checkout from /home/myuser/PostmillSite0 folder)
  2. Everything is working fine with the bin/console server:run 0.0.0.0:8000 using my account myuser
  3. Then i went with the bone-stock version of nginx that Ubuntu 16.04 currently provides.
  4. Based on the information you provided, you and I are both running the same version of PHP 7.2 - HOWEVER

I notice something, you are using Ubuntu 17.10? To run a server in public, I think most would go with 16.04 - as it's LTS and there is more documentation out there on it. (I saw your "7.2.2-3+ubuntu17.10.1+deb.sury.org+1" vs mine "7.2.2-3+ubuntu16.04.1+deb.sury.org+1")

I suspect that puts you on a different, newer version, of nginx/1.10.3 - and maybe some alternate configs?

Here is the config I used that was a non-default site. nginx/1.10.3 is providing a simple static file for my default, using what Ubuntu 16.04 setup. http://server4.plasticirony.com - will show that default site.

Now, to wire up PHP and Postmill, I added a second site (same IP Address, same port):

/etc/nginx/sites-available/forum.plasticirony.com

server {
    server_name plasticirony.com forum.plasticirony.com;
    root /home/myuser/PostmillSite0/Postmill/public;

    location / {
        # try to serve file directly, fallback to index.php
        try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;

        # optionally set the value of the environment variables used in the application
        # fastcgi_param APP_ENV prod;
        # fastcgi_param APP_SECRET <app-secret-id>;
        # fastcgi_param DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name";

        # Postmill
        fastcgi_param APP_ENV 'prod';
        fastcgi_param APP_SECRET 'mysecret';
        fastcgi_param SITE_NAME 'forum.PlasticIrony.com';
        fastcgi_param DATABASE_URL 'pgsql://postmill:mydatapassword@127.0.0.1/postmilldb0?serverVersion10.1';
        fastcgi_param MAILER_URL 'smtp://localhost:25?encryption=&auth_mode=';
        fastcgi_param NO_REPLY_ADDRESS 'no-reply@example.com';


        # When you are using symlinks to link the document root to the
        # current version of your application, you should pass the real
        # application path instead of the path to the symlink to PHP
        # FPM.
        # Otherwise, PHP's OPcache may not properly detect changes to
        # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
        # for more information).
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/index.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }

    # return 404 for all other php files not matching the front controller
    # this prevents access to other php files you don't want to be accessible.
    location ~ \.php$ {
        return 404;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}

And, it's working fine off of http://forum.PlasticIrony.com - and responding correctly. I did waste 30 minutes figuring out that the proper PHP 7.2 path for /var/run/php/php7.2-fpm.sock - but once I solved that issue, Postmill started working file via nginx.

My Ubuntu 16.04 server has only 1GB of RAM, so I'm running Postmill on Nginx off of less than what you are attempting.

cat /proc/meminfo

MemTotal:        1048576 kB
MemFree:          501372 kB
Cached:           126480 kB
Buffers:               0 kB
Active:            84096 kB
Inactive:         131424 kB
Active(anon):      34932 kB
Inactive(anon):    54108 kB
Active(file):      49164 kB
Inactive(file):    77316 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1048576 kB
SwapFree:        1034996 kB
Dirty:             42252 kB
Writeback:             0 kB
AnonPages:         89040 kB
Shmem:            316680 kB
Slab:              14984 kB
SReclaimable:       3744 kB
SUnreclaim:        11240 kB
1

WindTalk wrote

Allowed memory size of 134217728 bytes exhausted

128MB is standard memory limit for PHP, and apps like Drupal run fine with that amount. So, I'm thinking something else. However, try removing the limit

  1. run "php --ini" to confirm you are using the INI you think you are. What's your version of php? "php -v"
  2. Just to see if problem goes away, change memory_limit in php.ini to -1 and see if that changes behavior.
3

WindTalk wrote

So, where I'm stuck...

The templates/admin/blog/new.html.twig and other files are not showing any of the output in the "block main" section. However, if I copy the form code over to the "block sidebar" section (the right sidebar), it does show up.

Not sure how to resolve this conflict between the two apps and their output conventions.

3

WindTalk wrote (edited )

Postmill and Symfony demo seem to use different method of registering routes. The Symfony demo code uses @Route tags? I couldn't really figure out how to combine the two methods, so I hacked in some entries to config/routes.yaml to make it work with the Postmill method?

1

WindTalk wrote

Fatal error: Out of memory (allocated 17039360) (tried to allocate 77824 bytes) in /postmill

That's only 17MB. Maybe post output of: cat /proc/meminfo