Page 1 of 1

http://domain.com/xxx.php -vs- www.domain.com/xxx.php

Posted: Wed Nov 13, 2002 8:45 pm
by jn148
Has anyone ever had any issue where a php script (this specific one is a very simple script to read a mysql db and displays results on the page) runs fine if you visit the page via http://domain.com but errors out if visited at http://www.domain.com

The error is:
>>>>>>>>>
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/***/***-www/shows.php on line 14
Error performing query:
<<<<<<<<<

Any advice would be greatly appreciated!
Thanks!
JN

Posted: Thu Nov 14, 2002 2:46 am
by twigletmac
Is there some code you can show us?

Mac

Posted: Thu Nov 14, 2002 4:22 am
by f1nutter
Are you sure that http://domain.com and http://www.domain.com point to the same site? I believe that the two can be different sites, owned by different people. Make sure that they are the same site using just HTML.

From the error it looks like you are hosting the site yourself, because you have the full path. Is the address of your page something like /home/usr/www.domain.com/shows.php and so your script is looking for a non-existant file at /home/usr/domain.com/shows.php

Can you get non-db scripts to work on either domain, like "Hello World"?

Are you including your db info from a seperate file, check your include directory in php.ini and phpinfo()

Try these and get back to us.

Posted: Thu Nov 14, 2002 5:28 pm
by m3mn0n
/www/ should be it's own folder above the domain name, how come the folder is named /www.domain.com/ ?

I've never seen that before.