Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After setup, cant login with admin credentials #39

Open
BDub-Hay opened this issue Feb 16, 2017 · 13 comments
Open

After setup, cant login with admin credentials #39

BDub-Hay opened this issue Feb 16, 2017 · 13 comments

Comments

@BDub-Hay
Copy link

Hello, this seems to be an old issue but one that I have not been able to fix. I am trying to install Zenbership on a server running Ubuntu 14.04.5, mysql 5.5.54, php 5.5.9, and Apache 2.4.7. I get through the setup with no problems. I delete the setup folder, change the permissions of the directories and create the cron jobs. When I enter the admin login credentials and hit enter the site tells me "staff member not found". I referenced Issue #19, and edited my.cnf by adding sql_mode=NO_ENGINE_SUBSTITUTION. I restarted mysql, then restarted the whole server and still not able to login to the admin account. I even deleted the zenbership directory, deleted the zenbership database and started all over. still not able to login. Any help would be greatly appreciated. If more info is needed like log info let me know where to get it and I will post it. Thanks.

@Jasper-Ben
Copy link

Can't reproduce the problem on debian jessie, mysql 5.5.54, apache2 2.4.10. Did you make sure you have all requirements installed?

sudo apt-get install php5-gd php5-mysql mcrypt php5-curl

and turned of Magic Quotes:
https://secure.php.net/manual/en/security.magicquotes.disabling.php

@kcmerrill
Copy link

I submitted a PR. I too was having this issue.

The problem I encountered was simply because I didn't have "remember me" selected. There is a mysql_clean function that didn't take into account "0" which was the remember me functionality was set to of you don't check the box.

PR here: #69

@kg4iae
Copy link

kg4iae commented May 30, 2017

I'm still having this issue. I did a new install on Ubuntu 16.04 PHP 7.0 and Mysql 5.6. I installed all the libraries list above. The database installed fine. There were no errors. When I login, with the correct information, it just goes back to the login screen. If I put in the wrong information, it gives me an error. I am seeing a javascript error: "uncaught ReferenceError: shortcut is not defined admin.js:48" I have been unable to find any errors on the server.

@Florencia007
Copy link

I had the same issue and then bought a hosting that had https://www.softaculous.com/apps/erp/Zenbership and it worked perfectly

@pfreal
Copy link

pfreal commented Jun 8, 2017 via email

@prodigy151
Copy link

sqlmode set to IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION fixed it for me and re do the whole setup process

@slashrjl
Copy link

@prodigy151 -- this fixed it for me too.
To add more information: after the database had been created, and the setup process completed, I reverted to the documented/default sql_mode (for mariadb) of simply NO_ENGINE_SUBSTITUTION.

login then worked normally from that point -- I am still testing this out as a replacement for our home-grown app.

@dirkdeb
Copy link

dirkdeb commented Oct 31, 2017

I followed all the official installation instructions, impliment all these sugestions and still I get the following error when I submit STEP 4.
"Fatal error: Declaration of ElggSite::delete() must be compatible with ElggEntity::delete($recursive = true) in /mnt/data/www/html/elgg/vendor/elgg/elgg/engine/classes/ElggSite.php on line 28"

I have Centos 7 php7.2 installed, mysqld Ver 5.7.20 for Linux on x86_64 (MySQL Community Server (GPL))
I dumped the database and start all over with the installation with the exact results.
Can anybody give me a hint on what this error tells me and if possible suggestions where to start fixing.

My /etc/my.cnf
[mysqld]
skip_ssl
sql_mode=NO_ENGINE_SUBSTITUTION,IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#useSSL=false
query_cache_limit = 1M
query_cache_size = 32M
key_buffer_size = 64M
max_heap_table_size = 256M
tmp_table_size = 256M
innodb_buffer_pool_size = 128M
log_bin=1
server-id=3
log_bin_index=rotraxidx
sync_binlog=1

@dirkdeb
Copy link

