mssql_pconnect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shelly

    mssql_pconnect

    So far, all my database programming in php has been with a mysql database.
    I need to connect to a SQL Server database. I looked in the manual and it
    seemed rather easy. It seemed that all I had to do was replace mysql with
    mssql everywhere I had coded before.

    So, naturally, on my first call which was to mssql_pconnect I received the
    following message:

    Fatal error: Call to undefined function mssql_pconnect( )

    Now I must say that php was not previously installed on this server. I had
    the admin fellow install it (and this was his first time). Are the
    database routines some sort of additional installation that simply haven't
    been installed?

    Thanks for any help

    Shely


  • David Haynes

    #2
    Re: mssql_pconnect

    Shelly wrote:[color=blue]
    > So far, all my database programming in php has been with a mysql database.
    > I need to connect to a SQL Server database. I looked in the manual and it
    > seemed rather easy. It seemed that all I had to do was replace mysql with
    > mssql everywhere I had coded before.
    >
    > So, naturally, on my first call which was to mssql_pconnect I received the
    > following message:
    >
    > Fatal error: Call to undefined function mssql_pconnect( )
    >
    > Now I must say that php was not previously installed on this server. I had
    > the admin fellow install it (and this was his first time). Are the
    > database routines some sort of additional installation that simply haven't
    > been installed?
    >
    > Thanks for any help
    >
    > Shely
    >
    >[/color]
    uncomment the php_mssql.dll in the extensions section of php.ini
    (assuming you're using a windows box) or recompile using --with-mssql if
    using Linux.

    -david-

    Comment

    • Michael Austin

      #3
      Re: mssql_pconnect

      Shelly wrote:
      [color=blue]
      > So far, all my database programming in php has been with a mysql database.
      > I need to connect to a SQL Server database. I looked in the manual and it
      > seemed rather easy. It seemed that all I had to do was replace mysql with
      > mssql everywhere I had coded before.
      >
      > So, naturally, on my first call which was to mssql_pconnect I received the
      > following message:
      >
      > Fatal error: Call to undefined function mssql_pconnect( )
      >
      > Now I must say that php was not previously installed on this server. I had
      > the admin fellow install it (and this was his first time). Are the
      > database routines some sort of additional installation that simply haven't
      > been installed?
      >
      > Thanks for any help
      >
      > Shely
      >
      >[/color]

      It would help if we knew what platform/webserver you are using but a first guess
      would be to check your PHP.INI file to make sure that you are loading the MSSQL
      module.

      --
      Michael Austin.
      DBA Consultant
      Donations welcomed. Http://www.firstdbasource.com/donations.html
      :)

      Comment

      • Shelly

        #4
        Re: mssql_pconnect


        "Michael Austin" <maustin@firstd basource.com> wrote in message
        news:PnkJf.2950 4$Jd.22540@news svr25.news.prod igy.net...
        [color=blue]
        > It would help if we knew what platform/webserver you are using but a first
        > guess would be to check your PHP.INI file to make sure that you are
        > loading the MSSQL module.[/color]

        He loaded the mssql, but did something wrong. It now says:


        Fatal error: Call to undefined function mssql_pconnect( ) in
        E:\mysite\sqlLo ginNewDB.php on line 9
        PHP Warning: PHP Startup: Unable to load dynamic library './php_mssql.dll' -
        The specified module could not be found. in Unknown on line 0



        Comment

        • David Haynes

          #5
          Re: mssql_pconnect

          Shelly wrote:[color=blue]
          > "Michael Austin" <maustin@firstd basource.com> wrote in message
          > news:PnkJf.2950 4$Jd.22540@news svr25.news.prod igy.net...
          >[color=green]
          >> It would help if we knew what platform/webserver you are using but a first
          >> guess would be to check your PHP.INI file to make sure that you are
          >> loading the MSSQL module.[/color]
          >
          > He loaded the mssql, but did something wrong. It now says:
          >
          >
          > Fatal error: Call to undefined function mssql_pconnect( ) in
          > E:\mysite\sqlLo ginNewDB.php on line 9
          > PHP Warning: PHP Startup: Unable to load dynamic library './php_mssql.dll' -
          > The specified module could not be found. in Unknown on line 0
          >
          >
          >[/color]
          Two things:
          1. in php.ini there is a tag named 'extension_dir' . This needs to point
          to the 'ext' directory of wherever you installed php.
          2. there is a diagnostic you can run that will tell you all about how
          the system is set up (and will help us diagnose things for you). Simply
          create a file with the following contents: <?php phpinfo() ?> and run it.

          -david-

          Comment

          Working...