www.webdeveloper.com
Results 1 to 8 of 8

Thread: mssql not loaded

  1. #1
    Join Date
    Aug 2010
    Posts
    212

    mssql not loaded

    Good day!

    I try a lot of configuration to work my connection from php to mssql but still I cannot connect. And I got a code to check if the mssql was loaded.

    Here is the code:
    PHP Code:
    <?php
    if (function_exists('mssql_connect')){
    echo 
    "Okay, fn is there<br>------------------<br>";
    } else {
    echo 
    "Hmmm .. fn is not even there<br>------------------<br>";
    }

    if(
    extension_loaded("mssql")) {
    echo 
    "MSSQL is Loaded<br>";
    }
    else {
    echo 
    "MSSQL not loaded<br>";


    if(
    extension_loaded("msql")) {
    echo 
    "MSQL is Loaded<br>";
    }
    else {
    echo 
    "MSQL not loaded<br>";

    echo 
    '<br><br>';

    $ext get_loaded_extensions();
    if(
    in_array('mssql'$ext))
    echo 
    'u have mssql installed<br><br>';
    else
    echo 
    'u do NOT have mssql installed<br><br>';

    phpinfo();
    ?>
    And when I run this code the result is:

    Hmmm….fn is not even there
    ----------------------
    MSSQL not loaded
    MSQL not loaded
    You do NOT have mssql installed
    And the list of phpinfo() appear.

    Actually I run this code when my php version is php 5.2.4 and now I try it to php 5.1.4 and the result is still the same.

    Web server is IIS 6.0
    OS is Windows Server 2003 R2 Standard Edition
    PHP version is php 5.1.4
    MS SQL Server 2005 Express Edition –Windows Authentication.

    I need to solved this problem because my connection in mssql is not working because call to undefined the function mssql_connect().

    I hope somebody can help me. Almost three weeks I configure this connection and still I cannot connect.

    Any help is highly appreciated.
    Thank you.

  2. #2
    Join Date
    Sep 2010
    Posts
    160
    In the list of phpinfo() do you see MSSQL server enabled?

    Archie

  3. #3
    Join Date
    Aug 2010
    Posts
    212
    Quote Originally Posted by zimonyi View Post
    In the list of phpinfo() do you see MSSQL server enabled?

    Archie
    No..only ODBC
    I noticed that all the configuration that I do in my php.ini did not take efffect or appear in my phpinfo() and also the Configuration File(php.ini) Path in my phpinfo() is C:\WINDOWS, but my php.ini is in C:\php also the extensin_dir that appear in my phpinfo is C:\php5 but I configure my extension_dir in my php.ini as C:\php\ext
    Attached Files Attached Files

  4. #4
    Join Date
    Sep 2010
    Posts
    160
    Quote Originally Posted by rhodarose View Post
    No..only ODBC
    I noticed that all the configuration that I do in my php.ini did not take efffect or appear in my phpinfo() and also the Configuration File(php.ini) Path in my phpinfo() is C:\WINDOWS, but my php.ini is in C:\php also the extensin_dir that appear in my phpinfo is C:\php5 but I configure my extension_dir in my php.ini as C:\php\ext
    Feels like you should re-install PHP so that you get the correct configurations (never worked with PHP on Windows so I don't know how to add stuff after the install).

    Archie

  5. #5
    Join Date
    Aug 2010
    Posts
    212
    Quote Originally Posted by zimonyi View Post
    Feels like you should re-install PHP so that you get the correct configurations (never worked with PHP on Windows so I don't know how to add stuff after the install).

    Archie
    I solved the problem by moving php.ini from C:\php to C:\WINDOWS

  6. #6
    Join Date
    Mar 2013
    Posts
    1
    Quote Originally Posted by rhodarose View Post
    I solved the problem by moving php.ini from C:\php to C:\WINDOWS
    I've read this tonight and it's 2 years after you wrote, and its working after few hours of googling.
    Trying all steps from all webs but didn't works, And finally your few simple words change my life!!

    Thank you very much, god bless you

  7. #7
    Join Date
    Apr 2013
    Posts
    135
    I think there is missing of mssql server but, I am not sure.

  8. #8
    Join Date
    Feb 2013
    Location
    USA
    Posts
    40
    Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.t is extremely helpful for me.
    regards
    Shawn

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles