Tribe Support

Tribe Support's Topics

Gregg N-A

May 09 2018

Errors with vanilla installation of Anahita under MAMP (meets requirements)

Hello. I'm trying to get a basic installation of Anahita under MAMP working. I've tried several times. My environment meets all of the requirements in the The only difference is the mysql server is not running under MAMP but rather outside the environment - but that should be fine. mysql connectivity isn't an issue. I'm having several issues:

  1. I create the initial admin user. Subsequent user creation I click a verification link and it says the URL cannot be found.
  2. "Plugins" under Site Settings says "Something went wrong!"
  3. The main page (index.php) only shows "Streams, Stores, Articles, To-dos, Photos, Topics" in a bullet-pointed list. No banner, nothing else shown. And their links don't even work.
  4. Apache error_log shows "File does not exist: /Applications/MAMP/sites/gemsocial/anahita/www/com_composer, referer: http://gemsocial:8888/index.php"
  • Is there a more complete document with basic installation instructions somewhere that I'm missing?
  • I also tried enabling the Rewrite Engine in both the Apache configuration as well as Site Settings.
  • Also, I used the github latest branch as well as the stable version via the composer.phar create-project command. Speaking of which, should there be a symlink from "composer.phar" to "composer" (and where)?Any ideas would be much appreciated! Thanks!

Looks like your Anahita isn't installed properly. Is there a configuration.php file? Set:
var $debug = '1';
var $error_reporting = '30719';

To generate some error messages.
Also check to see if extensions are simlinked properly. Does system have permissions to create or remove symlinks in the www directory?
Hi Rastin - Thanks for the help!

All the processes are executing under my account (Mac) -- Apache, anahita, terminal, etc.
I've enabled the debug and error_reporting. Unfortunately they don't report much.

When I go to the main anahita page there's only a warning message "Warning: count(): Parameter must be an array or an object that implements Countable in /Applications/MAMP/sites/gemsocial/anahita/src/libraries/default/base/controller/behavior/serviceable.php on line 34". Nothing in created in the www/log directory.

The Apache error_log has an error "[Fri May 11 17:18:43 2018] [error] [client ::1] File does not exist: /Applications/MAMP/sites/gemsocial/anahita/www/com_composer, referer: http://gemsocial:8888/"

I also have a full ls listing here. Could someone verify this looks correct?

It seems the symlinks are all correct... They should be the /path/to/full/directory and not relative to the anahita/www directory, right? Also, the Apache log error message pointing to "/Applications/MAMP/sites/gemsocial/anahita/www/com_composer" whereas that doesn't exist -- Tells me something didn't get installed correctly here?
Rastin Mehr liked this
I wonder if any of the apps are breaking Anahita. Could you please start with a default installations first without any apps (packages) installed and see if everything is working? Then install one app at a time until one of them break your installation.
Hmm, true... that could be a possibility. Good call. I'll do a fresh installation this evening and get back here. Thanks!
Rastin Mehr liked this
Also install #Mailcatcher for your local smtp, otherwise you'll get an error when Anahita tries to email out notifications:
Thanks for the tip on the mailcatcher; MAMP actually has a postfix config where it can handle some outgoing mail properly (e.g. setting domain, authenticating elsewhere, etc.) as well.

Well, I tried re-installing and it has the same symptoms without adding on any packages. I also verified OPcache & APCU (I overlooked this before but appears it doesn't make any difference). I also checked any suhosin config (but MAMP doesn't have any such patch installed for php) because I found this in the php error log:

[12-May-2018 08:09:04 UTC] PHP Recoverable fatal error: Method ComStoriesControllerStory::__toString() must return a string value in tmpl://com:base.template.stack on line 27

So, with that said, I went over to my CentOS VPS, created a new sub-domain for a lab, and installed Anahita. And, it worked just fine with a basic install! So, I'm doing things correctly, but something weird is prohibiting things from working on my Mac MAMP installation.

I'll do some comparisons between the two and try to figure some things out. It's gotta be some sort of configuration, version issue, etc. somewhere!

I'll report back. :) Thanks!
Rastin Mehr liked this
I'm using MAMP too. Did you install Anahita at the root directory where mamp is pointing to or it is a subdirectory? I always point Mamp to use the www directory as document root. This summer we're going to invest time in building a docker image so people can easily setup Anahita and also deploy it. A lot of problems that people experience are often due to inconsistencies in their development and server environments.
In my MAMP I created another host for this specific purpose (Anahita); so it's separate from everything else. On my first dozen (LOL) attempts, I pointed Apache to use the anahita/www directory as the document root. On my VPS, I changed it a little bit and used ~account/public_html as the document root, ~account/anahita as the create-project (from composer) root, and put a symlink from ~account/anahita/www -> ../public_html and it worked just fine.

Seeing that I got my VPS to work, I tried the same installation steps and directory hierarchy on both my MAMP and AMPPS installation (I tried AMPPS first this time).

Here's what I found out in the past half hour or so under my MAMP & AMPPS -- more info:

1. Initial structure set up via composer create-project anahita. linked the www to ../www.
2. Did a site:init (fresh database setup, of course)
3. Pointed web browser to localhost:8888. Anahita welcome page verified it comes up properly (with Anahita logo, login button upper-right corner, etc.).
4. Created first account -- admin. It kept me logged in.
5. Went back to the main home page. It didn't display properly. It displayed Streams and Stores, but nothing else (no banner, profile in upper-right corner, etc.).
6. Opened an incognito browser session and pointed to main page. It displayed properly (not logged in, of course). Closed this incognito window.
7. Logged out as admin, couldn't log back in. Maybe I need to activate account now?

So... Additionally,

8. I did notice an email sent (in my postfix spool directory) upon account. I tried to click on the link in the email and it said invalid link.
9. Cut & paste the token from the email URL (activation link). It didn't work. The site said invalid link.
10. Went into the mysql database, I did an update set activation_code = '4f31392f3d870046082ff09ae37f9dd68a60a71f36e5e8411ca7240dbcaef93a' on an_people_people where email = '';
11. Went back to the same URL that was previously emailed. Activated account.
12. Logged in as the administrator
13. Went back to the main home page (index.php) and the same thing happens... It doesn't display correctly.

I wonder what is going on here? It seems like a logged in user is throwing things off?

BTW... On the VPS, the activation link sent to the email didn't work as well (said invalid link). So, I followed the same process by UPDATE'g the mysql database and going back to that link to activate the account. Then, I could login as the admin account. AND, the main page displayed properly (banner, profile for the currently logged in user (admin) in the upper-right corner, etc.).
Here is a tip, you can delete all records in the sessions table and try logging in again. Try to get some kind of error message so I can help you.
Quick update here. I haven't touched this in several days to try and get it to work. It's very puzzling how it'll work on my VPS but not my Mac MAMP or AMPPS environments. This makes me think it could be an environmental issue (e.g. something within MAMP clashing with my system-wide Mac stuff) but I really don't know what since the PHP is defined within MAMP itself... Maybe I'll try downgrading a MAMP version (if there is another version) or try it under Windows...

For now, I've sent some things off to a colleague for him to try it in his MAMP environment. Maybe he can get it working and I can compare my environment to his.

Thanks for the help... More soon! :)
What version of MAMP are you using? I am currently using version 4.0.5 with Nginx, MySql 5.6.28, php 7.0.10, and cache off.

Powered by Anahita