#16
  1. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,932
    Rep Power
    4033
    Just an FYI, php_mssql.dll is deprecated, and no longer available in php 5.3. The recommended way to use SQL Server is to either use SQLSRV from Microsoft, or to use ODBC.

    Both have normal procedural style functions, or PDO class based API's. PDO is preferred, not necessary though.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by kicken
    Just an FYI, php_mssql.dll is deprecated, and no longer available in php 5.3. The recommended way to use SQL Server is to either use SQLSRV from Microsoft, or to use ODBC.

    Both have normal procedural style functions, or PDO class based API's. PDO is preferred, not necessary though.
    my php version is only php 5.2.4. You think the mssql in my php version was not work?
  4. #18
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    I don't know what MS SQL Client Tools is, but it would seem best for you to install it.
    Put the DLL in the PHP and System32 folders. Does not need to go in Windows or the ext folder.
    Keep the PHP directory where it is.
    I put ntwdblib.dll in system32 and php folder.

    Is it in my php version the mssql function did not work or supported?
  6. #19
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    1. mssql is an extension, not a function.
    2. kicken said it's deprecated for 5.3 and up. You have 5.2. Your problems are merely about properly installing the extension.
  8. #20
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    1. mssql is an extension, not a function.
    2. kicken said it's deprecated for 5.3 and up. You have 5.2. Your problems are merely about properly installing the extension.
    I have no idea how to install extension..
  10. #21
  11. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    I gave you a link in the last page. Post #13. Follow the directions there.
  12. #22
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    I gave you a link in the last page. Post #13. Follow the directions there.
    I already do the instruction i put the ntwdblib.dll in system32 and in the php folder.

    Is it the mssql in my php 5.2.4 version did not work or did not support function mssql.

    I have read that I can also used microsoft driver SQLSRV or odbc but I'm afraid and I'm not familar in that Microsoft Driver.

    here is my new configuration:

    I do all the configuration that I know to work my connection from php to mssql like this:

    1. I put the php location in the system variable PATH.
    2. I download the ntwdblib.dll version that work in sql server 2005.
    3. I put the ntwdblib.dll in the system32, and php folder.
    3. I configure my php.ini
    I uncommented the ff:
    extension=php_mssql.dll
    extension_dir=".\ext"
    doc_root ="C:\Inetpub\wwwroot"
    cgi.force_redirect = 0
    mssql.secure_connection = On

    I change also my php code:

    PHP Code:
    <?php
    //mssql.secure_connection = On
    //Need to uplaod ntwdblid.dll from net

    $myServer="ISM\SQLEXPRESS";
    //$connectionOptions=array("Database"=>"AdventureWorks");
    //$myUser = "MRM\Administrator";
    //$myPass = "xoxoxo";
    $myDB "dbtest";

    //Connect to the database
    $dbhandle mssql_connect($myServer) or die("Could not connect to SQL Server");

    //Select a database
    $selected mssql_select_db($myDB) or die("Could not open database");

    echo 
    "You are connected to the dbtest";
    ?>
    After all this configuration still I can't connect to mssql
    Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\testconn.php on line 12
  14. #23
  15. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
  16. #24
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    Have you installed the MS SQL Client Tools?
    I don't have MS SQL Client Tools...
    What it is?
  18. #25
  19. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    I don't know what it is. Why don't you find out and tell us about it?
  20. #26
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    Have you installed the MS SQL Client Tools?
    Where I can find MS SQL Client Tools?

    The installer that I already installed are:

    SQLSERVER2005_SSMSEE.msi
    SQLEXPR32.exe
    msxml6.msi
    framework.net

    I foud a lot of downloadable installer, but I don't know what is the installer for client tools

    here is the list of downloadable installer:

    DataProviderSAP.exe
    DB2OLEDB.exe
    ptslite.exe
    sqlncli.msi
    sqlncli_ia64.msi
    sqlncli_x64.msi
    SQLServer2005_ADOMD.msi
    SQLServer2005_ADOMD_ia64.msi
    SQLServer2005_ADOMD_x64.msi
    SQLServer2005_ASOLEDB9.msi
    SQLServer2005_ASOLEDB9_ia64.msi
    SQLServer2005_ASOLEDB9_x64.msi
    SQLServer2005_BC.msi
    SQLServer2005_BC_ia64.msi
    SQLServer2005_BC_x64.msi
    SQLServer2005_DTS.msi
    SQLServer2005_NS.msi
    SQLServer2005_NS_ia64.msi
    SQLServer2005_NS_x64.msi
    SQLServer2005_OLAPDM.msi
    SQLServer2005_OLAPDM_ia64.msi
    SQLServer2005_OLAPDM_x64.msi
    SQLServer2005_ReportAddin.msi
    SQLServer2005_SQLCMD.msi
    SQLServer2005_SQLCMD_ia64.msi
    SQLServer2005_SQLCMD_x64.msi
    SQLServer2005_XMO.msi
    SQLServer2005_XMO_ia64.msi
    SQLServer2005_XMO_x64.msi
  22. #27
  23. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    After 30 seconds of Googling, I've learned that the Tools come on the SQL Server CD.
  24. #28
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    After 30 seconds of Googling, I've learned that the Tools come on the SQL Server CD.
    I don't have sql server cd

    I only have a folder of sql server and here is the content of the folder:

    msxml6.msi
    msxml6_ia64.msi
    msxml6_SDK.msi
    msxml6_x64.msi
    SQLEXPR32.EXE
    SQLSERVER2005_SSMSEE
    Windows Installer 3.1EULA.doc
    WindowsInstaller-KB893803_v2_x86.exe
  26. #29
  27. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    Go through the installation process again. When it gets to the part where you choose the components to install, look for anything about "tools".

    I can't keep holding your hand like this. This isn't PHP anymore. This is something else that you need to deal with. If I'm telling you anything it's because I found it it on Google - just like you could have.
  28. #30
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    117
    Rep Power
    0
    Originally Posted by requinix
    Go through the installation process again. When it gets to the part where you choose the components to install, look for anything about "tools".

    I can't keep holding your hand like this. This isn't PHP anymore. This is something else that you need to deal with. If I'm telling you anything it's because I found it it on Google - just like you could have.
    I found out that i have client tools. I want to share that I installed a microsoft driver to connect php to mssql using sqlsrv_connect() but still the error is fatal error:call to undefined sqlsrv function. I have no idea why I can't connect.

IMN logo majestic logo threadwatch logo seochat tools logo