dirkdeb commented Oct 31, 2017

Hi I am sorry wrong complaint at wrong forum : )

@dirkdeb
Copy link

dirkdeb commented Oct 31, 2017

But having the same problem on Zenbership of not able to log in as administrator after installation.
Everything seems fine like going to the site as normal user, it shows the news and upcomming events page.
I have installed Zenbership on Centos php 5.6 and 7.2 on diverent Centos 7 servers mysqld Ver 5.7.20 for Linux on x86_64 (MySQL Community Server (GPL)).
See previous post (wrong one) for mysql server setup; /etc/my.cnf
I tried the admin reset password script as well.. with the same results.

After 3 or 4 tries it gives me "Account locked. Try again in 10 minutes." which indicates that the admin user was picked up in the database.
My URL: http://myserver/event/admin/login.php?n=eas4

Hope this gives someone a clue of what !
Thanx

@dirkdeb
Copy link

dirkdeb commented Oct 31, 2017

Ok I fixed the admin login problem faced after installation.
The mysql server password constraints was configured playing its part.
Make sure if this was changed from the default that your passwords at setup time conforms to these settings.
See: https://dev.mysql.com/doc/refman/5.7/en/validate-password-options-variables.html
https://stackoverflow.com/questions/36301100/how-do-i-turn-off-the-mysql-password-validation
Good luck !

@BDub-Hay
Copy link
Author

BDub-Hay commented Oct 31, 2017

sqlmode set to IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION fixed it for me and re do the whole setup process

prodigy151's solution pasted above fixed my issues. I switched up to Ubuntu 16.04 and I am running php7 version 7.0.22, apache2 version 2.4.18 and mysql version 14.14.

I did have one issue with prodigy151's solution and that is he neglected to tell us that we have to put that code under a group in the /etc/mysql/my.cnf file. It should look like this:

`[mysqld]

sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
`
I tried to use my existing setup after adding that line to the .cnf file but it still didn't work. I deleted my existing database then re-created the database. Just to be safe, i deleted the entire zenbership web directory (/var/www/html/zenbership) and replaced it with the contents of the zip file and went through the entire setup process again. Now I am off and running. Albeit a little disgruntled. I paid a paid service to do exactly what Zenbership will do. :-(

UPDATE 10-31-17
After looking at my mysql errors log i found the following entries:

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.

Based on the research i did these warnings were nothing to get too concerned about but I thought since i am testing Zenbership i might as well test it out with the updated cnf file.

Here is my updated my.cnf file:

`[mysqld]

sql_mode=STRICT_TRANS_TABLES,STRICT_ALL_TABLES,IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

explicit_defaults_for_timestamp=1
`

@jwkeffer
Copy link

jwkeffer commented Feb 4, 2019

I just installed on Ubuntu 16.04. Zenbership is all I have on that server. Here's what I had to do.

1.) Install php-crypt -- https://packages.ubuntu.com/xenial/all/php-crypt-gpg/download
I just downloaded the .deb and used dpkg to install it.
2.) Update the /etc/mysql/my.cnf I added the sqlmode statement just before the inludedir statements at the end of the file:
[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

3.) Turn off magic quotes for php. Since I'm only running zenbership on this server, I just wrote it into the /etc/php/7.0/cli/php.ini file. I added these lines just before the miscellaneous section:
;;;;;;;;;;;;;;;;;
; my changes;
;;;;;;;;;;;;;;;;;

; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of ').
magic_quotes_sybase = Off

;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;

Then reboot (I suppose you could restart the services, but I just bounced the box to get all the changes in place.)

Do this before you create the database... if not, go into mysql, drop the database and create it again.
(If you're interested, sql commands to create the database:
mysql -u root -p

CREATE DATABASE dbname;
GRANT ALL PRIVILEGES ON . TO 'username'@'localhost' IDENTIFIED BY 'password';
)

Otherwise, it was completely straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants