| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#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.
|
|
|
|
|
|
#3 (permalink) |
|
Surpass Fan
Comfy Contributor
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. |
|
|
|
|
|
#5 (permalink) |
|
Surpass Fan
Comfy Contributor
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. |
|
|
|
|
|
#6 (permalink) | |
|
Registered User
Fresh Surpasser
Joined in Jul 2004
7 posts
Gave thanks: 0
Thanked 0 times
|
Quote:
|
|
|
|
|
|
|
#7 (permalink) |
|
Surpass Fan
Comfy Contributor
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. |
|
|
|
|
|
#8 (permalink) |
|
minor deity
Super #1
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 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! |
|
|
|
|
|
#9 (permalink) |
|
Surpass Fan
Super #1
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. |
|
|
|