Forums / Basic Configuration / Access to Admin area in a local network from another machine:- Password problem

Access to Admin area in a local network from another machine:- Password problem

Views: 11,365

Results 1 to 14 of 14
14 Sep 2012, 5:44 AM
#1
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Access to Admin area in a local network from another machine:- Password problem

I have searched for this same issue on existing posts, found few, but none of showed a solution. so I am posting it here again.

I am seriously noob to zencart, dont know much about it. I have website which is built by Concrete 5 as CMS. My website has a menu item as <STORE>. This menu item should lead to the e-commerce feature. Since Concrete 5 has no such in built feature, I installed zencart in a sub folder inside concrete 5 website folder. I configured it and every thing working fine in LOCAL HOST

now, my boss want to check my work, he accessed my machine from another machine [we are in local network]. Suddenly, the css style sheets are missing. I checked the header file for css link tag. It seems like defined for local host.

So I edit config file as server name from local host to my local ip. So the css came alive. Now when I tried to access admin panel from another machine, it simply gave me password error. I switched it back my server address as localhost, then I can login..

what can I do for this?? please help

14 Sep 2012, 5:50 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Access to Admin area in a local network from another machine:- Password problem

The solution is simple: give your store a real domain name, and you'll be able to access it from other computers.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Sep 2012, 11:25 AM
#3
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

DrByte:

The solution is simple: give your store a real domain name, and you'll be able to access it from other computers.

thank you for the tip but could you be more detail?

my situation is

the zencart lies inside a c5 website directory

so the url is like http://localhost/mywebsite/store

the <store> folder contains all files of zencart. Now if I want to access from other machines in network, how can I rename the host name?? pls help me

same as that, the time I migrate this from localhost to live server, [that time, website name would be different], what kind of edits I will have to do?

thank you

14 Sep 2012, 11:40 AM
#4
aniketanyee avatar

aniketanyee

New Zenner

Join Date:
Sep 2012
Location:
Nagpur, India
Posts:
6
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

if u have internet connection......best way is to get your system IP (for localhost).......and call it from anywhere......so ur system now works like a server:P:D

14 Sep 2012, 6:50 PM
#5
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

So I edit config file as server name from local host to my local ip. So the css came alive. Now when I tried to access admin panel from another machine, it simply gave me password error. I switched it back my server address as localhost, then I can login..

Not sure if maybe you were just typing the password incorrectly for the admin, but i'm able to access our local test site from another computer on our network - using the same scenario you described:

changed configure.php files to reflect local ip (10.10.10.xx or 192.168.x.x or whatever). Then, from remote computer, navigate to http://xx.xx.xx.xx/sitefolder or xx.xx.xx.xx/sitefolder/admin - both work fine for me. In you case, I suppose it would be http://xx.xx.xx.xx/yourwebsite/store/admin.

I've experienced the css issue you describe when using localhost instead of ip, but never had issues accessing admin (on 1.39 and 1.50). Did you change both the /includes and the /admin/includes configure.php files?

ps - once you get this working, if your network uses dhcp instead of static ips, you'll lose access to the site if your ip changes, and need to update the configure files again. if this is a long term thing might want to give your computer a static ip to avoid that.

17 Sep 2012, 7:16 AM
#6
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

jc8125:

Not sure if maybe you were just typing the password incorrectly for the admin, but i'm able to access our local test site from another computer on our network - using the same scenario you described:

changed configure.php files to reflect local ip (10.10.10.xx or 192.168.x.x or whatever). Then, from remote computer, navigate to http://xx.xx.xx.xx/sitefolder or xx.xx.xx.xx/sitefolder/admin - both work fine for me. In you case, I suppose it would be http://xx.xx.xx.xx/yourwebsite/store/admin.

I've experienced the css issue you describe when using localhost instead of ip, but never had issues accessing admin (on 1.39 and 1.50). Did you change both the /includes and the /admin/includes configure.php files?

ps - once you get this working, if your network uses dhcp instead of static ips, you'll lose access to the site if your ip changes, and need to update the configure files again. if this is a long term thing might want to give your computer a static ip to avoid that.

thank you for the words. I tried it again, now its working!!!.. I can access admin from a remote machine in the local network as http://192.168.0.xx/websitename/store/zenadmin. All css files are also working. I guess this thread can be closed and marked as SOLVED.

17 Sep 2012, 7:52 AM
#7
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

