Skip to main content


installing friendica 2021.01 on shared hosting


This entry was edited (3 years ago)

Friendica Support reshared this.

Can't call any profile page or post something.
Admin panel and settings panel seem to work well.

/profile/admin
Exception thrown in /var/www/virtual/ .. /htdocs/src/Module/Profile/Status.php:57
Stack trace:
#0 /var/www/virtual/../htdocs/src/Module/Profile/Index.php(44): Friendica\Module\Profile\Status::content()
#1 [internal function]: Friendica\Module\Profile\Index::content()
#2 /var/www/virtual/.. /htdocs/src/App/Page.php(332): call_user_func()
#3 /var/www/virtual/.. /htdocs/src/App/Page.php(389): Friendica\App\Page->initContent()
#4 /var/www/virtual/ .. /htdocs/src/App.php(562): Friendica\App\Page->run()
#5 /var/www/virtual/.. /htdocs/index.php(40): Friendica\App->runFrontend()
#6 {main}
#5 #4 #1 #2 #3 #6
The admin panel for users counts 3 users but doesn't display any of them.
@Tobias
Can't call any profile page or post something.
@Tobias

No line above.

In the admin panel there is the following line:
Notice: Trying to access array offset on value of type bool in /var/www/virtual/tupambae.net/tupambae.com/fedivers/htdocs/src/Database/Database.php on line 1610

Notice: Trying to access array offset on value of type bool in /var/www/virtual/tupambae.net/tupambae.com/fedivers/htdocs/src/Database/Database.php on line 1610
logoFriendica

PHP Version 7.4.21
@Tobias

Trying to activate:
Administration - Logs
Enable Debugging

/admin/logs/view says:
Error trying to open <strong>log/friendica.log</strong> log file.\r\n<br/>Check to see if file log/friendica.log exist and is readable.

Should I create a folder /log and he respective friendica.log?
@Tobias

Just created the log file, first entry:
2021-07-22T13:04:41Z index [ERROR]: DB Error {"code":1615,"error":"Prepared statement needs to be re-prepared","callstack":"DBA::selectFirst, User::getOwnerDataById, Profile::load, Status::content, Index::content, call_user_func, Page::initContent, Page::run","params":"SELECT * FROM `owner-view` WHERE (`uid` = 2) LIMIT 1"} - {"file":"Database.php","line":662,"function":"p","uid":"b847b3","process_id":18245}
2021-07-22T13:04:41Z index [ERROR]: DB Error {"code":1615,"error":"Prepared statement needs to be re-prepared","callstack":"DBA::selectToArray, vier_community_info, vier_init, Page::run, App::runFrontend","params":"SELECT * FROM `owner-view` WHERE (`blocked` = 0 AND `publish` = 1) ORDER BY `register_date` DESC LIMIT 0, 9"} - {"file":"Database.php","line":662,"function":"p","uid":"b847b3","process_id":18245}
@Tobias

In the admin panel the one I posted first.
The other debug info is from the log file:
Just created the log file, first entry:
'pdo_emulate_prepares' => true,
@Michael Vogel@Tobias
'pdo_emulate_prepares' => true,

¿?
Where do I find this to set it?
I guess in the DB?
Where?
I believe in your friendica config file - might be config/local.config.php (it's what I'm still using but the location changed over the years). In the 'database' section, you'd want the line @Michael Vogel suggested.
@Adam@Tobias

¿Something like this @Michael Vogel ?

local.config.php
	'database' => [
		'hostname' => 'localhost',
		'username' => 'xxxx',
		'password' => 'xxxxx',
		'database' => 'xxxxxx',
		'charset' => 'utf8mb4',
                'pdo_emulate_prepares' => true,
	],

Anubis2814 reshared this.

That's my understanding... have you tried it?
@Adam
Nope, waiting for a thumbs up by the boss ..
@Adam
Yes. This might work. But in that version the feature was new and I'm not very confident that it worked well.
@Michael Vogel@Tobias@Adam

oks
I will check it out than and give a report.

btw
My idea is to use git.friendi.ca to kinda publish a fork of this last worker in admin version of friendica as a shared host option fork "as is", without further mayor updates or ongoing coding efforts/development. Unless important security issues come up that need to be integrated of course.
"Worst case scenario" a hoster specific friendica version.

It has still dfrn and already activitypub integration so it might be in part kinda last dfrn stable version.

