Posted by marquito on May 7, 2012 at 5:18pm
hi all,
we've spent sometime building up a soluting for a city administration in Brazil, using Drupal 7 and SQL Server. thing is: someway up in the end of development we got to know the guys there are using nginx as their web server.
my qustions is: is it even possible to run drupal 7 + nginx with freetds and the bridge for SQL Server? all I need to do is help the guys there, so they can proceed with instalation (if that's possible). Anyone cares to point a guide?
I'm a complete newbie to linux, I do not develop on linux and the project is already due. Do I have salvation? :)
Comments
In principle yes
although I never worked with SQL server + Drupal. Nginx just handles the HTTP layer. The PHP related requests are forwarded to an upstream that can be php-fpm or Apache.
Run the php-fpm/Apache on Linux and connect to SQL server from the Linux side. Check this project: http://drupal.org/project/sqlsrv.
I've been using sqlsrv
As part of my tests of PHP + Apache + Sql Server, I've been successfully using http://drupal.org/project/sqlsrv on my windows machine.
In settings.php I've got these configs:
$databases = array ('default' =>
array (
'default' =>
array (
'database' => '<DB_NAME>',
'username' => '<USER_NAME>',
'password' => '<PASSWORD>',
'host' => '(local)',
'port' => '',
'driver' => 'sqlsrv',
'prefix' => '',
),
),
);
I've packed the whole drupal directory and the SQL Server Backup to handle them, but it does not seem to work. The guys over there (it's in another city, actually) do have PHP + SQL Server 2008 working with freeTDS already for other applications, so I guessed it'd be a piece of cake.
If Nginx, SQL Server and PHP are already running, would there be any special configuration for me to fill in?
man. thanks a lot.
P.S.:
I don't know what web server they're using, but I'm inclined to believe they think Nginx is a web server because that's what they have told me. :) (or maybe they assumed I'd have no idea about it so they just nginxed me :-P)
Still cannot make it work
hey guys... seeking help again!
I was able to run drupal's installation up to the point where we need to choose the database, but SQL Server does not show in the available databases list.
I have followed the instructions on the sqlsrv page as instructed by perusio, including:
Drupal and the SQL Server driver
Uncompress Drupal in the web root. Uncompress this driver as sites/all/modules/sqlsrv, and copy or link the sqlsrv directory found inside it in includes/databases.
Why can't I see drupal in the database installation list?
Other applications work normally, like a moodle installation which is on the same machine.
Thanks in advance, I really need to solve this. :(
I think you are out of luck
Have a look at this comment: #1037558-4. The sqlsrv driver will work only on Windows.
However, you will be able to connect to the SQL database from PHP using PDO and FreeTDS, but you can't use Drupal Database Abstraction Layer (unless you write the driver).