1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. Guest: We think the problem with locked threads from long message subjects has been resolved. Post a link here if you still see a problem.

GO HERE Need MSSQL for Superfecta

Discussion in 'Add-On Install Instructions' started by ddorminey, Jun 11, 2013.

  1. ddorminey Member

    Hi All,

    Thanks for all your work here.

    I just downloaded piaf green 2.0.6.4 and free pbx 2.11 with incredible pbx 11 and incredible fax 11.

    This is currently a test environment in preparation for upgrading our existing PIAF production box.

    I have been able, in the past, to use the MSSQL_DB lookup source in Callerid Superfecta to query our inhouse ERP that runs on MSSQL 2008R2. It works reliably and quickly.

    On Superfecta 2.11.03, the MSSQL_DB source is gone and has been replace with the 'Database' source. I have configured ODBC and FreeTDS and can connect from the PIAF VM to my MSSQL server consistently.

    However, when i try to use the 'database' source in Superfecta, I get the following:

    Code:
    Connection failed: SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
    Fatal error: Call to a member function prepare() on a non-object in /var/www/html/admin/modules/superfecta/sources/source-Database.module on line 68
    Now, I have enough PHP knowledge to realize that means the PHP cant see what unixODBC is providing. (and I know is working since I tested it using isql and tsql from the command line)

    However, I am not certain how to enable MSSQL support in PHP and am unclear where the source is to recompile with MSSQL enabled.

    The PHP website says to configure PHP with the following...
    Code:
    ./configure --with-mssql=/usr/local/freetds
    Can anyone point me in the right direction?

    Thanks!

    ---D
  2. lgaetz Pundit

  3. ddorminey Member

    Thank you. I had seen that article. when i run "Yum install php-mssql" The system tells me there is no package php-mssql available. So I'm still stuck.

    Thanks for the quick response, though.

    ---D
  4. wardmundy Nerd Uno

  5. ddorminey Member

    Thanks Ward. I'm still parsing the effects of that change.

    But the database connection error is still in the mix...

    ---D
  6. tm1000 Guru

    You are looking for PDO mssql. The PDO part is important as the "database" module is written with PDO in mind.
  7. ddorminey Member

    alright, thanks for the tip TM1000

    ---D
  8. tm1000 Guru

    Actually im rather confused by this thread. You are trying to use a database wrapper with a database wrapper to connect to mssql. PDO is a database wrapper. You shouldn't be using ODBC with PDO (and I didnt even know there was an option to do so?)
  9. ddorminey Member

    I rebuilt the VM using the same process (as best I recall) using piaf green, the incredpbx11 installer, etc... and i have superfecta version 2.2.6.1 with the old mssql source. It's working perfectly.
    I took a quick snapshot so can roll back when i figure out which update updated superfecta to 2.11... (i could have done it and forgotten in the previous build).

    Thanks for all the quick and insightful help!

    :cheers2:
    ---D
  10. ddorminey Member

    To respond to TM1000's post, he said....

    To be precise, I was just trying to reproduce what I was already using and was trying to adapt to the new, more generic, 'database' source in superfecta 2.11. It offered a pdo source, and odbc source and, i think, a mysql source in the dropdown.

    I would be very happy to know the prescribed way to do this for future reference.

    Thanks!

    ---D
  11. ddorminey Member

    I see now where the upgrade came in. I did an overall download and upgrade all in module admin and it grabbed superfecta 2.11.3, among others. I shall skip that particular upgrade for now and return to it as time permits.

    ---D

Share This Page