Topics

Tribe Support

Tribe Support's Topics

Connor Summeril

Connor Summeril

September 18 2021

Figuring out Authentication Include Error

He There! I was able to stand up my Anahita Server on a Debian 10 digital ocean machine. I registered the root user using the CLI tool. 

However, now I am having some problems with adding a new test user. My nginx log reports this,

2021/09/18 21:20:35 [error] 3894#3894: *30 FastCGI sent in stderr: "PHP message: PHP Warning:  require_once(/home/anahita-admin/openhmi/vendor/anahita/anahita/src/plugins/authentication/anahita.php): failed to open stream: No such file or directory in /home/anahita-admin/openhmi/src/libraries/default/plugins/helper.php on line 133PHP message: PHP Fatal error:  require_once(): Failed opening required '/home/anahita-admin/openhmi/vendor/anahita/anahita/src/plugins/authentication/anahita.php' (include_path='.:/usr/share/php') in /home/anahita-admin/openhmi/src/libraries/default/plugins/helper.php on line 133" while reading response header from upstream, client: *.*.*.*, server: openhmistaging.com, request: "POST /people/session HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "openhmistaging.com", 
2021/09/18 21:34:49 [error] 3894#3894: *175 upstream timed out (110: Connection timed out) while reading response header from upstream, client: *.*.*.*, server: openhmistaging.com, request: "POST /people/signup HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock", host: "openhmistaging.com", referrer: "https://openhmistaging.com/people/signup?return=***************************"
root@# cat /home/anahita-admin/openhmi/vendor/anahita/anahita/src/plugins/authentication/anahita.php
cat: /home/anahita-admin/openhmi/vendor/anahita/anahita/src/plugins/authentication/anahita.php: No such file or directory
So I tried to cat the file in question and I see it is not there.It looks like the path to /home/anahita-admin/openhmi/vendor/anahita/
Is actually /home/anahita-admin/openhmi/www/vendor/anahita-platform
Is there some way I can modify a configuration parameter to fix this?
Thanks!
Rastin Mehr
Rastin Mehr
September 19 2021 Permalink
If the file isn't there, then usually the symlinking didn't happen properly and it has to do with user permissions in your Linux environment.
Connor Summeril
Connor Summeril
September 20 2021 Permalink
Thanks Rastin! I have set the user permissions in my nginx and php-fpm configurations and I am no longer getting those errorsvf.

I'm still having some difficulties with mail functioning. The built in PHP sendmail function seem to be misconfigured or sending to somewhere unknown, is there a suitable configuration example floating around somewhere?

Additionally, when I go to change my avatar, the file seems to start loading and then I am redirected to a blank page, and nothing gets updated. Could this be related to the mailer not functioning or something else?

Thanks!
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
September 20 2021 Permalink
Excellent! The most reliable way to get the mail functioning working is to use an external SMTP service such as Mailgun. You can get your server to send out emails, but we have noticed that different environments have inconsistent default configurations and you have to figure out why your Linux or PHP not sending out emails. Also when you use a service such as Mailgun, you won't risk having your email notifications getting flagged as spam.
Rastin Mehr
Rastin Mehr
September 20 2021 Permalink
For the file, uploads DO USE AWS S3, because uploading files on your own server make your server more vulnerable. If your cloud hosting company has a different file storage product, you have to develop your own custom storage plugin to upload files.
OK I have tried setting up the S3 application. I have my IAM user set up. I have the keys and folders configured on my server but I am still getting the same behavior as before. It looks like the image is getting uploaded and then I am rerouted to a blank page and no image actually gets uploaded.

This is when trying to set the avatar picture. I don't see anything in the logs that suggests an error. I'm not really sure where to go from here, what do you think?
Rastin Mehr liked this
Do you get anything in your PHP error logs? Is your server setup to display maximum errors?

Looks like AWS is still not accepting your upload request. Do you see anything in your S3 bucket after each file upload? One way to go about it is to keep all the permissions on S3 open to get the Anahita setup working and then tighten the S3 security only to the point that allows file upload from Anahita.

Powered by Anahita