Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Problem logging into Admin after fresh install...

Problem logging into Admin after fresh install...

Views: 5,488

Results 1 to 17 of 17
15 Nov 2012, 00:46
#1
etienv avatar

etienv

New Zenner

Join Date:
Nov 2012
Posts:
1
Plugin Contributions:
0

Problem logging into Admin after fresh install...

I have just installed zen cart on a test server as I am exploring its function and interface. I am having difficulties logging into the Admin area. I have follow all instructions well and still seem to be unable to access this area of the store. I put in the user name and password for the admin account and then hit login and it just returns to the same login page.

There are no errors in either apache or mysql to narrow down the problem. From what I can see, the database it accesses to verify my user credentials is not being either accessed or updated with any information, as there is no values being written in the database as to date and attempts logging in, no activity shows at all in the database table "admin". I would guess the script is not accessing the database to verify my login.

The install went well, and the database is in the mysql server.

Not sure whats wrong here, but cant access the admin pannel at all.

SSL is no. Admin SSL no also
default configuration with demo store installed.
PHP, Apache2 MySQL and all modules are current and upto date.
test server does not have domain name and is only privately accessable.

15 Nov 2012, 03:12
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Problem logging into Admin after fresh install...

Use phpmyadmin and browse the admin table for users entered

If it were not addressing the DB - you would not get the login screen

17 Nov 2012, 19:43
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Problem logging into Admin after fresh install...

That takes me to the login screen

Try clearing your browsers cache

20 Nov 2012, 06:47
#5
wapa17 avatar

wapa17

New Zenner

Join Date:
Mar 2009
Posts:
2
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

Same here:
fresh installation of ZENCART 1.5.1 on a cherokee webserver 1.2.101, MYSQL 5.5.25, PHP 5.3.14

The admin-page didn't come up at all: Too many redirections detected.

Solution: in "admin/includes/application_top.php" search for the line

if (!isset($PHP_SELF)) PHP_SELF = $_SERVER['PHP_SELF'];

and replace it with

$PHP_SELF = $_SERVER['SCRIPT_FILENAME'].$_SERVER['PHP_SELF'];

Worked for me.
BTW: The same trick do it for OS-Commerce.

03 Dec 2012, 15:10
#6
noi_ng avatar

noi_ng

New Zenner

Join Date:
Dec 2012
Location:
Singapore
Posts:
27
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

Did Fresh Install of Zen Cart 1.5.1.
PHP Version 5.3.10/ Apache Version Apache/2 My SQL 5.1.61
Successfully installed on a test site with ip address only.
Managed to reach Admin login screen using Safari 5.1.7.
Can't login from Safari in spite clearing cache/ resetting safari/ allowing cookies etc. Still can't login. Just stayed on same screen.
Tried logging in using IE & Firefox, login to admin successful.
Managed to see session logs via pHP admin (sessions correctly log) .
Any idea how to get around with Safari, my default browser?
Appreciate any tips.

05 Dec 2012, 09:26
#7
noi_ng avatar

noi_ng

New Zenner

Join Date:
Dec 2012
Location:
Singapore
Posts:
27
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

Yes I did clear the cache & allow cookies all mentioned in the doc.
Problem is I only have issue with Safari for latest fresh install 1.51. On old v 1.3.7, safari was working perfectly.
Firefox & IE no problem.
Safari brings me to login screen but enter password won;t do anything. Just remains at login.
If I can't pass through Safari it is bad cos it means I can't access admin via ipad too.

07 Dec 2012, 01:18
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Problem logging into Admin after fresh install...

Have you tried with your iPad?

09 Dec 2012, 15:38
#9
noi_ng avatar

noi_ng

New Zenner

Join Date:
Dec 2012
Location:
Singapore
Posts:
27
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

dbltoe:

Have you tried with your iPad?
I tried on iphone. Can't also. Haven't tried on ipad.

12 Dec 2012, 16:36
#10
noi_ng avatar

noi_ng

New Zenner

Join Date:
Dec 2012
Location:
Singapore
Posts:
27
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

noi.ng:

