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
http://domain.com/xxx.php -vs- www.domain.com/xxx.php
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
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.
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.
/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.
I've never seen that before.