NancyJ
04-04-2007, 03:06 PM
I dont know if technically this should be a php or a mysql problem but I dont want to cross-post.
I'm including a database connection file from another website. eg. include(http://domain1.com/dbc.inc.php) is in my page on domain2.com - now I tihnk both these domains are on the same server but I tihnk thats probably irrelevant.
The issue is that the file includes and runs perfectly, it says it has successfully established a mysql connection, however when I try to use that connection it says there is no connection... or more correction it says Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in ...
Warning: mysql_query(): A link to the server could not be established in...
which usually means, you forgot to include your db script dummy. now I could just create 'dummy' pages that just have include(domain1.com/pagename.php) and that would work because we do a similar thing on other pages to grab the content.
I just dont understand why the connection that is created isnt available to the page.
I'm including a database connection file from another website. eg. include(http://domain1.com/dbc.inc.php) is in my page on domain2.com - now I tihnk both these domains are on the same server but I tihnk thats probably irrelevant.
The issue is that the file includes and runs perfectly, it says it has successfully established a mysql connection, however when I try to use that connection it says there is no connection... or more correction it says Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in ...
Warning: mysql_query(): A link to the server could not be established in...
which usually means, you forgot to include your db script dummy. now I could just create 'dummy' pages that just have include(domain1.com/pagename.php) and that would work because we do a similar thing on other pages to grab the content.
I just dont understand why the connection that is created isnt available to the page.