Configure Seagull to use MSSQL

Hello, I'm using the Seagull PHP Framework for one website and it works great....on MySQL....the problem is, I need it work on Microsoft SQL Server.

Seagull uses PEAR DB, which has a native MSSQL driver as well as an ODBC driver.  Either one would be perfectly acceptable.

I've scoured the Internet and cannot figure out how to do it.

Changing my current setup over to MSSQL would be fine, but making a fresh install into MSSQL would be even better.

Thanks for your help...I only wish there wasn't a 500point max on this one :(
LVL 1
dban00bAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Marcus BointonCommented:
This should be extremely straightforward. In your config file you will currently have a DB entry that lists 'mysql' in the type property - just change it to 'mssql'.

Failing that, you can explicitly connect to a DB like this:

$dsn = 'mssql://username:password@localhost/myDB';
$dbhExt = & SGL_DB::singleton($dsn);
0
Loganathan NatarajanLAMP DeveloperCommented:
Seagull uses PEAR DB, which has a native MSSQL driver as well as an ODBC driver.  Either one would be perfectly acceptable.


>> did you try and configured ..? got an error or just find the possibility?
0
dban00bAuthor Commented:
$dsn = 'mssql://username:password@localhost/myDB';
$dbhExt = & SGL_DB::singleton($dsn);

Where would I put this code? Which file(s)?

----------------------------------------------------------------------------

>> did you try and configured ..? got an error or just find the possibility?
Once I learned seagull uses PEAR DB, I went to PEAR's site and found that out.  So I'm pretty sure PEAR can do it, even though Seagull only has choices/files for mysql, postgres, and oci
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Marcus BointonCommented:
Wherever your config file is - usually in seagull/var/<your-hostname>_<port-number>.conf.php
The config file won't have a whole DSN in it, but it will have separate parts for each component of it.
The whole point of PEAR DB is that changing 'mysql' to 'mssql' on connection should be the only thing you need to do.

Alternatively, you can re-run the installer (setup.php).
0
Marcus BointonCommented:
Did you get this working?
0
dban00bAuthor Commented:
Changing the config file didn't work (visiting the site produces "Cannot connect to DB")
Changing the $dsn variable didn't work (same error)

I have written a test page from scratch that can connect to the MSSQL database using PearDB.  So I know PHP5 and the PearDB pakcage are working correctly, as well as knowing that my SQL Server install is accepting connections on port 1433.

But alas, I'm still stuck on my original question, how to get Seagull to do it.  There are so many files, and everything is built across them, I haven't been able to locate the what and where that needs changed--let alone what those changes are going to be.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.