Page 6 of 7

Re: Local installation

Posted: Sun Dec 04, 2016 16:32 UTC
by TheMightyDude
If your using Ubuntu you need install select LAMP in the install steps.
L = Linux
A = Apache
M = MySQL
P = PHP

I normally only select OpenSSH, LAMP and that's it.

I then let it go through all the install then do its reboot and then I go through and call as root apt-get update then apt-get upgrade and that's it.

Going by your PHP Info, you do not have MySQL installed yet.
Then set BNT to use mysqli

You may or may not need to install some php modules.

That should work.

As for permissions:
I normally add www-data to the owner of the group.

Say you have a user and group name of "bnt_user", the user and group of the web folder would be bnt_user:bnt_user
Apache is setup to use www-data as the user and group of webpages, this is why we added www-data to the bnt_user group in /etc/groups file.

This "should" allow for you to set the folder permission to 0750 (rwe r-e ---) meaing the owner has full access (Read, Write and Execute / Browse) where as the group only has Read and Execute / Browse access, if you get me.

Re: Local installation

Posted: Sun Dec 04, 2016 23:54 UTC
by Rincewind
Thanks for the pointers.. I definitely got mysql-server and client up and I can log into mysql via 'mysql -uroot -upass' also '-ubnt -pbnt'

and fiddle with the db, and it's listening on the standard port 3036 or whatever it is, but it's that one from db_config.php

I will try to find some kind of generic guide for LAMP setup, perhaps I did something in an unconventional way so it's not really set up properly.

I have this one older mac mini here so I thought I'd set it up as a BNT server to serve some kind of purpose. But it sure seems like renting some space would be a lot easier :D but I like to fiddle with stuff so.. haha

Re: Local installation

Posted: Mon Dec 05, 2016 01:39 UTC
by TheMightyDude
Ok, well if you have MySQL installed, then you need to install php5_mysql or php_mysql because it seems that php cannot talk to MySQL.

Re: Local installation

Posted: Mon Dec 05, 2016 01:41 UTC
by Rincewind
That was it! I had to install php5-mysql to install the mysqli module and then restart apache2 to use the new module!

Wow, it creates the universe (including sessions table).

But when I try to log-in it redirects me to the page where it says you need to login :D

Re: Local installation

Posted: Mon Dec 05, 2016 01:48 UTC
by TheMightyDude
Rincewind wrote:That was it! I had to install php5-mysql to install the mysqli module and then restart apache2 to use the new module!

Wow, it creates the universe (including sessions table).

But when I try to log-in it redirects me to the page where it says you need to login :D
I am still not seeing it on your PHP Info page?

Re: Local installation

Posted: Mon Dec 05, 2016 02:05 UTC
by Rincewind
Sorry, at work now and this is a separate installation which doesn't have external access.. I'll update my home installation in a bit

Re: Local installation

Posted: Mon Dec 05, 2016 06:51 UTC
by TheMightyDude
Rincewind wrote:Sorry, at work now and this is a separate installation which doesn't have external access.. I'll update my home installation in a bit
I will probably check tomorrow now, its 06:48 in the morning here in the UK and my chkdsk has just finished on the 4TB drive, not too sure how good chkdsk is due to it said there was no issues :shock:

As for you redirecting back to the login, that is due to the cookies failing.
Are you blocking cookies?

Also does Setup Info still work?

Re: Local installation

Posted: Mon Dec 05, 2016 11:12 UTC
by Rincewind
http://110.174.197.231:8081/bnt2/

This is the instance that works best (mysqli + adodb-session fixes on ubuntu).

Not blocking cookies.

If I enable cookies test in setup_info.php the page doesn't render. I have no errors in apache log either.
Rest of the tests pass.

Actually, this is the one error I see on apache error.log

Code: Select all

[Mon Dec 05 03:12:48.670895 2016] [:error] [pid 6464] [client 10.0.2.2:64658] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/bnt2/setup_info.php on line 223
Browser says:

Code: Select all

The 110.174.197.231 page isn’t working

110.174.197.231 redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
Looks like infinite loop of some sort. (also my cookies are empty, e.g. none exist for this domain)

Re: Local installation

Posted: Tue Dec 06, 2016 02:38 UTC
by TheMightyDude
Yeah, its not setting the cookie.
The way Setup Info works is it checks if the cookie is set if not it sets the cookie redirects back to itself and checks if the cookie is set, if it is then its passed, you can see what happens when it fails to set the cookie hence the redirected too much message.

I will look at that first error.

*** update 1 ***
OK, so you are not using adodb-session2.php but the one I changed.

It seems that adodb-session2.php breaks session stuff.

*** update 2 ***
DB CONNECTION Not Connected

Hmm, ok, I have fixed that foreach error.

Re: Local installation

Posted: Tue Dec 06, 2016 05:10 UTC
by Rincewind
TheMightyDude wrote:Yeah, its not setting the cookie.
The way Setup Info works is it checks if the cookie is set if not it sets the cookie redirects back to itself and checks if the cookie is set, if it is then its passed, you can see what happens when it fails to set the cookie hence the redirected too much message.

I will look at that first error.

*** update 1 ***
OK, so you are not using adodb-session2.php but the one I changed.

It seems that adodb-session2.php breaks session stuff.

*** update 2 ***
DB CONNECTION Not Connected

Hmm, ok, I have fixed that foreach error.
So, you could reproduce the error? I am asking because my ubuntu VM is powered down (was hogging my macbook air cpu causing it to overheat). The only one running now is just the Apache 2.4/php5.6.27 on OS X 10.11.3. but that doesn't have some of the other fixes you provided (but I can update that once I'm home).