PHP Not Recognizing MySQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • solitary.wanderer52@gmail.com

    PHP Not Recognizing MySQL

    I am running PHP5 under Linux. Just a newbie and would like to have it
    integrated with MySQL. When I execute
    phpinfo() in a webpage, I see tons of info on php, but nothing on
    MySQL. Perhaps this is because I installed
    MySQL after I installed PHP. Is there a way to get PHP to recognize
    MySQL?

    Thanks, Steve

  • Andy Hassall

    #2
    Re: PHP Not Recognizing MySQL

    On 3 Nov 2006 12:44:49 -0800, solitary.wander er52@gmail.com wrote:
    >I am running PHP5 under Linux. Just a newbie and would like to have it
    >integrated with MySQL. When I execute
    >phpinfo() in a webpage, I see tons of info on php, but nothing on
    >MySQL. Perhaps this is because I installed
    >MySQL after I installed PHP. Is there a way to get PHP to recognize
    >MySQL?
    Recompile PHP with the --with-mysql option passed to "configure" , see
    http://uk2.php.net/mysql for more.

    --
    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

    • solitary.wanderer52@gmail.com

      #3
      Re: PHP Not Recognizing MySQL



      On Nov 3, 2:20 pm, Andy Hassall <a...@andyh.co. ukwrote:
      On 3 Nov 2006 12:44:49 -0800, solitary.wander e...@gmail.com wrote:
      >
      I am running PHP5 under Linux. Just a newbie and would like to have it
      integrated with MySQL. When I execute
      phpinfo() in a webpage, I see tons of info on php, but nothing on
      MySQL. Perhaps this is because I installed
      MySQL after I installed PHP. Is there a way to get PHP to recognize
      MySQL? Recompile PHP with the --with-mysql option passed to "configure" , seehttp://uk2.php.net/mysqlfor more.
      >
      --
      Andy Hassall :: a...@andyh.co.u k ::http://www.andyh.co.ukhttp://www.and....co.uk/space:: disk and FTP usage analysis tool
      I have a Debian-based system and installed them using the install
      utility, Synaptic. Is there a way of doing the above using this
      utility?


      Steve

      Comment

      • Andy Hassall

        #4
        Re: PHP Not Recognizing MySQL

        On 3 Nov 2006 13:45:27 -0800, solitary.wander er52@gmail.com wrote:
        >On Nov 3, 2:20 pm, Andy Hassall <a...@andyh.co. ukwrote:
        >On 3 Nov 2006 12:44:49 -0800, solitary.wander e...@gmail.com wrote:
        >>
        >I am running PHP5 under Linux. Just a newbie and would like to have it
        >integrated with MySQL. When I execute
        >phpinfo() in a webpage, I see tons of info on php, but nothing on
        >MySQL. Perhaps this is because I installed
        >MySQL after I installed PHP. Is there a way to get PHP to recognize
        >MySQL? Recompile PHP with the --with-mysql option passed to "configure" , seehttp://uk2.php.net/mysqlfor more.
        >
        >
        >I have a Debian-based system and installed them using the install
        >utility, Synaptic. Is there a way of doing the above using this
        >utility?
        Sorry, don't know, I always compile it from source and I haven't used Debian.

        Maybe: http://www.google.co.uk/search?q=debian+php+mysql+php5

        As it's also possible to add PHP extensions as shared modules then presumably
        your system's package manager will be able to add these separately without
        having to recompile PHP.

        --
        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

        • Jeff North

          #5
          Re: PHP Not Recognizing MySQL

          On 3 Nov 2006 12:44:49 -0800, in comp.lang.php
          solitary.wander er52@gmail.com
          <1162586689.662 665.267820@h48g 2000cwc.googleg roups.comwrote:
          >| I am running PHP5 under Linux. Just a newbie and would like to have it
          >| integrated with MySQL. When I execute
          >| phpinfo() in a webpage, I see tons of info on php, but nothing on
          >| MySQL. Perhaps this is because I installed
          >| MySQL after I installed PHP. Is there a way to get PHP to recognize
          >| MySQL?
          >|
          >| Thanks, Steve
          PHP5 has mySQL disabled by default.
          Have you set the php.ini file to use the mysql extension?
          I use Windows so the following my not be exactly correct for Unix
          Open php.ini in text editor
          Locate the ; Dynamic Extensions ; text within the file
          Scroll down until you find ;extension=php_ mysql.so
          Remove the semi-colon from the line
          Save file
          Stop and restart web server.
          use phpinfo() to see if access is now available.
          ---------------------------------------------------------------
          jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
          ---------------------------------------------------------------

          Comment

          • Todd

            #6
            Re: PHP Not Recognizing MySQL

            "apt-cache search php5-mysql"
            Will search the package database for the mysql module for php5. If it shows
            you should be able to:
            "apt-get install php5-mysql"

            I don't use php5, but this works for php4-mysql.

            Regards.

            <solitary.wande rer52@gmail.com wrote in message
            news:1162586689 .662665.267820@ h48g2000cwc.goo glegroups.com.. .
            >I am running PHP5 under Linux. Just a newbie and would like to have it
            integrated with MySQL. When I execute
            phpinfo() in a webpage, I see tons of info on php, but nothing on
            MySQL. Perhaps this is because I installed
            MySQL after I installed PHP. Is there a way to get PHP to recognize
            MySQL?
            >
            Thanks, Steve
            >

            Comment

            Working...