icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » i need to connect to my data base

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old October 18th, 2004, 3:17 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jul 2004
7 posts
Gave thanks: 0
Thanked 0 times
i need to connect to my data base

ok i am still tring to learn all this,but i have my web site set up on surpass and wish to make some changes to it,but i need it to connect to my data base on my cpu.i run mssql server 2000 and i would like my php scripts to connect to the database on my cpu for login info and other services.can this be done.
phillips42 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 3:30 PM   #2 (permalink)
Rai
Senior Member
Super #1
 
Rai's Avatar
 
Joined in Nov 2003
Lives in Canada
Hosted on Pass14
3,770 posts
Gave thanks: 4
Thanked 20 times
Surpass does not allow remote connections to mysql, so no, this can't be done.
__________________
Rai is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 4:00 PM   #3 (permalink)
Surpass Fan
Comfy Contributor
 
pbflash's Avatar
 
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
It looks like he wants to do a remote connection to his own PC. I think this is possible if he had a dedicated IP to his local PC and his ISP allowed remote connections.
__________________
Pass14
www.tqwebservices.com
www.autoappraisalsunlimited.com
www.clevelandlayne.com
Pass18
www.estateagency.com.au

Some people drink deeply from the fountain of knowledge. Others just gargle.
pbflash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 4:31 PM   #4 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jul 2004
7 posts
Gave thanks: 0
Thanked 0 times
yes i just want my php scripts that is on my surpass web site to connect to my database at home.can this be done?
phillips42 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 4:49 PM   #5 (permalink)
Surpass Fan
Comfy Contributor
 
pbflash's Avatar
 
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
It is possible. You would need to set your scripts up with the info to connect to your pc. Something like this:
mssql_connect ("IP,port", "username", "password")

You would need to know the IP assigned to you by your ISP which is always changing. On dial up you get a new one every time you connect, for DSL or Cable, you might get one for 3 days depending on your ISP's settings. You would need to constantly change your script with the new IP.
__________________
Pass14
www.tqwebservices.com
www.autoappraisalsunlimited.com
www.clevelandlayne.com
Pass18
www.estateagency.com.au

Some people drink deeply from the fountain of knowledge. Others just gargle.
pbflash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 4:56 PM   #6 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jul 2004
7 posts
Gave thanks: 0
Thanked 0 times
Quote:
Originally Posted by pbflash
It is possible. You would need to set your scripts up with the info to connect to your pc. Something like this:
mssql_connect ("IP,port", "username", "password")

You would need to know the IP assigned to you by your ISP which is always changing. On dial up you get a new one every time you connect, for DSL or Cable, you might get one for 3 days depending on your ISP's settings. You would need to constantly change your script with the new IP.
i have done this but it still wont connect.i have opened a port to my database but not sure how to tell php the port to use.
phillips42 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 5:00 PM   #7 (permalink)
Surpass Fan
Comfy Contributor
 
pbflash's Avatar
 
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
It's in the connect statement. IP,port or it may be IP:port.
__________________
Pass14
www.tqwebservices.com
www.autoappraisalsunlimited.com
www.clevelandlayne.com
Pass18
www.estateagency.com.au

Some people drink deeply from the fountain of knowledge. Others just gargle.
pbflash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 5:00 PM   #8 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
mssql_connect ("IP,port", "username", "password")

that's the PHP call to grab from your computer.

So, if your home DB is open on port 45455
mssql_connect ("xxx.xxx.xxx.xxx,45455", "username", "password")
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 18th, 2004, 5:01 PM   #9 (permalink)
sam
Surpass Fan
Super #1
 
sam's Avatar
 
Joined in Dec 2003
Lives in NJ
5,057 posts
Gave thanks: 0
Thanked 4 times
we neither support nor recommend such a configuration.

you may possibly get this working, don't be surprised if future changes to the network end that.

my advice - convert the MS SQL database to mysql and load the database up on your site. that's going to be far, far faster than connecting over the internet.
sam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On