I tried on iphone. Can't also. Haven't tried on ipad.
Everything is fine now. I can login the admin from all browsers Safari (also on iphone), Firefox & IE.
Just as I suspected, I was just testing on a test domain which was not resolved. This works for other browsers except Safari.
Somehow Safari stayed on admin page even after submission.
I reinstalled zen cart 1.51 on another resolved domain & login has no issue now from Safari.
I am posting this updates for the benefit of other zenners stucked.
Thank you all those who posted reply on my query.

05 Feb 2013, 15:35
#11
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

I am having a similar (or maybe the same) problem. I just did a fresh install of 1.5.1. No problems during the install but I can not log in. I am carefully entering the password I selected during installation but there is no error message or anything, just keeps returning to the log in. I can see in the database that ZC is logging the admin activity so it's clearly connected to the database. However, when I look in the admin table (not the activity log) there are no failed logins showing.

The only unusual thing about this installation is that I've installed it on a test server so the site is using an IP address instead of a domain name. This was set up in the config files but I'm wondering whether this has something to do with the problem.

Any advice?

05 Feb 2013, 16:13
#12
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

earmsby:

I am having a similar (or maybe the same) problem. I just did a fresh install of 1.5.1. No problems during the install but I can not log in. I am carefully entering the password I selected during installation but there is no error message or anything, just keeps returning to the log in. I can see in the database that ZC is logging the admin activity so it's clearly connected to the database. However, when I look in the admin table (not the activity log) there are no failed logins showing.

The only unusual thing about this installation is that I've installed it on a test server so the site is using an IP address instead of a domain name. This was set up in the config files but I'm wondering whether this has something to do with the problem.

Any advice?

Just a bit more... since this is a test site, I can put some print_r statements into the login file to try to see what is happening. I added a statement to try to see what data the form is sending and it doesn't look like any POST data is being sent by the form submission. That would explain why the page just basically refreshes when you hit the login button. I also tried just inserting a print statement right after the line of code that says:

if (isset($_POST['action']) && $_POST['action'] != ''){

My thought was that I should see my print statement text if the form was submitting but it doesn't show.

Is there something about using an IP address instead of a domain name that would cause the form not to submit? It doesn't make any sense but I'm completely at a loss as to why this isn't working.

One more thing, I thought it might be a problem with Sessions so I added a print_r statement to the top of the page to show the session data and that seems to be in place.

05 Feb 2013, 16:49
#13
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Problem logging into Admin after fresh install...

If you are using non-routable (private) IP addresses, you may have issues with some browsers / web servers (depending upon configuration). If your web server is doing name resolution you will have some issues with using an IP address (depends on the server configuration).

Your best bet is to assign your web server a host name / domain name. This was also the resolution used by the original poster of this thread.

Hint: If you use a local environment on your local computer you can alter the host file to include the name you wish to resolve to "127.0.0.1".

05 Feb 2013, 17:45
#14
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

Thanks lhungil, I don't entirely understand what you're saying but it sounds like you think the IP might be the problem. I did try making a test php page with a form and it successfully spits back the form data using print_r($_POST);

The reason I'm using an IP address is that my client has a live store under their domain on another server. I am in the process of moving their site to a new dedicated server (and upgrading ZC at the same time) so I have a test ZC site on the new server but I can't use their domain on this server until we're ready to actually go live on the new server. So, if the only solution to this issue is to assign a domain name, I'm not sure how I can possibly proceed.

???

05 Feb 2013, 17:49
#15
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

Aha... I read through everyone's postings again and noticed someone said it worked in other some browsers. I've been using Chrome so I tried Firefox and lo and behold it worked. I wonder what the difference is in the way Chrome and Firefox handle this?

05 Feb 2013, 20:51
#16
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Problem logging into Admin after fresh install...

Well, half a day later and lhungil was absolutely right. It needed to have an actual DNS that resolved correctly. The tech people for my new server helped me figure out how to add an A record on the live server to point the testing subdomain to the IP I was using on the new server. Once that took effect, the whole thing works correctly (after I changed the appropriate values in the config files of course).

Hallelujah! :D

05 Feb 2013, 21:25
#17
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Problem logging into Admin after fresh install...

Thank You for reporting back and glad you were able to get things working :)