CGI to ISAPI, now no MySQLi

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

    CGI to ISAPI, now no MySQLi

    Have been running PHP 5.1.1 successfully for quite some time as CGI in IIS
    5.1 on my Windows XP Pro SP2 laptop, with MySQL Server 5.0.18 and the
    mysqli extension. I wanted to see if I could get away from some CGI
    timeouts I've been experiencing by moving from GCI to ISAPI on PHP. So I
    removed the mapping for the CGI .exe and added in the mapping for the
    php5isapi.dll, which in C:\PHP. The php_mysqli.dll file is in C:\PHP\ext.
    I made sure extension_dir = "C:\PHP\ext " was set in php.ini, and that the
    uncommented line extension=php_m ysqli.dll was present there as well.
    Following the directions of some other discussions I read elsewhere, I also
    moved the libmysql.dll file from C:\PHP to C:\WINDOWS\syst em32. I stopped
    and restarted IIS. Now, the error I get on the first line of PHP in my app
    that tries to create a new mysqli object is:

    Fatal error: Class 'mysqli' not found in C:\Inetpub\wwwr oot\vsx\include s
    \sessions.php on line 34

    What am I missing here! I'm tearing my hair out now. Someone please tell
    me what setting I have to change to get MySQLi to work in PHP 5.1.x as an
    ISAPI.

    Christopher Watson
    AAVSO VSX
  • Chung Leong

    #2
    Re: CGI to ISAPI, now no MySQLi

    Is your php.ini sitting in C:\PHP? The ISAPI module won't use it if
    it's there.

    Comment

    • Christopher Watson

      #3
      Re: CGI to ISAPI, now no MySQLi

      "Chung Leong" <chernyshevsky@ hotmail.com> wrote in
      news:1137311060 .918788.214270@ o13g2000cwo.goo glegroups.com:
      [color=blue]
      > Is your php.ini sitting in C:\PHP? The ISAPI module won't use it if
      > it's there.[/color]

      Yes, as a matter of fact, my php.ini IS sitting in C:\PHP. Where should it
      instead go?

      Comment

      • Chung Leong

        #4
        Re: CGI to ISAPI, now no MySQLi

        Put it in C:\Windows.

        Comment

        • Christopher Watson

          #5
          Re: CGI to ISAPI, now no MySQLi

          "Chung Leong" <chernyshevsky@ hotmail.com> wrote in
          news:1137339456 .222608.259440@ f14g2000cwb.goo glegroups.com:
          [color=blue]
          > Put it in C:\Windows.[/color]

          That's exactly where I put it (having read that elsewhere), and all is
          working now. Thank you.

          Comment

          • Andy Hassall

            #6
            Re: CGI to ISAPI, now no MySQLi

            On 15 Jan 2006 07:37:36 -0800, "Chung Leong" <chernyshevsky@ hotmail.com> wrote:
            [color=blue]
            >Put it in C:\Windows.[/color]

            There's never any need to move things to the Windows system directories, and
            it only leads to pain later. You can do it more cleanly with environment
            variables.

            Use PHPRC to control where the php.ini file is read from.
            Use PATH to add DLLs.

            --
            Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
            http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

            Comment

            • Chung Leong

              #7
              Re: CGI to ISAPI, now no MySQLi


              Andy Hassall wrote:[color=blue]
              > On 15 Jan 2006 07:37:36 -0800, "Chung Leong" <chernyshevsky@ hotmail.com> wrote:
              >[color=green]
              > >Put it in C:\Windows.[/color]
              >
              > There's never any need to move things to the Windows system directories, and
              > it only leads to pain later. You can do it more cleanly with environment
              > variables.
              >
              > Use PHPRC to control where the php.ini file is read from.
              > Use PATH to add DLLs.[/color]

              Agree. Putting stuff in C:\Windows isn't the best. On the other hand,
              it gets really confusing when you put it somewhere else.

              Comment

              Working...