Results 1 to 6 of 6
Hey,
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'SQL server' in /var/www/cam.php on line 2
Unable to connect
Is the problem in my code or connection in my office?
Any ...
- 10-23-2009 #1Just Joined!
- Join Date
- Aug 2009
- Posts
- 80
Error: How to fix it?
Hey,
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'SQL server' in /var/www/cam.php on line 2
Unable to connect
Is the problem in my code or connection in my office?
Any Help!
- 10-23-2009 #2
that is an invalid host name, a hostname can't have a space in it
- 10-23-2009 #3Just Joined!
- Join Date
- Aug 2009
- Posts
- 80
Hey,
Actually I'm running the PHP code on my laptop, but the SQL server is in my office.
I guess can't use "localhost" as my host, but the SQL server name.
So I used the SQL server name ( Client ) instead of localhost, but I still get the error.
Now what's the problem?
- 10-23-2009 #4
you need to connect to the machine running the sql server, whatever that may be, it is impossible for that machine to be named "SQL server"
- 10-23-2009 #5Just Joined!
- Join Date
- Aug 2009
- Posts
- 80
Is it possible using IP address?
Suppose, if I have the DB on my laptop itself, will the "localhost" help.
- 10-23-2009 #6Just Joined!
- Join Date
- Aug 2009
- Posts
- 80
The problem is it's a MS SQL db, but I had used My SQL quires, but once I fixed/replaced MySQL with MS SQL.
I get below error:
Fatal error: Call to undefined function mssql_connect() in /var/www/cam.php on line 2
If it's to work with php.ini file, coz I knew location of php.ini file on windows. Since I'm newbie to Linux, I didn't know that.
How can I get rid of this error?


Reply With Quote