Translation for 3.6RC

last edited: Thu, 19 Jul 2018 15:37:47 +0200
!Hubzilla Development !Hubzilla Support Forum
I trying to find a painless way how to add new strings translations for new version of #{support@zotadel.net}.
In new 3.6RC some strings were changed and now Hubzilla interface have incomplete translation.
According utils README (thanks, Mario!) procedure should looks like:
1. to create empty with only english text file hmessages.po and modifiy its headers for current languge;
2. to import old translations into hmessages.po from hstrings.php using util/php2po.php tools;
3. to translate new or replaced strings in merged into hmessages.po;
4. to dump full translation in hstrings.php using util/po2php.php tool.

I'm stuck on 2 because of util/php2po.php error.

root@beta:/usr/local/www/tiksi.net # php util/php2po.php view/ru/hstrings.phpFatal error: Uncaught Error: Class 'App' not found in /usr/local/www/tiksi.net/view/ru/hstrings.php:7Stack trace:#0 /usr/local/www/tiksi.net/util/php2po.php(23): include_once()#1 {main}  thrown in /usr/local/www/tiksi.net/view/ru/hstrings.php on line 7

I will be appreciate to any involved in Hubzilla #{support@zotadel.net} work for any advice how can I resolve this issue and provide updated translation for community.
last edited: Thu, 19 Jul 2018 17:34:44 +0200
• First you should update the translation at https://www.transifex.com/Friendica/hubzilla/dashboard/[[/i]]When translation is at 100% and you (or even better: others) are satisfied with it, you can download the relevant .po file from Transifex (click on language > view results > file (probably hmessages.po) > download for use)
• Make sure you are in the root of your Hubzilla installation (e.g. /var/www/hubzilla) and type:
php util/po2php.php view/ru/hmessages.po

The file view/ru/hstrings.php should now be recreated.
last edited: Thu, 19 Jul 2018 21:02:11 +0200
Thanks, I know and did it before but now I need something opposite.
In Transifex we already have almost complete (enough translated) hmessages.po for 3.4. Also we have hstrings.php made from this file using described procedure.
In 3.6 some strings were changed, some deleted and some new were added. I want to save already translated part and merge it with new strings in Hubzilla so I need to find a way to import translated strings from 3.4 hstrings.php into 3.6 hmessages.po to translate new or changed strings.
I believe util/php2po.php should do it.

Hubzilla 3.4.2 Released!

Fixes:

• Magic-Auth compatibility fix for future Hubzilla versions.

!Hubzilla Announcements !Hubzilla Support Forum

Additional there is a community widget repository here: https://framagit.org/hubzilla/widgets

@Haakon Meland Eriksen (Els Mussols)

Thanks for explaining in detail the difference. How can I add  to my instance ?

util/add_widget_repo https://framagit.org/hubzilla/widgets.git hzwidgets

Administrators of public hubs, especially those with federation, I recommend to enable the startpage plugin, a "blessing" that serves to bring us directly to the page we prefer when we log in to the hub.

This is essential to avoid unpleasant surprises when we enter for example in our hubzilla in a bar/pub or other public place like a school.
For example: creating a list/group of trusted friends (the ones we know who never betray us by posting an integral nude for example without using the right tag ), we can direct our login into the hub directly to  /network but with just the posts of that group of friends, thus avoiding to have the general /network with some surprise....

!Hubzilla Support Forum
!Zot universe NEWS

I have enabled this plugin on elsmussols.org (updated HZ to 3.4.2 as well).
Advice on sending and storing JSON for a Plugin

!Hubzilla Support Forum

I would appreciate some advice on how to send and store a JSON for a plugin flashcards

1. Storage of JSON
What I did: The JSON is stored in table "item", field "obj". My problem: The field "obj" is of type "TEXT" and to small for the real live JSON. I would need "MEDIUMTEXT". Does anything speak against to store it in "attach" of table "item"? Regarding notifications, cloning, export/import,... (I am just dreaming. Atm I start to explore the features.)

