Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to DB

Status
Not open for further replies.

krimchick

Technical User
Aug 11, 2006
1
UA
Hi, new to all this and cluless still, but trying.

I have a CMS, and a bloghosting script. Within the CMS I pull some things from the bloghosting database and place them inside. I use, in the header, this:

<?php
include "mysqlcon.php";
include "functions.php";
?>

And it works.

But I have a forum on the same server, but a different url. So I cannot use the above, and if I place an absolute path I get errors, like:

Warning: Unknown( failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/.../core/core.functions.php(570) : eval()'d code on line 13

Warning: Unknown( failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/.../core/core.functions.php(570) : eval()'d code on line 13

Warning: (null)(): Failed opening ' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/.../core/core.functions.php(570) : eval()'d code on line 13

Is there a way I can link to these 2 files?

Thanks,

Lena
 
You can use the same connect sciprt but you need to modify the host (instead of localhost, you could try teh server IP or dns name), you may need to add a port (normally 3306).
ensure that your username and password are correct.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top