Search

Items tagged with: 2


If anyone tells you that a string (like a command-line argument) contains a list of smaller strings with a specific separator character in between them, immediately ask "In that case, what happens if the separator character needs to appear in one of the list items?" Instant knee-jerk reflex.

There's more than one good answer. Like "you can escape the separator with this other character" (in which case you know what question #2 is). Or "here is a specific reason why it _can't possibly_ be necessary to put the separator in a list item" (maybe list items are something like numbers or C identifiers which already have a restricted character set).

But if they just say it doesn't seem _likely_, or worse still, demand you justify why you need to, run a mile from whatever software is under discussion.

#2


!Anonsys Support !Friendica Support @Tuxi ⁂

Hello

Pls could you help me to understand these apparent anomalies between the #Vier & #Frio display options.

  1. Vier post compose box includes a handy Quote Share icon / tool, but Frio does not.😲 🤯
  2. Frio post compose box allows one to simply paste in an image from one's clipboard, but Vier does not. 😲 🤯

In many ways i like using Vier, but item #2 above is a real PITA. Changing back to Frio ofc solves that nuisance, but then i incomprehensibly incur the annoyance of item #1 above.

Is is "simple", or practically "impossible", to harmonise these features across both aesthetic styles? 🤷‍♀️


mass-processing, I found a corrupted one! This is supposed to be "People on TV #2", but it crashes VIEWTILE (and my converter). Works in MJVGA31, but it does crash when you exit.
#2


@Hypolite Petovan

Well now strangely on both sites bin/console config doesn't work anymore.
Both throw the following error message:

rootName@VPShosting:# /../doamincom/bin/console config
PHP Fatal error: Uncaught Error: Undefined constant "CURLE_OPERATION_TIMEOUTED" in /../domaincom/boot.php:229
Stack trace:
#0 /../doamincom//vendor/composer/autoload_real.php(69): require()
#1 /../doamincom//vendor/composer/autoload_real.php(59): composerRequireFriendica()
#2 /../doamincom/vendor/autoload.php(7): ComposerAutoloaderInitFriendica::getLoader()
#3 /../doamincom/bin/console.php(31): require('...')
#4 {main}
thrown in /../doamincom/boot.php on line 229

Can't recall doing anything at all, accept trying to get the php imap module to work.


Hilbert Curve #2 (Partition) is complete. The Hilbert Curve is in the stitches you *dont* make…
#2


I interrupt this progress on Hilbert Curve #2 (Partition) to show you the framed Hilbert Curve #1 (Unfinished)
#1 #2


My summary is that he addressed the original code's poor performance in three stages:

1. He came up with a new algorithm that didn't get progressively slower like the original, and also produced better output.
2. He found that even the new algorithm's inner loop was calling into code that did lots of unnecessary work, including memory allocation, so he instead wrote code that did something much simpler.
3. While he was doing the rewrite for #2, he went ahead and used SIMD.

#2


How to debug broken images in posts


Hi !Friendica Support

I set up a Friendica server couple days ago. We have seen couple times a problem where an image attached to a post is visible only to the author of the post. This doesn't happen all the time or for all the images, but has happened to multiple users. If the image is shown broken once, it will stay broken. All the users are on the same server.

- As far as I know, this has happened only in private posts.
- Same person has posted both an image I can see and an image I can't see.
- As the author can see the image in the post, the data definitely is on the server and even accessible from the UI.
- Editing the post and re-adding the image didn't fix the problem.

The error message shown when trying to open a broken image is:

Not Found

The Photo with id 1181454791679d39a348725148987421 is not available.

#0 /var/www/html/src/BaseModule.php(230): Friendica\Module\Photo->rawContent()
#1 /var/www/html/src/Module/BaseApi.php(95): Friendica\BaseModule->run()
#2 /var/www/html/src/App.php(668): Friendica\Module\BaseApi->run()
#3 /var/www/html/index.php(32): Friendica\App->runFrontend()
#4 {main}

Request: 679debda529e1


Server info:
This is Friendica, version 2024.12 that is running at the web location capybara.community. The database version is 1576/1576, the post update version is 1550/1550.


Any ideas what could be wrong or how to continue debugging this?

(I'll be able to investigate this now for couple hours. After that I'll have to come back to this on Monday.)


For 2025, here is a updated and hopefully-useful notice about Linux kernel security issues, as it seems like this knowledge isn't distributed very widely based on the number of emails I still get on a weekly basis:

- The Linux kernel security team does not have any "early notice" announcement list for security fixes for anyone, as that would only make things more insecure for everyone. The number of organizations that fail to understand this is way too high.

- The kernel community DOES assign CVEs, as we are a CNA, please see kernel.org/doc/html/latest/pro… for how they are handled and assigned. Side note, we were #2 in quantity for CVE assignments in 2024 despite only doing so for 10 1/2 months, averaging about 10 CVEs per day. Any process you might have where you feel you need to research each CVE on an individual basis manually is going to be a major time suck, automate it! All CVE entries are provided with proper git commit ids for the vulnerable release ranges for you to check yourself, AND we have tools and other formats that you can use to check this yourself. See git.kernel.org/pub/scm/linux/s… for the tools and raw data for you to pull from directly if you don't want to deal with the cve.org json feed.

- Kernel CVE entries are constantly updated over time, you can not just look a them only when created, and then ignore all updates. Too many groups are missing revoked CVE entries and tightening of vulnerable kernel ranges that we are updating on a weekly basis. By ignoring the updates, you are causing yourself more work, not less. cve.org provides an "updated" feed in their git tree, use it!

- Along the lines of the huge number of recorded CVEs, you HAVE to take all of the stable/LTS releases in order to have a
secure and stable system. If you attempt to cherry-pick random patches you will NOT fix all of the known, and unknown, problems,
but rather you will end up with a potentially more insecure system, and one that contains known bugs. Reliance on an "enterprise"
distribution to provide this for your systems is up to you, discuss it with them as to how they achieve this result as this is what you are paying for. If you aren't paying for it, just use Debian, they know what they are doing and track the stable kernels and have a larger installed base than any other Linux distro. For embedded, use Yocto, they track the stable releases, or keep your own buildroot-based system up to date with the new releases.

- Test all stable/LTS releases on your workload and hardware before putting the kernel into "production" as everyone runs a different %
of the kernel source code from everyone else (servers run about 1.5mil lines of code, embedded runs about 3.5mil lines of code, your mileage will vary). If you can't test releases before moving them into production, you might want to solve that problem first.

- A fix for a known bug is better than the potential of a fix causing a future problem as future problems, when found, will be fixed then.

#2


First ever instance crash. Suggestions for avoiding this in the future?


!Friendica Support
I had my first-ever server crash of my-place.social. This is in syslog:

2024-11-18T21:34:49.022603-05:00 my-place php: PHP Fatal error: Uncaught mysqli_sql_exception: Too many connections in /var/www/html/src/Database/Database.php:201
2024-11-18T21:34:49.022822-05:00 my-place php: Stack trace:
2024-11-18T21:34:49.022855-05:00 my-place php: #0 /var/www/html/src/Database/Database.php(201): mysqli->__construct()
2024-11-18T21:34:49.022885-05:00 my-place php: #1 /var/www/html/src/Database/Database.php(106): Friendica\Database\Database->connect()
2024-11-18T21:34:49.022911-05:00 my-place php: #2 [internal function]: Friendica\Database\Database->__construct()
2024-11-18T21:34:49.022933-05:00 my-place php: #3 /var/www/html/vendor/level-2/dice/Dice.php(132): ReflectionMethod->invokeArgs()
2024-11-18T21:34:49.022958-05:00 my-place php: #4 /var/www/html/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}()
2024-11-18T21:34:49.022985-05:00 my-place php: #5 /var/www/html/vendor/level-2/dice/Dice.php(247): Dice\Dice->create()
2024-11-18T21:34:49.023014-05:00 my-place php: #6 /var/www/html/vendor/level-2/dice/Dice.php(132): Dice\Dice->Dice\{closure}()
2024-11-18T21:34:49.023049-05:00 my-place php: #7 /var/www/html/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}()
2024-11-18T21:34:49.023074-05:00 my-place php: #8 /var/www/html/vendor/level-2/dice/Dice.php(247): Dice\Dice->create()
2024-11-18T21:34:49.023100-05:00 my-place php: #9 /var/www/html/vendor/level-2/dice/Dice.php(132): Dice\Dice->Dice\{closure}()
2024-11-18T21:34:49.023125-05:00 my-place php: #10 /var/www/html/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}()
2024-11-18T21:34:49.023147-05:00 my-place php: #11 /var/www/html/index.php(34): Dice\Dice->create()
2024-11-18T21:34:49.023172-05:00 my-place php: #12 {main}
2024-11-18T21:34:49.023208-05:00 my-place php: thrown in /var/www/html/src/Database/Database.php on line 201