What I did
• load the page with function flashcards_content($a) in flashcards.php • then request the JSON with function flashcards_post(&$a) in flashcards.php
Is there a better way to do it? I do not want to use replace_macros() for it.

Please do not use the plugin. It is experimantal and does not work properly. I basically copied everything from the chess plugin and now start to explore things. Many thanks to @Andrew Manning ! Generally it is much fun to see Hubzilla working in the debugger! I really enjoy it.

I didn't get Mike's reply until several hours later, and my comment from two hours ago does not appear on the support forum, so I'm writing this comment directly on the support forum channel.

You sound more like a developer who should be using the Hubzilla Development forum! I glanced through your code and its structure definitely looks familiar

(1) Is there anything preventing you from making plugin-specific database tables? I do that in the Rendezvous addon. Then you can store the data structure in a way that makes the most sense for your application.

(2) Using AJAX to pull data dynamically using POST requests is perfectly valid, and in my experience it helps your addon be more API-driven, which is useful if you want to make your plugin available to more "clients" later on.

Oh, and also, perhaps it would be more convenient to fork the addons repo. It will make it easier for others to try out your code, because we can just add your repo as a "git remote" and switch between branches. If you complete the addon it will also be easier to merge into the official addons if desired.

Many thanks @Mike Macgirvin and @Andrew Manning

1. Storage of JSON
I will follow your advice and try set_iconfig($item_id,'some_category','some_access_key',$data, false); first and then see where it leads me to.

Ok, thanks, I will keep the current approach to load it dynamically.

@Andrew Manning Good idea, why not.

Hey all at !Hubzilla Support Forum

I've got a question regarding the even calendar. I noticed that birthdays from friend end up in my public calendar but events I click "I will attend" on don't. This leads to two questions:
• Is there a way to not show contact's birthdays publicly?
• Is there a way to show in the calendar that I decided to attend an even?

Thank you all

-b

