Overall Goal:
I am trying to connect my D7 site (located on my OSX - MAMP) to an MS SQL server. I am using the Feeds SQL module (http://drupal.org/project/feeds_sql). The module currently is configured to pull information from a MAMP database and create/update "Profile" content types (works) on cron jobs. Now I'd like to be able to pull that information from an external (SQL) server instead from my local MAMP database.



Process:

  1. I followed a setup tutorial (http://www.tumblr.com/tagged/mssql+mamp+php+mac+osx), and configured freeTDS to my PHP on the MAMP instance.
  • I replicated the first three steps (from the tutorial), and everything went smoothly.
  • For the fourth (and last step), I manually found the php.ini file that my D7 instance was using, and added the following line of code:


    extension="/Users/jmm42Computer/Desktop/SQL/php-5.3.6/ext/mssql/modules/mssql.so"


    Above is where the mssql.so file is located. I installed the exact same php version my D7 instance was using on my desktop, and followed the tutorial.

  • I downloaded the SQLSRV module (http://drupal.org/project/sqlsrv) and enabled it in my D7
  • Then I configured my settings.php to look like below



Specific Goal:

  1. Determine if a connection has been established with the SQL Server and my MAMP D7 instance
  2. Implement Feeds SQL to create "Profile" content types from the SQL server




Settings.php

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'drp_1',
'username' => 'jimbobski',
'password' => 'iHaveAHottGf',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
), 'custom' =>
array (
'default' =>
array (
'database' => 'HELPCENTER',
'username' => ''jimbobski',
'password' => 'pass2',
'host' => '222.21.111.12',
'port' => '',
'driver' => 'sqlsrv',
'prefix' => '',
)
)
);

Comments

vkareh’s picture

Did you follow the instructions outlined on http://drupal.org/node/1207972? Specifically the line that says

copy or link the sqlsrv directory found inside it in includes/databases

jmm42’s picture

Reply:
At the time no - good point! It still did not work, do you think I have to follow "Installation instructions" verbatim? Instead of installing the PHP SQL Server Driver 2.0 from Microsoft, I installed FreeTds (http://www.tumblr.com/tagged/mssql+mamp+php+mac+osx). Would that be ok?

Other people's thought:
I been hitting up the IRC forums, and someone was mentioning that the SQLSRV module/driver is for microsoft. Their reasoning was that the "Installation instructions" (http://drupal.org/node/1207972) tells users to get a driver from Microsoft (which is an .exe file), and does not mention that it can be substituted by another equivalent driver (FreeTDS). Maybe this is why my I can't get Feeds SQL to work on sqlsrv?

WAMP - Another approach:
So i decided to go the Windows approach (not too excited about that), and installed WAMP on an external server running on Windows 2008. After a successful installation, I click "start WampServer", and a dialog box opens saying:

Aestan Tray Menu has stopped working.

Windows can check online for a solution to the problem.

Check online for a solution and close the program

Close the program


View problem details



Problem signature:

Problem Event Name: APPCRASH

Application Name: wampmanager.exe

Application Version: 1.6.1.33

Application Timestamp: 2a425e19

Fault Module Name: KERNELBASE.dll

Fault Module Version: 6.1.7601.17651

Fault Module Timestamp: 4e211319

Exception Code: 0eedfade

Exception Offset: 0000b9bc

OS Version: 6.1.7601.2.1.0.272.7

Locale ID: 1033

Additional Information 1: 891f

Additional Information 2: 891f8ecaa4636eab9d64e12e7ca2b7c4

Additional Information 3: fd5c

Additional Information 4: fd5c21723f3b200d9ca391af2a52aa45



Read our privacy statement online:

http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409



If the online privacy statement is not available, please read our privacy statement offline:

C:\Windows\system32\en-US\erofflps.txt

heine’s picture

Would that be ok?

Nope. The driver is specific for PDO SQLSRV not PDO MSSQL. (http://www.php.net/manual/en/ref.pdo-dblib.php).

You could attempt a custom solution where you rewrite Feeds SQL plugins to use php's mssql / sybase driver in combination with FreeTDS. I've used this with great success to connect to the older MS SQL servers. If you are careful about charsets, it shouldn't be a lot of trouble.

jmm42’s picture

Reply:
Ok, great! So taking the advice from the other Drupaler was a good choice. I will then follow the strict "Installation installation", and install Microsoft's driver. This would mean needing a compatible environment (WAMP)?

Question:
If so, do you have any idea's why starting up my WAMP results in the Aestan Tray menu error message box?

Researching solutions:
When I was googling why my WAMP wouldn't start in Microsoft 2008 server, I got the following results:

  1. make sure wamp is the same bit as the server (http://stackoverflow.com/questions/5631571/not-able-to-launch-wamp) - which it is
  2. make sure no other program is running and conflicting with WAMP: skype, IIS, remote desktop, ... - Since this is Virtual machine running Microsoft 2008, this mean there are hardly any processes running, I count 11 running processes. One of them is Remote Desktop, but that is packaged with Windows, and I believe is running on a different port from WAMP - so that should not be an issue. (http://www.wampserver.com/phorum/read.php?2,71076)



Perhaps I should start another thread, since the orginial question has been answered. And thank you for your replies!