show variables like 'max_connections'; shows 151 max_connections.

I did: SET GLOBAL max_connections = 200;

I also edited /etc/mysql/mariadb.conf.d/50-server.cnf and set max_connections = 200

Is this too high? Too low? Did I do this the correct way?

Thank you!

Thanks!

#3 #1 #2 #10 #4 #5 #6 #11 #12 #8 #9 #7 !Friendica Support


Leaving now to go see --

#1882, or #390, 2024's "Juror #2."

But I never saw "Juror #1"!

#1 #2 #1882 #390


The Apollo 13 mishap was caused by an explosion in oxygen tank #2 in the service module.

The O2 tanks had been redesigned to use 65V instead of 28V, but the heater thermostatic switches got overlooked.

During ground testing, the switches malfunctioned causing temp to rise and damage the teflon insulation on the wires to the fans.

On April 13, the fans were turned on for a "cryo-stir". The fan wires shorted, the teflon insulation caught fire, the O2 tank exploded.

nssdc.gsfc.nasa.gov/planetary/…
2/n

#2


New error message (of FRIO) about a folder created by the user root.

I haven't found the extensive conversation about this problem with @Hypolite Petovan yet but I'm quite sure that I changed all folders to ownership of user www-data before 28th of November of the smarty folder. Actually there was another conversation about ownership of folders and I changed all folders to be owned by root except storage and view that day on 02:45hs, the new folder owned by root at /view/smarty3/compiled/ like stated below was created on 3:50hs.

As for what I remember of all the conversations this shouldn't have happened.


Service Unavailable
unable to create directory /var/www/html/view/smarty3/compiled/7c/ea/e6
Exception thrown in /var/www/html/src/Core/Renderer.php:90
Stack trace:
#0 /var/www/html/mod/photos.php(902): Friendica\Core\Renderer::replaceMacros()
#1 /var/www/html/src/LegacyModule.php(96): photos_content()
#2 /var/www/html/src/LegacyModule.php(73): Friendica\LegacyModule->runModuleFunction()
#3 /var/www/html/src/BaseModule.php(244): Friendica\LegacyModule->content()
#4 /var/www/html/src/App.php(703): Friendica\BaseModule->run()
#5 /var/www/html/index.php(52): Friendica\App->runFrontend()
#6 {main}