OHHH WAIT>>>. dont close it...

one more problem..

I checked whether I can access zencart admin from remote machine after I put server name as my Ip Address. Yes I could access from remote machine. but I CANNOT access admin from my local machine.

I typed http://localhost/sitename/store/mesadmin

now, I cannot login to admin area. The username and password are correct. I changed servername back to localhost then yes I could login to admin from local machine.

Now the situation is :-

  1. servername in configure.php (both admin folder, parent folder) :- localhost

    .CAN login admin panel from local machine
     CANNOT login admin panel from remote machine
    
  2. servername in configure.php (both admin folder, parent folder) ;- my local IP i.e 192.168.0.xx

    CAN login admin panel from remote machine,
    CANNOT login admin panel from Local machine
    

How to resolve this?? pls pls help...

17 Sep 2012, 8:31 AM
#8
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

ok UPDATE:-

I tried some hack with configure.php. I added a variable like this

$serverip= $_SERVER['SERVER_ADDR'];

and in tweaked this line into

define('HTTP_SERVER', 'http://'.$serverip);

and filled same in all other necessary areas.

Now I CAN
1. login admin from local host
2. can login admin from remote host

one thing I notice is

the URL is now

http://127.0.0.1/sitename/store/adminfolder/

no localhost, no ip address.

but at least system is running and css is also working

thankx

17 Sep 2012, 12:58 PM
#9
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

if it's working for you, great - but I certainly wouldn't recommend mucking around in the configure.php too much, seems like that's just asking for trouble..

I simply access the site from the local computer using the same ip address. use http://192.168.0.xx from both the remote and the local computer. Should work fine..

17 Sep 2012, 4:32 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Access to Admin area in a local network from another machine:- Password problem

All those problems will go away when you give the site a proper domain name.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Sep 2012, 5:41 PM
#11
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

DrByte - I'm not sure I understand.. from what I gathered, the OP has their site installed locally to test before deploying to live server. Are you suggesting that a domain name should be used for local test installations? Not trying to sound argumentative, just wondering what the reasoning would be?

17 Sep 2012, 6:33 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Access to Admin area in a local network from another machine:- Password problem

Sure you can do a local installation, but a named URL will work better than just an IP address alone, because the session cookie that handles authentication often won't set correctly (especially with Chrome) if using only an IP address ... hence all the problems about logging in to admin etc.

As far as setting up a "name" instead of an IP address, that's basic networking. You can tell your computer to use a certain name/ip combination by editing your local "hosts" file. And if you're running your own webserver, you'll have the ability to set that up, usually with control-panel tools.
There are tons of tutorials all over the internet on how to set up private names for private personal networking. It has nothing to do with Zen Cart itself.

My point earlier was: all of the "hacks" being discussed should be REMOVED before going live with the site, since they're bandages being used only for the local test environment. Don't put all those configure.php hacks etc onto your live site.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Sep 2012, 2:37 AM
#13
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

DrByte:

Sure you can do a local installation, but a named URL will work better than just an IP address alone, because the session cookie that handles authentication often won't set correctly (especially with Chrome) if using only an IP address ... hence all the problems about logging in to admin etc.

As far as setting up a "name" instead of an IP address, that's basic networking. You can tell your computer to use a certain name/ip combination by editing your local "hosts" file. And if you're running your own webserver, you'll have the ability to set that up, usually with control-panel tools.
There are tons of tutorials all over the internet on how to set up private names for private personal networking. It has nothing to do with Zen Cart itself.

My point earlier was: all of the "hacks" being discussed should be REMOVED before going live with the site, since they're bandages being used only for the local test environment. Don't put all those configure.php hacks etc onto your live site.

Surely, I agree, tampering configure file is a security risk. I will remove these when I install website into Live Server, coz I will have a real domain name there. I want to try this domain in local machine also. I will look on some tutorials to do how.

thank you for the responses.

19 Sep 2012, 9:35 AM
#14
jeevanism avatar

jeevanism

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Re: Access to Admin area in a local network from another machine:- Password problem

One more Update.

I successfully hosted my zencart website to another machine in the network as part of a testing. I changed the configure.php define values as IP address and removed my tweaked codes. Now its working fine. Both administrator login and css.

The real culprit was google chrome. It doesnt allow me to login as admin but Firefox and IE working fine. As long as its fine, I dont care about this google's crap.

thanx all for the response.