Hi,
I'm in need of a desperate help to resolve this sub domain error. My main domain and subdomain has different ip address
When i ping localhost.com i get 127.0.0.1 and when i ping subdomain i get 64.64.99.32.
When i go to configuration ->subdomain settings i get above error.
i'm wamp on windows 8 server with drupal 7.10 and domain access 7.x-2.17
$cookie_domain = '.localhost.com';
$base_url = 'http://www.localhost.com';
Host file has
127.0.0.1 www.localhost.com
127.0.0.1:80 www.localhost.com
64.64.99.32 *.localhost.com
64.64.99.32:80 *.localhost.com
127.0.0.1 localhost.com
127.0.0.1:80 localhost.com
and my virtual host is set to
DocumentRoot "D:/wamp/www/ms/"
ServerName www.localhost.com
ServerAlias localhost.com*.localhost.com
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
I have been trying to resolve this since two days going through all forums and issues on this site. not able to resolve please help me.
Comments
Comment #1
rwohlebYou say it's not working because your domain and subdomain resolve to two different IPs. Well, you have it setup that way in your hosts file. Maybe I'm not understanding your issue.
Comment #2
srikar-1 commentedyes, When i click on sub domain settings i get the error message in subject line. How do i set it in hosts file. Could you please help me.
I see this error as well \SUBDOMAIN\INCLUDES\SUBDOMAIN.ADMIN.INC(455) : EVAL()'D CODE ON LINE 1
1 0.0005 676472 {main}( ) ..\index.php:0
2 0.3334 27945352 menu_execute_active_handler( ) ..\index.php:21
3 0.3358 28125328 call_user_func_array ( ) ..\menu.inc:503
4 0.3358 28125648 drupal_get_form( ) ..\menu.inc:503
5 0.3358 28126456 drupal_build_form( ) ..\form.inc:123
6 0.3358 28129064 drupal_retrieve_form( ) ..\form.inc:329
7 0.3359 28130472 call_user_func_array ( ) ..\form.inc:785
8 0.3359 28130872 subdomain_admin_settings( ) ..\form.inc:785
9 0.4421 28251056 _subdomain_validate_cookie_domain( ) ..\subdomain.admin.inc:179
I tried with 127.0.0.1 for both domain and sub domain, after wamp restart it still gives two different ip's when i ping.
Host file has
127.0.0.1 www.localhost.com
127.0.0.1:80 www.localhost.com
127.0.0.1: *.localhost.com
127.0.0.1:80 *.localhost.com
127.0.0.1 localhost.com
127.0.0.1:80 localhost.com
Do i need to edit code in anyplace not to get different ip for sub domains.
Thanks
Srikar
Comment #3
rwohlebWhat subdomain are you testing? Just 'www'? I'm pretty rusty on the Windows side, but your host file looks off. I don't know about using a wildcard (*) or ports (:80). You should also try restarting the machine as Windows may be cacheing the DNS lookup.
Comment #4
lovelykaushik86 commentedI got same errors when I tried to use this module. Here is the solution if u r using this module on your local setup
Host file:-
127.0.0.1 localhost.com
127.0.0.1 subdomain-test.localhost.com
vhosts file:-
DocumentRoot "D:/wamp/www/ms/"
ServerName www.localhost.com
ServerAlias *.localhost.com
for error(\SUBDOMAIN\INCLUDES\SUBDOMAIN.ADMIN.INC(455) : EVAL()'D CODE ON LINE 1) make changes in line 453
replace
if (strpos($setting, '$cookie_domain') !== FALSE)
with
if (strpos($setting, '$cookie_domain =') !== FALSE)
and if you are using proxy server so you have to make an entry of subdomain-test.localhost.com in proxy setting.
I hope this issue has been resolved
Comment #5
Sam Straub commentedFor anyone else looking at this and using Windows (at least with XP, not sure about 7), see this post and comment #1: http://drupal.org/node/444088
Wildcard subdomains don't work in Win XP etc/hosts file. You would have to explicitly set the subdomain up in your hosts file to test with. I learned this the hard way until someone pointed it out to me :)
Comment #6
ElZipo commented#lovelykaushik86: thank you.