In other words, besides other issues that might come up, any fine tuning hints are welcomed!
#5 #4 #1 #2 #3 #9 #8 #6 #7 #10
Try to follow the other direction. Maybe this works.
The profile itself seems to ignore that fact and still offers to follow this profile over here ..
@Hypolite Petovan@Michael Vogel@Tobias

What is System::externalRedirectTo about?

I searched on github and found basically two issues where certain discussion on it goes on:

src/App/BaseURL.php
22 Oct 2018
https://github.com/friendica/friendica/pull/5907
https://github.com/friendica/friendica/issues/5996

I didn't experience any problem with this with friendica2019.12
What has changed that this problem pops up now?

Are there possibilities to work around this problem via .htaccess?
@Michael Vogel@Hypolite Petovan@Tobias

Trying to follow a profile on the same instance:
https://subdoman.domain.com/follow?url=https%3A%2F%2Fsubdomain.domain.com%2Fprofile%2Fadmin&auto=1

/admin&addr=6269747069636b75704066656469766572732e747570616d6261652e636f6d is not a relative path, please use System::externalRedirectTo
Notifications for new comments in posts doesn't work.
Notification for mentions in comments doesn't work.

Pictures and album administration works.

Deleting comments works.
(doesn't work for now in this environment in friendica 2021.04)
@Tobias
It is the PHP setting display_errors that should be 0

Where do I find that?
@Tobias

I'm on a shared hosting, no access to /etc/php...
@Tobias

Why apache2?
Isn't .htaccess something that always works?
@Tobias

Right.
But why 2?
Isn't that true for apache(1) too?
Admin panel advise on top:

Your table_definition_cache is too low (400). This can lead to the database error "Prepared statement needs to be re-prepared". Please set it at least to 1400 (or -1 for autosizing). See here for more information.

The worker was never executed. Please check your database structure!
I contacted the provider about the worker issues and he stated that:

-rw-r----- worker.php
this is not an executable file.
----------------------------------------
> Just to make sure,
> that means the permisons set for the worker.php files are wrong ¡?
----------------------------------------
Yes, the file must be executable to be executed. You should look up the recommended permissions for this file in documentation and let us know. We will help you fixing permissions if you need.


Didn't find any permissions settings for worker.php
How should they be set?

@elrido

some how the CHMOD permissions where set to 644

changed to 755
thx

@Tobias
I guess there is no problem than and I don't need to ask my provider or check some how else.
I remember we used .htaccess when I installed friendica a decade ago for the first time when your friendica instance was like the first time I hoped onto friendica so it worked than too.
This ..
is ..
mindblowingImage/photo

I uploaded fullfriendica2020.07-1 and fullfriendica2020.09-1 to the server the same way I did with the version above (2021.01) and that takes like hours and hours via ftp and get 404 blank pages when calling:
/install

Click to open/closeImage/photo
So ..
first of all all friendica2020.09-1 work's but is slow and nearly unresponsive because of never ending loop like waiting times.

2021.01
Diaspora connection works without dfrn redirects so with kinda backfliploop workaround here the new account 2021.01 testserver:
Astonishingly squeet.me says on this page that this account here follows that account over there.
When trying to visite redirect gives https://squeet.me/redir/1876762 bas request.

Is dfrn already skipped over here?
I guess not.
Your system doesn't allow background tasks, so everything is executed in the frontend. This will most likely cause this slow behaviour.
@Michael Vogel

Yes.
I'm testing around the settings options and enabled the front end worker option in the /admin/settings and am testing if the fast lane option works.

btw
Some parts talk about /htdocs/worker and others (or I got that wrong) refer for the external worker to be set as https://subdomain.domain.com/bin/worker.php

These are basically the different worker setups?

[.. ups looks like the site is down ..]
…ᘛ⁐̤ᕐᐷ
Astonishingly squeet.me says on this page that this account here follows that account over there.

Somehow the connection seems to work, starting to test what interactions work …ᘛ⁐̤ᕐᐷ
https://1dhfsbbdpv4wshuyc6197nymcfeqqkfvy9.tupambae.org/.well-known/host-meta is not reachable on your system. This is a severe configuration issue that prevents server to server communication. See the installation page for help.

I looked out at github the friendica help section and elsewhere but couldn't find help or hints.

/admin wrote:

Your table_definition_cache is too low (400). This can lead to the database error "Prepared statement needs to be re-prepared". Please set it at least to 1400 (or -1 for autosizing). See here for more information.

I looked out at github the friendica help section and elsewhere but couldn't find help or hints.
@Tobias
table_definition_cache
Where do I find that setting or set it in some php file?