473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Problem connecting from PHP

Strangely enough, I can connect from a another computer in the network but not from the MSSQL server itself.

Like this it works:

PC1 apache/php (eg.192.168.100.3) to:

PC2 MSSQLSERVER(eg.192.168.100.240)

with this configuration:

$server = "192.168.100.240,3730";
$user = "sa";
$passwd = "mypass";
$conn = mssql_connect($server, $user, $passwd);

But like this not:

PC2 apache/php (192.168.100.240)
PC2 MSSQLServer(192.168.100.240 -> the same pc)

with this configuration:

$server = "127.0.0.1,3730";
$user = "sa";
$passwd = "mypass";
$conn = mssql_connect($server, $user, $passwd);

Any clues?
thnks
Nov 14 '07 #1
1 1517
Strangely enough, I can connect from a another computer in the network but not from the MSSQL server itself.

Like this it works:

PC1 apache/php (eg.192.168.100.3) to:

PC2 MSSQLSERVER(eg.192.168.100.240)

with this configuration:

$server = "192.168.100.240,3730";
$user = "sa";
$passwd = "mypass";
$conn = mssql_connect($server, $user, $passwd);

But like this not:

PC2 apache/php (192.168.100.240)
PC2 MSSQLServer(192.168.100.240 -> the same pc)

with this configuration:

$server = "127.0.0.1,3730";
$user = "sa";
$passwd = "mypass";
$conn = mssql_connect($server, $user, $passwd);

Any clues?
thnks
I have no idea why this happens.. just as a info here is my config:

MSSQL Server 2005 Express with Management Studio
Default settings, user "sa" active from installation.

if anybody have any idea please post! thnks
Nov 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ali | last post by:
I'm trying to write a really basic chat program that allows 2 client programs to send messages to each other via a server. I've managed to write the code so that both clients can connect to the...
1
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for...
4
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into...
3
by: David | last post by:
Hi, Ive been trying to work this out for the past 2 days now and im not getting anywhere fast. The problem i have is that i am using Asynchronous sockets to create a Socket Client library....
3
by: W Akthar | last post by:
Hi I am trying to create a windows service which queries SQL Server on timed intervals and depending on the results send appointments to Outlook. The problem lies when I try to create an...
2
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
4
by: snowweb | last post by:
I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but...
0
by: NoaGross | last post by:
Hi, I'm relly new in java and I have a problem. I'm using java applet. When using http all ok, but when trying to use https i get: Java Plug-in 1.5.0_10 Using JRE version 1.5.0_10 Java...
1
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning:...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.