installing friendica 2021.01 on shared hosting
https://github.com/friendica/friendica/releases/tag/2021.01
downloads
full-2021.01.tar.gz
friendica-addons 2021.01.tar.gz
The files were unpacked and uploaded via ftp to the server.
The initial install check page displays only one issue.
ImageMagick PHP:
No está instalada la extensión ImageMagick PHP - Optional requirement not satisfied
Activating display PHP errors the following warning message is displayed:
Warning: shell_exec() has been disabled for security reasons in /var/www/virtual/../htdocs/src/Core/Installer.php on line 254
This probably will effect proc_open
.
What other issues will or might come up by experience with this kind of restricted setup?
--------------------------------------------------------------------
After completing the initial install process visiting the admin panel for the first time the option proc_open
:
Don't use "proc_open" with the worker
is enabled and fixed by default.
---------------------------------------------------------------------
Cron job enabled:
enabled url executed: https://subdomains.domain.com/worker */5 * * * *
---------------------------------------------------------------------This is Friendica, version 2021.01 that is running at the web location https://subdomain.domain.com. The database version is 1384/1383, the post update version is 1383/.
Roland Häder likes this.
Friendica Support reshared this.
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Admin panel and settings panel seem to work well.
/profile/admin
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•No line above.
In the admin panel there is the following line:
PHP Version 7.4.21
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Trying to activate:
Administration - Logs
Enable Debugging
/admin/logs/view says:
Should I create a folder /log and he respective friendica.log?
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Just created the log file, first entry:
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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}
2021-07-22T13:05:01Z index [NOTICE]: no data for session {"session_id":"utnoe5qtf85oj838rrjv32tanv","uri":"\/worker"} - {"file":"Database.php","line":72,"function":"read","uid":"43c183","process_id":18245}
2021-07-22T13:06:21Z index [... show more
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}
2021-07-22T13:05:01Z index [NOTICE]: no data for session {"session_id":"utnoe5qtf85oj838rrjv32tanv","uri":"\/worker"} - {"file":"Database.php","line":72,"function":"read","uid":"43c183","process_id":18245}
2021-07-22T13:06:21Z index [ERROR]: DB Error {"code":1615,"error":"Prepared statement needs to be re-prepared","callstack":"DBA::selectToArray, Network::getItems, Network::content, call_user_func, Page::initContent, Page::run, App::runFrontend","params":"SELECT * FROM `network-thread-view` WHERE (`uid` = 2) ORDER BY `received` DESC LIMIT 40"} - {"file":"Database.php","line":662,"function":"p","uid":"286044","process_id":18245}
2021-07-22T13:06:21Z 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":"286044","process_id":18245}
2021-07-22T13:06:24Z index [ERROR]: DB Error {"code":1615,"error":"Prepared statement needs to be re-prepared","callstack":"DBA::selectToArray, Network::getItems, Network::rawContent, call_user_func, Module::run, App::runFrontend","params":"SELECT * FROM `network-item-view` WHERE (`unseen` = 1 AND `gravity` = 0 AND `uid` = 2) ORDER BY `received` DESC LIMIT 100"} - {"file":"Database.php","line":662,"function":"p","uid":"32e0cc","process_id":18245}
2021-07-22T13:06:25Z 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":"0de3be","process_id":18245}
2021-07-22T13:06:25Z 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":"0de3be","process_id":18245}
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•In the admin panel the one I posted first.
The other debug info is from the log file:
Michael Vogel
•'pdo_emulate_prepares' => true,
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•¿?
Where do I find this to set it?
I guess in the DB?
Where?
Adam
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup likes this.
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•¿Something like this @Michael Vogel ?
local.config.php
Anubis2814 reshared this.
Adam
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Nope, waiting for a thumbs up by the boss ..
Michael Vogel
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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!
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•looks good!
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Internal Server Error → squeet.me/dfrn_request
'https://squeet.me/dfrn_request/jesuisatirebitpickup&addr=6269747069636b75704066656469766572732e747570616d6261652e636f6d is not a relative path, please use System::externalRedirectTo
Exception thrown in /var/www/virtual/../htdocs/src/App/BaseURL.php:451
Stack trace:
#0 /var/www/virtual/../htdocs/src/Model/Contact.php(2198): Friendica\App\BaseURL->redirect()
#1 /var/www/virtual/../htdocs/mod/follow.php(188): Friendica\Model\Contact::createFromProbe()
#2 /var/www/virtual/../htdocs/mod/follow.php(125): follow_process()
#3 /var
Internal Server Error → squeet.me/dfrn_request
'https://squeet.me/dfrn_request/jesuisatirebitpickup&addr=6269747069636b75704066656469766572732e747570616d6261652e636f6d is not a relative path, please use System::externalRedirectTo
Exception thrown in /var/www/virtual/../htdocs/src/App/BaseURL.php:451
Stack trace:
#0 /var/www/virtual/../htdocs/src/Model/Contact.php(2198): Friendica\App\BaseURL->redirect()
#1 /var/www/virtual/../htdocs/mod/follow.php(188): Friendica\Model\Contact::createFromProbe()
#2 /var/www/virtual/../htdocs/mod/follow.php(125): follow_process()
#3 /var/www/virtual/../htdocs/src/LegacyModule.php(90): follow_content()
#4 /var/www/virtual/../htdocs/src/LegacyModule.php(64): Friendica\LegacyModule::runModuleFunction()
#5 [internal function]: Friendica\LegacyModule::content()
#6 /var/www/virtual/../htdocs/src/App/Page.php(332): call_user_func()
#7 /var/www/virtual/../src/App/Page.php(389): Friendica\App\Page->initContent()
#8 /var/www/virtual/../src/App.php(562): Friendica\App\Page->run()
#9 /var/www/virtual/../index.php(40): Friendica\App->runFrontend()
#10 {main}
Michael Vogel
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Apparently, on a first glimps, it does ..
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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?
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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)
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Where do I find that?
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•I'm on a shared hosting, no access to /etc/php...
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Why apache2?
Isn't .htaccess something that always works?
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Right.
But why 2?
Isn't that true for apache(1) too?
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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!
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Didn't find any permissions settings for worker.php
How should they be set?
elrido
•Finally, as an alternative, if you can't figure out how to make it executable, you can use the (already executable) php binary to call the worker. In the cronjob, you would then give the absolute path to the php binary, space, then the absolute path to your worker.php. For example if your php binary were to live at /usr/bin/php7 (that path is something you need to look up in your hosters documentation) and the worker would be /var/www/hostname/friendica/bin/worker.php (the PHP-Info page in the Friendica administration should let you deduce that path) then the resulting full cronjob command would be "/usr/bin/php7 /var/www/hostname/friendica/bin/worker.php".
Please do keep in mind that:
- the worker.php prov... show more
Finally, as an alternative, if you can't figure out how to make it executable, you can use the (already executable) php binary to call the worker. In the cronjob, you would then give the absolute path to the php binary, space, then the absolute path to your worker.php. For example if your php binary were to live at /usr/bin/php7 (that path is something you need to look up in your hosters documentation) and the worker would be /var/www/hostname/friendica/bin/worker.php (the PHP-Info page in the Friendica administration should let you deduce that path) then the resulting full cronjob command would be "/usr/bin/php7 /var/www/hostname/friendica/bin/worker.php".
Please do keep in mind that:
- the worker.php provided by the Friendica git repository and tar.gz archive is executable, hence, if installed correctly, there is no need to make it executable and so there is no documentation on this provided. You must have (inadvertently) copied the file over to the host incorrectly or using a non-UNIX operating system that doesn't understand executable permissions.
- cron job handling is very host / hosting software specific, so the Friendica project can't provide a simple one-size fits all solution, and can't predict how it works on every possible hosting environment, hence friendica has to rely on your knowledge of your hosters cron behaviour.
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•@elrido
some how the
CHMOD
permissions where set to644
changed to
755
thx
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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.
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•is ..
mindblowing
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/close
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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:
bitPickup
2021-07-25 07:38:13
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.
Michael Vogel
•…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•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 ..]
…ᘛ⁐̤ᕐᐷ
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•Somehow the connection seems to work, starting to test what interactions work …ᘛ⁐̤ᕐᐷ
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•I looked out at github the friendica help section and elsewhere but couldn't find help or hints.
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•/admin wrote:
I looked out at github the friendica help section and elsewhere but couldn't find help or hints.
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
•