Console research resultrootname@VPShosting:/var/www/html/view/smarty3/compiled# ls -l
..
drwxr-xr-x 5 www-data www-data 4096 Dec 6 00:40 7b
drwxr-xr-x 3 root root 4096 Nov 28 03:50 7c
drwxr-xr-x 3 www-data www-data 4096 Nov 28 02:45 7d
..
-----------------
rootname@VPShosting:/var/www/html/view/smarty3/compiled# cd 7c
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c# ls -l
total 4
drwxr-xr-x 3 root root 4096 Nov 28 03:50 d2
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c# cd d2
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c/d2# ls -l
total 4
drwxr-xr-x 2 root root 4096 Nov 28 03:50 69
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c/d2# cd 69
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c/d2/69# ls -l
total 4
-rw-r--r-- 1 root root 710 Nov 28 03:50 7cd2693513597460a71347ba02d3179c5e5ab822_2.string.php
nano 7cd2693513597460a71347ba02d3179c5e5ab822_2.string.php
<?php
/* Smarty version 4.3.1, created on 2023-11-28 03:50:02
  from '7cd2693513597460a71347ba02d3179c5e5ab822' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.1',
  'unifunc' => 'content_6565636a645732_50647552',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_6565636a645732_50647552 (Smarty_Internal_Template $_smarty_tpl) {
?>[url=https://tupambae.org/profile/utopiarte]utopiArte[/url] replied to you on [url=https://tupambae.org/display/0ac89072-1065-6562-6405-8bb240314547]"bugreport - can't answer, like or reshare posts"[/url]<?p>
#3 #1 #2 #4 #5 #6 @Hypolite Petovan


tupambae.org/admin/themes/frio

Service Unavailable
unable to create directory /var/www/html/view/smarty3/compiled/90/4f/52

Exception thrown in /var/www/html/src/Core/Renderer.php:90
Stack trace:
#0 /var/www/html/view/theme/frio/config.php(199): Friendica\Core\Renderer::replaceMacros()
#1 /var/www/html/view/theme/frio/config.php(141): frio_form()
#2 /var/www/html/src/Module/Admin/Themes/Embed.php(89): theme_admin()
#3 /var/www/html/src/BaseModule.php(244): Friendica\Module\Admin\Themes\Embed->content()
#4 /var/www/html/src/App.php(703): Friendica\BaseModule->run()
#5 /var/www/html/index.php(52): Friendica\App->runFrontend()
#6 {main}

#3 #1 #2 #4 #5 #6


@Hypolite Petovan
Ok fixed that

Executable: /home/anubis2814/mywebsite/bin/console.php
Arguments: array (
0 => 'autoinstall',
)
Options: array (
'v' => 1,
)
Command: autoinstall
Initializing setup...
Complete!

Checking environment...
NOTICE: Not checking .htaccess/URL-Rewrite during CLI installation.

[Error] --------
GNU Multiple Precision PHP module: Error: GNU Multiple Precision PHP module required but not installed.

[Backtrace]:
#0 /home/anubis2814/mywebsite/vendor/asika/simple-console/src/Console.php(108): Friendica\Console\AutomaticInstallation->doExecute()
#1 /home/anubis2814/mywebsite/src/Core/Console.php(163): Asika\SimpleConsole\Console->execute()
#2 /home/anubis2814/mywebsite/vendor/asika/simple-console/src/Console.php(108): Friendica\Core\Console->doExecute()
#3 /home/anubis2814/mywebsite/bin/console.php(41): Asika\SimpleConsole\Console->execute()
#4 {main}
Is this error an issue?


!Friendica Support
wiki.friendi.ca/docs/install
So I am stuck at the create a database point. I can't tell if they just told me, create a database without telling me how or if this helped create a database. I went with B and here were the resutls. Are there peices missing or are these warnings ok for the system we are using?

$ bin/console autoinstall -v
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "gd" is already loaded in Unknown on line 0
PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
Executable: /home/anubis2814/mywebsite/bin/console.php
Arguments: array (
0 => 'autoinstall',
)
Options: array (
'v' => 1,
)
Command: autoinstall
Initializing setup...
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "gd" is already loaded in Unknown on line 0
PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "gd" is already loaded in Unknown on line 0
PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
Complete!

Checking environment...
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "gd" is already loaded in Unknown on line 0
PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "gd" is already loaded in Unknown on line 0
PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
NOTICE: Not checking .htaccess/URL-Rewrite during CLI installation.

[Error] --------
GNU Multiple Precision PHP module: Error: GNU Multiple Precision PHP module required but not installed.

[Backtrace]:
#0 /home/anubis2814/mywebsite/vendor/asika/simple-console/src/Console.php(108): Friendica\Console\AutomaticInstallation->doExecute()
#1 /home/anubis2814/mywebsite/src/Core/Console.php(163): Asika\SimpleConsole\Console->execute()
#2 /home/anubis2814/mywebsite/vendor/asika/simple-console/src/Console.php(108): Friendica\Core\Console->doExecute()
#3 /home/anubis2814/mywebsite/bin/console.php(41): Asika\SimpleConsole\Console->execute()
#4 {main}


The paper's next move is to link 3 proposals from 2022, 2021, and 2015 about how to use C++ for type and resource safety, and then the C++ Core Guidelines themselves.

Speed-summary.

2022


The 2022 paper lays out a bunch of alternatives and then goes all-in on the Core Guidelines as THE solution. "Just develop the checkers more, slap then on top of existing code and keep using the compatibility story to push what C++ is in more places". It's built around this idea.

It mentions other ways of maintaining type safety, but it boils down to "use the RAII we have and combine it with lots of core guidelines to get what we want". I mean, RAII is wonderful, and that's fair, but you know. Again.

Existence proof of Google's work makes it a little less palatable to think this'll do the trick completely.

2021


This one very explicitly tries to lay out some rules for protecting programmers. But, a lot of the advice is simply just straight up unactionable for the way C++ is written today, meaning it's likely geared towards people doing things today to write new code without lots of refactoring. For example, Rule #2 from this paper is

Every object is accessed according to the type with which it was defined.

The language guarantees this except for preventable pointer misuses (see §4, §5), explicit casts, and type punning using unions. The CG have specific rules to enforce these language rules.

Static analysis can prevent unsafe casting and unsafe uses of unions. Type-safe alternatives to unions, such as std::variant, are available. Casting is essential only for converting untyped data (bytes) into
typed objects.


This is a pretty sensible rule until you start doing things in more complicated code bases or interfacing with C, where the name of the game is committing crimes with pointers -- void* or otherwise -- to get things done. Type-punning is common, and std::variant only showed up in C++17 (much like std::string_view also showing up 10 years late by being introduced in C++17, also with a hamstringed std::optional type -- see here for my usual rant on that).

It also flies in the face of the whole "we take advantage of code that exists", because doing that means you need to interface with C++03, C++11, and C89 to C17 code. All of that is raw pointers and crimes, especially since until C++11 there was no move semantics, so if the whole point -- as these papers and the overarching paper points out -- is to keep compat alive and use old code, then you're going to have to keep working with a grafted up monster.

2015


This is actually the best paper because it uses lots of examples to explain some serious problems with C and C++ code. It walks people through introducing RAII types for safety to prevent use-after-free, double-free, and other large classes of problems. It still shills for the Core Guidelines eventually, but at least it's trying to help. But, again, it offers it in the context if migrating old code to new styles and idioms; but, at the same time, the tension of "you can keep using your old code" keeps rising up. So either we're all using old code or we're rewriting it to use the new stuff, which means that for all the compatibility we have we're still rewriting large chunks of code to defend against bugs instead of just writing the code we want to write to make progress.

This is a consistent theme for this paper and many C++ papers; "compatibility is important", is what they keep saying, while deeply implying that old code needs new tools to be rewritten in and transition paths must happen. At some point, I need to stop fucking with Old and Busted But Occasionally Reliable and start working on the New Hotness, so we end up with a Lovecraftian monstrosity as a matter-of-fact in most long-lived C++ codebases.

Damned if you do, damned if you don't I guess?

#2


@Friendica Support I want to delete a post which was accidentially saved to a folder. How to do it? Only thing I see is a pop-up saying that I will be deleting the post, but no button or anything else to be clicked. See screenshots: #1 Firefox on Android, #2 Firefox on Windows.

TIA


Thanks very much for the help so far. If I don't use the addon, which is disabled by default, I have the Exim4 mail transfer agent on Ubuntu 22.04. It has a sendmail binary that identifies itself as Exin. It shows version 4.95 #2. Is it Exim that is putting leading spaces on some header lines?
#2


@Fabio -- kudos!

Thanks to you, I learned today how to:

1. From my cron table retrieve the username: friendica

2. From /var/www/friendica find out out ownership and mode: friendica:www-data 0750

3. In /var/www/friendica create log/friendica.log

4. Apply details from #2 to the directory I created for media files

And now the storage switch went without any glitches.

root@tepewu:/home/yunohost.multimedia/petroskowo# ls
0c  2a  37  41  4d  61  71  8c  bf  d5  f6
0e  2e  3a  42  57  62  73  93  c8  e3  ff
29  33  3e  4b  60  6d  79  94  c9  e9  index.html

Thank you for your support.

#2 @Fabio


Can't add contacts after upgrade top 2022.10


!Friendica Support

Hello!

My system runs on an Raspberry Pi3, Debian 11

Since the upgrade to Friendica 2022.10 adding new contacts in mastodon shows me an error-code.

Exception thrown in /var/www/html/src/ModuleContact/Profile.php:141
Stack trace:
#0 /var/www/html/src/BaseModule.php(244): Friendica\Module\Contact\Profile->con>
#1 /var/www/html/src/App.php(719): Friendica\BaseModule->run()
#2 /var/www/html/index.php(44): Friendica\App->runFrontend()
#3 {main}


I have Friendica debug logs for times around the contact-attempt, but there isn't even shown the contacts-profile-url (but those of many others, i'm not in contact with).

Afterwards, the contact is added as RSS.

--

Adding a new a.gup.pe membership ends up with error messages on screen


Network type can't be detected, contact can't be added.
Profile-url doesn't give proper information, no compatible protocolls for communication oder feeds can be found.

Error messages on screen: Network type can't be detected, contact can't be added. Profile-url doesn't give proper information, no compatible protocolls for communication oder feeds can be found.

Here i also can't find anything related in the logs.


Does anyone has similar issues?