Jump to content

Recommended Posts

Hey everyone.

 

I was wondering if anyone had a situation where their server provider disabled the PHP MSSQL module, and will not enable it for you, and your code is strictly PHP based.

 

That is the situation I have with 1and1.com hosting. Our server in house is MSSQL, and I am trying to figure out how I can search it using PHP combined with Java, or any other technology through our website to our office database.

 

My last resort would be ditching my PHP knowledge and trying to learn ASP.NET and get my server switched over from Linux to Windows, but I think there has to be a better way.

 

Anyone have any solutions?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/143004-1and1com-php-mssql-disabled-workaround/
Share on other sites

The lower-level drivers for MSSQL do not exist on linux since they were made by Microsoft (kind of simplifying it, but oh well).  Things can be used in their place though, such as freetds (there are issues with using MSSQL with FreeTDS, but most people wouldn't come across the problems).

 

 

 

But, 1and1 would have to compile the php_mssql SO manually after compiling FreeTDS.

  • 1 month later...

I have php-mssql module installed on our 1and1.com dedicated server and this works a treat when connecting to our local MSSQL in house server.

 

I have recently changed hosting provider and installed the same module (need to install FREEtds too) but now I'm having trouble connecting when its exactly the same script.

 

Any ideas? All firewall rules are open

Thing is... I'm not getting any error messages. I have checked our MSSQL database and its giving an error:

 

17832 - Connection open but invalid login packets sent.

 

I know the user/pass is correct as I'm running the same script on another server which is connecting without a problem.

 

This only shows the echoed "Error:" and no actual error message
$new = mssql_connect("[ip]:1433", "[username]", "[password]");
if($new){ echo 'connected'; }
else{ 
echo 'Error: ';
echo  mssql_get_last_message(); }

 

Any help would be appreciated.

 

Many thanks

Thanks for the reply.

 

Changing from : to , did not make any difference. Surely I should be seeing error messages in php?

 

Starting to pull my hair out now! I will check with our IT Dept in regards to the client libraries.

 

If you have any other info please let me know.

 

Thanks again

Yes Redhat 5 methinks with FreeTDS and php-mssql module installed.

 

Its working and seems stable at the moment so I'm not fussed. Just didn't understand why the line of code makes it work even though the versions are set to the same on the server.

 

Many thanks

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.