From what I remember birthdays of your connections are automatically added to your calendar. All other events require you to manually add them to your calendar (we don't know in advance which will interest you). It would probably be helpful if events you're attending or maybe attending would be added automatically and perhaps not events you've declined. Somebody would need to make this happen.

I don't see much use for this easity a priori:

1. We are a cosmopolitan group from different countries and with many different time zones.

2.  Because of a very common misunderstanding, a private event can be published, as a date with a girl, for example to

!Hubzilla Support Forum
Hello. I tried to upload a folder by dragging it to file list in web interface but it uploaded all files without directory structure. Also it is unable to upload a folder by clicking "Upload" button.
The only way to upload a folder I found was mounting WebDav directory. But only after I changed path from "/dav" to "/dav/<username>" (it should be probably fixed in
Is Hubzilla currently lacking this feature? Using WebDav is not always convenient.

I do not think dropping folders on the web interface works, but as you know this is possible using a WebDAV client.

I think Chrome let's you drag/drop folders but FF doesn't (or vice versa). In either case the server doesn't know it's a folder and has no way to find out and hence can't easily duplicate the file structure.
User name URL corruption

last edited: Wed, 11 Jul 2018 12:55:32 +0200
!Hubzilla Support Forum !Hubzilla Development
If I press on name in redirects to user channel but shows me a banner "channel not found".
Lets say Mario Vavti name in comment have link

https://tiksi.net/chanview?f=&hash=Mw6a8i72VPzqaTjxPVPFwxPD-_io_R4QmvSh8MaX4th3LYuCl8nfDBF16A80ZNKneduHUJAYkrADa0EIMrAmqg

but if I press on it adds after & its HTML analogue amp; and brokes URL

But for example for Mike Macgirvin it works.
I didn't saw such behaviour before. May be latest commits broke redirection.

You can switch to dev using git checkout in your webroot, but you need to know what you are doing. It's a risky thing to do, but if your hub is not critical and you have robust backups, go for it. You'll need to also checkout dev for addons and then until/udall to update the links.

Thanks, Andrew. Yes, I have backups but I not so risky man so I'll wait for new release. Hope it will follow soon.

It would be great!
BTW me and my Hubzilla friends opened few tickets in issue tracker on Framagit. I hope you will have time to check it.
Mike, Mario and other guys involved - many thanks for Hubzilla!
Oauth2 / OpenID Connect SSO with Wordpress?

!Hubzilla Support Forum

Can anyone advise me if the OAuth2 server that has been recently (partially?) implemented in Hubzilla also works as a OpenID Connect provider for external pages to use the same users as my HubZilla server?

Specifically this Wordpress plugin (but similar ones exist for Drupal and Joomla) would maybe them allow SSO like user sharing with Hubzilla?
https://github.com/daggerhart/openid-connect-generic

Or is is purely a client app authorization type of OAuth2 server (like in Nextcloud) that does not allow SSO with OpenID Connect?
last edited: Thu, 12 Jul 2018 14:13:13 +0200
Actually, looking at it a bit closer this is not a server wide thing, but a per channel setting... thus really only for individual app passwords etc.

Would be nice though if Hubzilla would also support OpenID Connect provision. That way HubZilla could act as a identity management (already very nice with all the profile settings) for various other webservices provided by the hub-server. And given the easy to use nomadic identities this would link together multiple servers with one ID.

I think this Drupal plugin provides a similar functionality, so maybe a good starting point for someone looking into this?
https://www.drupal.org/project/oauth2_server

@Mike Macgirvin Am I right in assuming the following: Through Zot Hubzilla provides a sort of SSO across multiple servers, thus if you have a cloned channel on a server you automatically log into the site when visiting. Thus if that server would provide SSO through OpenID Connect, one would also automatically log into any other non-hubzilla webservices on that server, right? That would make for a really easy to use and convenient multi-server SSO solution :)
Controlling forum categories

!Hubzilla Support Forum
After two months of usage, our forum is filled up with categories. Many of them duplicates (some written with capital some not, some with space in between etc). We wanted to clean them up, remove some repeating categories and re-categorize others so that our forum is easy to navigate.

Obviously seems like that is not possible as the posts arent owned by the forum so only authors of the posts can modify categories. Is there a working way to achieve that by forum account or forum admins? If not is it possible to implement such a feature and what would that require.

I might recommend using pdledit/channel (requires advanced theming feature iirc) and changing the category list widget to a category tagcloud . The catcloud_wall widget let's you limit the display to the top 'n' categories instead of listing all of them.

-  [widget=categories][/widget]
+ [widget=catcloud_wall][var=limit]24[/var][/widget]

If you visit my homepage you'll see that I also used the rainbowtag addon to add a bit of colour to the catcloud and tagcloud.

In theory the forum owner can edit the posts and change the categories as desired (the forum is the owner, regardless of who the author is) but there is no UI or link for doing that at this time.

Thank you @Mike Macgirvin

@Hubzilla Support Forum+ I know I am guilty of too many reshares myself, and yet I would like my feed to contain more original stuff from my friends rather than their reshares of other people's content. I tried to add a filter to the more prolific resharers, but it did not behave as expected, so I think I did it wrong. Does anyone know how to filter out items that are reshares from specific connections?

Joe::[share

To filter out any reshares from people named Joe.

Actually that just collapses them. To ignore them completely turn on the connection filter and add share as a filter condition to those you desire.

Thanks!

!Hubzilla Support Forum
Is it possible to provide a public link to an Event created in HubZ? How? (Want to share to and invite folks that are in other networks).
I know there is an ICS download, was hoping there is also a way to show/embed/share the event (page) itself.

If you set the access rights to the event as public, anyone can access it. Select the "Link to source" item from the little cogwheel at the bottom of the event, and share that link. It's not a very pretty link, though, but it works fine for me.

Is there a way to see the comments (and likes) that I have made before in a list? @Hubzilla Support Forum+

yeah that's it, thanks.
entry on the channel

last edited: Thu, 05 Jul 2018 17:14:36 +0200
Hello all,

It is possible to disable "empty page" when entering a channel (with the message "click to show more") ? to have the page content directly.

@Andrew Manning I deleted the cover photo and it works

But this is precisely my problem :

https://hub.heraut.eu/channel/san/?f=&mid=eebd95dec4e3a7b5f1abbd6bb5b6a454da55312489b82943810fcd7e6295ce39@hub.heraut.eu

If I go a first time (in private navigation) on this link I arrive on my homepage of the canal.

I have to go back to this same link to get the exact content (from my source).
last edited: Thu, 05 Jul 2018 22:33:30 +0200
The second part of this was fixed in dev 2-3 weeks ago. You will find when you land on the homepage, some URL query args have been escaped (the & is turned into &+amp; ). Hubzilla isn't actually doing this but I also haven't found exactly how/why it's happening. It may be a new Apache mod_rewrite behaviour which is related to redirects. I fixed it in any case. I was also thinking that the cover photo should be auto-scrolled when going to a specific article and not if you're landing fresh on the channel page. That shouldn't be a difficult dev task.

@Mike : Thank you so much
Two-factor-Authentication with Fail2Ban and HubZilla behind SSO

!Hubzilla Support Forum
#HubZilla #fail2ban #twoFactorAuthentication #YunoHost #SSO
1. Can we implement two-factor-authentication and fail2ban  on HubZilla? Has anyone tried it?
2. YunoHost have the option to keep apps and pages behind SSO. If I keep HubZilla behind SSO , that will completely restrict the HubZilla from outer world. What domains sub-path I need to bypass SSO, so that HubZilla can talk to other hubs and federation, being behind SSO?

I'd second Mike's advice, even if there are paths that can be protected behind ssowat without major problems : /network , /connections , /mail etc.
It's really not worth messing with access restrictions outside of hubzilla since it does that just fine already. You can already restrict access to everything for people not authenticated, and even to people not matching your security choices.

I should have explained my problem first rather then taking out my own solutions. I have ldapauth for 6 to 7 web applications (including HubZilla). I have strong password, but now few other users has joined my server. And whether I like it or not,they will have access to all these apps with ldapauth. And anyone can keep a weak password. So I want every app should have either fail2ban or two-way-authentication or behind SSO (as extra layer of security,which have fail2ban already). Two-way-authentication is optional feature in the apps, so that its not a for sure solution. So I have started to apply fail2ban for apps where it can be applied and for other apps I am keeping the login page behind SSO restriction (people have to login 2 times same authentication to get to the app,but the security is better then before).

For HubZilla I can not put the login page behind SSO because it has the remote login on login page. So I am thinking of way to make security more strong for HubZilla.

It's more complicated than that, because one can login to any page. Several page modules (network is one) will display a login box inline if one tries to access them without being authenticated. The actual authentication is trapped at the system level before the router is invoked (which handles specific pages). And as we discovered a couple of days ago, you can apparently login to the chess page and possibly bypass any Hubzilla security mechanisms.

The best ways forward may include one or more of

1. Edit the ldapauth addon or create a new one that traps all local authentication and perhaps redirect to your SSO service.
3. In either case a password complexity checker might be useful.
4. Figure out what it would take to bring webauthn to your software(s) and help get rid of the entire username/password infrastructure
Good examples of Hubzilla functions in the wild to get ideas from

Map
I was wondering if there were some of you out here who can show off some cool ways you're using the different Hubzilla apps to create a replacement for the following functions:
• blogging
• photo gallery
• video gallery
• professional website
I'm looking to make Hubzilla replace my "LinkedIn" page and would like some ideas on how to show off my different works as well as create a nice looking "front page" when people visit my main URL. So I have a few questions:
• Can I use more than one domain name somehow with Hubzilla channels? Right now we're at jlg.link which automatically dumps to jlg.link/profiles/starrwulfe as the default, but if I set up a new homepage for my "professional side" I want to have it be myrealname.me and I guess redirect to myrealname.me/page/home or myrealname.me\profile\me -- basically having another domain be used on that channel.
• Can Hubzilla store media other than pictures? I want to do audio and video (although I'm considering embedding a Peertube instance in there somehow too...
• I know the base frameworks (bootstrap, et al,) can be invoked in the webpage builder, but how far can I go with it?
• Is there a way to build pages outside of Hubzilla and connect them to the framework/mechanism (and PHP code?)

!Hubzilla Support Forum

Yeah, I wanted to ask about doing pull requests/merges for documentation as well...
Is it OK to do so?

Yes, more than OK. Encouraged!

last edited: Mon, 16 Jul 2018 22:23:05 +0200
There is actually someone working on a fediverse (ActivityPub) linked software similar to LinkedIn.

Website is currently down, but you can check their channel at @cloutstream@mastodon.social

Hey Hubzillans,

I'm trying to update my hub to the new Framasoft git. After updating my remote, I attempt to pull from master, but I get the following prompt.

git@framagit.org's password:

I'm not really sure how to work around this. Any ideas?

OK to show us your .git/config ? There shouldn't be anything sensitive in it, but clear anything suspect if you disagree.

No worries, I just resolved it by switching from SSH to HTTPS. We're all good now!

Yeah, I always use https these days because switching keys between accounts is a bloody pain.
Javascript in Posting or Website, posible?

Is there a way to use Javascript in  a Posting or a Website

i want to write calculating forms, or write Latex with MathJax

i've tried  several things but <scripts> ... <\scripts>
seems to be ignored

Have you code enabled for the channel?

You can use javascript in websites if your admin grants you code rights. It is not allowed in posts...

!Hubzilla Support Forum How to connect activitypub site e.g. https://baptiste.gelez.xyz/~/Thablog/hello-world/ for commenting? I tried insert url in textbox "add contact" as result "Remote channel or protocol unavailable." In mastodon all work. hubzilla ver. 3.4.1

There are lot of platform coming up on ActivityPub. They all look far behind when compared to Zot and what Mike has given us in the form of HubZilla. But I want to know is project like #ZeroNet game changer and is it a better alternate to Federation ?

Might be a new discussion thread you want for that, @Anmol Sharma .

@Andrew Manning
I have already done that. #zeronet made me felt like I am running #HubZilla over torrent/magnet p2p sharing.
Apache errors logs filled the disk

!Hubzilla Support Forum

In the past weeks it happened three times that the #hubzilla error log of Apache filled up my disk entirely in quite a short time:

The last issue happened yesterday at approx. 9:00:

I have a 55 GB Apache error.log for those interested in debugging this.

The last line in that file is something like this:
[Sat Jun 30 12:14:27.969055 2018] [proxy_fcgi:error] [pid 82238:tid 139956640581376] [client 54.36.148.206:25648] AH01071: Got error 's parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message: PHP Warning:  feof() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 166\nPHP message: PHP Warning:  fread() expects parameter 1 to be resource, string given in /var/www/eu/silverhaze.eu/hubzilla/include/dba/dba_pdo.php on line 167\nPHP message:

I don't know if this might be related with the failed database update in the current release.
last edited: Mon, 02 Jul 2018 01:37:06 +0200
Postgres specific. Either Hubzilla is calling dbunescbin() with a field that isn't a binary blob (generated elsewhere), or the PDO database driver is returning an actual string instead of a stream resource as expected. I believe there are only 20-30 calls to this function so they all need to be checked against the former condition. One could work around it by checking what type of data is present when this function is called but that would just hide the issue and won't actually fix it.

Update: I've reviewed every use of dbunescbin() and in my best estimation they are all being called correctly. This is looking like a database issue. If you disagree, you are welcome to install some debug code in unescbin and provide a trace of where it is getting called from when this condition occurs. See btlogger().

I' happy to assist in debugging this issue. But daily workload is quite high at the moment so it can take some days. If you like you can contact me at my Hubzilla address also by mail and send me more details. I hope I can provide some more data at the next weekend at most.

For the moment I've added ErrorLog "|/usr/bin/rotatelogs -t -l /var/log/apache2/silverhaze.eu-error.log 10M" to the Apache config to prevent filling up my disk... I think 10M of logs should be enough to track this down on Apache side...