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:
- 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:
- Determine if a connection has been established with the SQL Server and my MAMP D7 instance
- 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
Did you follow the
Did you follow the instructions outlined on http://drupal.org/node/1207972? Specifically the line that says
ReplyAt the time no - good
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:
Would that be ok? Nope. The
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.
Reply: Ok, great! So taking
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:
Perhaps I should start another thread, since the orginial question has been answered. And thank you for your replies!