Can't access my store on self-hosted server at 127.0.0.1
I see that this is an old thread, but it's the only one that comes close to the problems I'm having with getting zen-cart 1.5.1 to work properly on Mt. Lion set up as a server. Basically, the main problem is not being able to log into admin with the url set in both admin and store to either localhost or my local ip 192.168.1.7. Works fine with 127.0.0.1 - log in no problem and it even works with admin set to 127.0.0.1 in its configure.php and store's configure.php set to 192.168.1.7. I didn't have any problem installing a basic test site not using 127.0.0.1, so it wasn't the first change I made. Like jeffmic, I followed Dr. Byte's suggestion to changed the session.hash_function setting to 1, but I don't really know if that helped as I was still with the ip login. I've run test servers with zen-cart from Panther through Leopard, but I've never seen anything like this. I've been all over the web but haven't found anything about this except here. Oh, by the way in desperation I installed MAMP, and of course it works just fine. But really everything is already there in OS X -php, apache, and mysql easy to download and pretty easy to set up with all the tutorials on line. And I even popped for the $20 server app from apple, but that was really an after thought and didn't change anything. Oh, and I even reverted to an older version of mysql (5.5.41) than was installed with Mt. Lion hoping it would be more compatible with zen 1.5.1. My php is 5.3.28 and apache2 2.2.26.
At this point, I think I'll go with setting up a new test site using MAMP as my old test site is still running on a ppc under Leopard and hope that when I get around to updating to Mavericks or Yosemite the problem will just go away on its own.
Nevertheless, I sure would like to know what's going on here and would appreciate a response if anyone has any suggestions. And thank you to jeffmic and Dr. Byte for getting me this far along on the problem
Re: Multiple issues with new install on Mountain Lion Server
Can you give your ip address a "dns" name like in the hosts file?
I've seen that typically there is a problem when the host is an ip address instead of a "uri".
Re: Multiple issues with new install on Mountain Lion Server
Quote:
Originally Posted by
mc12345678
Can you give your ip address a "dns" name like in the hosts file?
I've seen that typically there is a problem when the host is an ip address instead of a "uri".
Thanks for getting back to me. Well I believe I've tried every variation I can come up with for configuring the hosts file and nothing really works completely.This is as good as it gets"
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
127.0.0.1 www.esftestsite.com
::1 localhost
fe80::1%lo0 localhost
I had to go back to 127.0.0.1 in the admin and store configuration.php files in order to log into the admin part.
It seems workable on my local computer, but connect with the site from others on my network is limited. 192.168.1.7 brings up the store but no access to admin. Oh well, it's something.
Re: Multiple issues with new install on Mountain Lion Server
Based on what has been posted, what I understand is that your configure.php files still have the ipaddress in them and that access is still attempted via ipaddress rather than by the "dns" name that has been given to the "site". Each "local computer would need to also have the hosts record in it to "map" to that local computer...
Re: Multiple issues with new install on Mountain Lion Server
Quote:
Originally Posted by
mc12345678
Based on what has been posted, what I understand is that your configure.php files still have the ipaddress in them and that access is still attempted via ipaddress rather than by the "dns" name that has been given to the "site". Each "local computer would need to also have the hosts record in it to "map" to that local computer...
Well I tried www.esftestsite in both configuration files and of course I started with 192.168.1.7, but only with 127.0.0.1 in the admin configuration.php am I able to log in, otherwise I get a server error message. Actually, now I have 127.0.0.1 in admin config and 192.186.1.7 in store config. Store works and admin is accessible on my local pc. And the store but not admin work from elsewhere on my network.
You say that Each "local computer would need to also have the hosts record in it to "map" to that local computer". How would that be done and what would that look.
Re: Multiple issues with new install on Mountain Lion Server
Quote:
Originally Posted by
roeghar
Well I tried
www.esftestsite in both configuration files and of course I started with 192.168.1.7, but only with 127.0.0.1 in the admin configuration.php am I able to log in, otherwise I get a server error message. Actually, now I have 127.0.0.1 in admin config and 192.186.1.7 in store config. Store works and admin is accessible on my local pc. And the store but not admin work from elsewhere on my network.
You say that Each "local computer would need to also have the hosts record in it to "map" to that local computer". How would that be done and what would that look.
So on the computer that is hosting the website I envision that there are to be two maybe three entries in the hosts file:
127.0.0.1 www.esftestsite
192.168.1.7 www.esftestsite
127.0.0.1 localhost
In the other computers of the intranet to have
192.168.1.7 www.esftestsite
in the configure.php files to then have the http_host='www.esftestsite' with the http_catalog = '/'
Make sense? The other computers need to know where to go when trying to access the "name" of the site (a sort of internal DNS) or a DNS server reference could be setup. Just some thoughts/concepts. May need to do more research to accomplish the task.
Re: Can't access my store on self-hosted server at 127.0.0.1
I've moved this discussion to its own thread, as it's related to running your own server on your own network, and isn't really a Zen Cart software issue.
Re: Can't access my store on self-hosted server at 127.0.0.1
Are you using this server as a local development server or is it supposed to be accessible by the public?
The answer to that question would determine how to set some definitions in your configure files respectively how to configure your server.
Re: Can't access my store on self-hosted server at 127.0.0.1
Quote:
Originally Posted by
mc12345678
So on the computer that is hosting the website I envision that there are to be two maybe three entries in the hosts file:
127.0.0.1
www.esftestsite
192.168.1.7
www.esftestsite
127.0.0.1 localhost
In the other computers of the intranet to have
192.168.1.7
www.esftestsite
in the configure.php files to then have the http_host='www.esftestsite' with the http_catalog = '/'
Make sense? The other computers need to know where to go when trying to access the "name" of the site (a sort of internal DNS) or a DNS server reference could be setup. Just some thoughts/concepts. May need to do more research to accomplish the task.
Thank you mc12345678. The set up you suggested works perfectly. I tried so many hosts file and configuration.php variations that I think I came close to what you suggested a few times but never got it to work completely over my intranet, and I never thought of making entries in the other local computers accessing my test site.
Still I wonder what's changed—my old test site on my G5 running Leopard works fine over the intranet just using 192.168.1.6 in both configuration.php files with no alteration to the hosts files. But, what the heck, I now can forget about this nagging problem and get back to work on testing new things before I transfer them to my live site.
Thanks