Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1] 2
Send this topic | Print
Topic: How to Connect to a SQL remote server  (Read 4272 times)
« on: February 13, 2006, 07:17:10 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



Hello.
I have a SQL Server, on a remote machine, and I need to connect on its server.
I just saw that your PHP isnt with php_mssql extension actived.

When I try to connect to the remote server, I receive this error:

Fatal error: Call to undefined function: mssql_connect() in config.php on line 48

Because the php extension isnt actived.
Can you active it please? I think Im not the same that needs to connect to SQL Remote Servers.
You can active it, removing the ";" (commented line) from the php.ini, from the line: ";extension=php_mssql.dll"

I will be very glad if you do.


Thanks in advanced.
« Last Edit: February 13, 2006, 07:27:11 PM by BSEbayc » Report to moderator   Logged

C/C++/VB/PHP Programmer.

 
« Reply #1 on: February 14, 2006, 10:06:03 AM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



There are several dozen people connecting to outside mysql servers without any issues.. are you sure its not a script issue?
Report to moderator   Logged

« Reply #2 on: February 14, 2006, 11:42:41 AM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



nope.. its not MySQL.. it is Microsoft SQL Server  tongue
Report to moderator   Logged

C/C++/VB/PHP Programmer.
« Reply #3 on: February 14, 2006, 02:47:22 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



Can you try it now please?
Report to moderator   Logged

« Reply #4 on: February 14, 2006, 03:02:10 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



Still not connecting.

URL: http://www.t35.com/~bsebayc/MuITJ/

In my server, I have the line: "extension=php_msql.dll" uncommented in my php config too. Dunno if it would solve the problem. Did you restarted apache?

Thanks in advanced.
Report to moderator   Logged

C/C++/VB/PHP Programmer.
« Reply #5 on: February 15, 2006, 10:22:33 AM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



I uncommented ";extension=php_mssql.dll" like you adviced..  I am also not having any issues connecting to outside servers. On a general note, when connecting from an outside server to our SQL database, you need to add that servers IP address to the "accepted hosts" in the mysql config in cpanel.. maybe you need to do that in this case as well?
Report to moderator   Logged

« Reply #6 on: February 15, 2006, 02:29:14 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



undefined function: mssql_connect()

Your php isnt recognizing the microsoft sql server connection function.  embarassed
Report to moderator   Logged

C/C++/VB/PHP Programmer.
« Reply #7 on: February 15, 2006, 04:54:26 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



btw, I am not connecting from an outside server to T35's SQL database. I am connecting from my website hosted on T35 to my Microsoft SQL Server. I unblocked T35's IP to connect in my SQL Server (blocked others ips to prevent SQL Blast), but its not the case.. Because your php dont recognize mssql_connect() and others mssql (microsoft sql) functions.

I hope you find a solution to it  smiley

Thanks for supporting.
Report to moderator   Logged

C/C++/VB/PHP Programmer.
« Reply #8 on: February 15, 2006, 05:49:19 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



You might need to find a windows based server if you plan on using external mysql databases extensevly. I don't see any secure solution of offering MS SQL connections via linux/php .. all of them options can be easely exploited and abused.
Report to moderator   Logged

« Reply #9 on: February 15, 2006, 06:18:36 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



MySQL is same than MS SQL.. but you need the dll extension on php to it work. The dll will just make possible to connect TO a MS SQL Server. If its not secure to connect to a external MS SQL Server ( huh ) than its not secure to connect to a external MySQL server too.

I think you are thinking that I am trying to run a MS SQL Server via SSH or something like that tongue

Also, my "mssql.secure_connection" is set to ON.. Maybe it can be the solution too.. I will try to find something else, and post here smiley
Report to moderator   Logged

C/C++/VB/PHP Programmer.
« Reply #10 on: February 16, 2006, 01:48:01 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



the dll extention on php is installed and working.. you can check it via phpinfo().
Report to moderator   Logged

« Reply #11 on: February 16, 2006, 02:33:38 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



I just got off the phone with the cpanel people.. they are saying cpanel doesn't support php_mssql.dll. Is there anything else we can try to get your script to work?
Report to moderator   Logged

« Reply #12 on: February 16, 2006, 05:12:14 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



Is cpanel a server?
btw, im working out of cpanel.. you need to active it in php... dunno whats wrong.


Well.. Thanks for trying and for spending your time.



t35 forevah  grin
Report to moderator   Logged

C/C++/VB/PHP Programmer.
« Reply #13 on: February 17, 2006, 11:11:43 AM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 1,999



Cpanel is the software running on the server that controls the accounts & other software (apache, php, etc..). It won't let me make that specific change in php.ini.. If there are any other ways to do this that you find, I would be willing to give them a try.
Report to moderator   Logged

« Reply #14 on: April 22, 2006, 12:44:46 PM »
BSEbayc Offline
Newbie

View Profile
*
Posts: 14



Sorry for the inconvenience, but I still need this PHP extension actived.
I found some interesting things here:
www.php.net/mssql

I'll be glad if you could take a look and help me out.

Thanks for supporting.
Report to moderator   Logged

C/C++/VB/PHP Programmer.
 
Pages: [1] 2
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC