mysql_connect Error

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

    mysql_connect Error

    Hi,

    I am new to php and I'm testing php connectivity to mysql. I created a
    php script using the php.net sample. The script uses the mysql_connect
    method and when I execute it I get the error:

    Fatal error: Call to undefined function: mysql_connect() in
    /var/www/html/testPHP/testMysql.php on line 7

    I have mysqld ver 4.0.20 and php 4.2.2 that came bundled with apache
    (that came bundled with RH9).

    Thanks for the help,

    -Rex
  • Gordon Burditt

    #2
    Re: mysql_connect Error

    >I am new to php and I'm testing php connectivity to mysql. I created a[color=blue]
    >php script using the php.net sample. The script uses the mysql_connect
    >method and when I execute it I get the error:
    >
    >Fatal error: Call to undefined function: mysql_connect() in
    >/var/www/html/testPHP/testMysql.php on line 7
    >
    >I have mysqld ver 4.0.20 and php 4.2.2 that came bundled with apache
    >(that came bundled with RH9).[/color]

    Not all configurations of PHP support Oracle. Or Postgresql. Or
    MySQL. It looks like your version doesn't. Check the output of
    phpinfo() to see how your PHP is configured. You may need to build
    the configuration you need or find a binary distribution that has
    what you need already configured in.

    Gordon L. Burditt

    Comment

    • Virgil Green

      #3
      Re: mysql_connect Error

      "Frogman" <rf3@rocketmail .com> wrote in message
      news:d7b9d97f.0 406221607.4fc8d 4c9@posting.goo gle.com...[color=blue]
      > Hi,
      >
      > I am new to php and I'm testing php connectivity to mysql. I created a
      > php script using the php.net sample. The script uses the mysql_connect
      > method and when I execute it I get the error:
      >
      > Fatal error: Call to undefined function: mysql_connect() in
      > /var/www/html/testPHP/testMysql.php on line 7
      >
      > I have mysqld ver 4.0.20 and php 4.2.2 that came bundled with apache
      > (that came bundled with RH9).
      >[/color]

      I had that configuration at one time. There is an RPM (or 2) you need to
      download and install from RedHat that provides the MySQL connectivity. I
      don't remember what it was.

      I eventually wanted to upgrade my PHP to get the newer GD functions. Sad to
      discover that getting PHP upgraded via the RPM route was like pulling teeth.
      Too many dependencies from where you are now. I finally just installed
      Fedora Core 1 and it resolved all my issues. Then, I noticed that the Update
      mechanism in Fedora Core 1 indicated that a newer version of PHP was
      available and I ran the update. It went smoothly.

      - Virgil


      Comment

      • Frogman

        #4
        Re: mysql_connect Error

        Yes you're absolutely right. I tried upgrading my PHP with the latest
        RPM and the dependencies goes on and on. I'm planning on just
        installing Fed core 2 on my RH9 install.

        Did you install Fedora on top of RH?

        -Ray

        "Virgil Green" <vjg@DESPAMobsy dian.com> wrote in message news:<4CgCc.253 4$_C3.1260@news svr23.news.prod igy.com>...[color=blue]
        > "Frogman" <rf3@rocketmail .com> wrote in message
        > news:d7b9d97f.0 406221607.4fc8d 4c9@posting.goo gle.com...[color=green]
        > > Hi,
        > >
        > > I am new to php and I'm testing php connectivity to mysql. I created a
        > > php script using the php.net sample. The script uses the mysql_connect
        > > method and when I execute it I get the error:
        > >
        > > Fatal error: Call to undefined function: mysql_connect() in
        > > /var/www/html/testPHP/testMysql.php on line 7
        > >
        > > I have mysqld ver 4.0.20 and php 4.2.2 that came bundled with apache
        > > (that came bundled with RH9).
        > >[/color]
        >
        > I had that configuration at one time. There is an RPM (or 2) you need to
        > download and install from RedHat that provides the MySQL connectivity. I
        > don't remember what it was.
        >
        > I eventually wanted to upgrade my PHP to get the newer GD functions. Sad to
        > discover that getting PHP upgraded via the RPM route was like pulling teeth.
        > Too many dependencies from where you are now. I finally just installed
        > Fedora Core 1 and it resolved all my issues. Then, I noticed that the Update
        > mechanism in Fedora Core 1 indicated that a newer version of PHP was
        > available and I ran the update. It went smoothly.
        >
        > - Virgil[/color]

        Comment

        • Gary L. Burnore

          #5
          Re: mysql_connect Error

          On 25 Jun 2004 09:02:38 -0700, rf3@rocketmail. com (Frogman) wrote:
          [color=blue]
          >Yes you're absolutely right. I tried upgrading my PHP with the latest
          >RPM and the dependencies goes on and on. I'm planning on just
          >installing Fed core 2 on my RH9 install.[/color]

          If you don't mind taking the extra time, you should compile everything
          you want to use (apache, php, mysql, ssl etc) from the source.

          It's worth it. Especially at upgrade time.
          [color=blue]
          >Did you install Fedora on top of RH?[/color]


          That'd be a bad idea. Security issues alone make a fresh install the
          best install.


          Oh, and could you please not top post? Thx. :)


          --
          gburnore@databa six dot com
          ---------------------------------------------------------------------------
          How you look depends on where you go.
          ---------------------------------------------------------------------------
          Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
          | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
          DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
          | ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
          Black Helicopter Repair Svcs Division | Official Proof of Purchase
          =============== =============== =============== =============== ===============
          Want one? GET one! http://www.databasix.com
          =============== =============== =============== =============== ===============

          Comment

          • Virgil Green

            #6
            Re: mysql_connect Error


            "Frogman" <rf3@rocketmail .com> wrote in message
            news:d7b9d97f.0 406250802.f0da9 6@posting.googl e.com...[color=blue]
            > "Virgil Green" <vjg@DESPAMobsy dian.com> wrote in message[/color]
            news:<4CgCc.253 4$_C3.1260@news svr23.news.prod igy.com>...[color=blue][color=green]
            > > "Frogman" <rf3@rocketmail .com> wrote in message
            > > news:d7b9d97f.0 406221607.4fc8d 4c9@posting.goo gle.com...[color=darkred]
            > > > Hi,
            > > >
            > > > I am new to php and I'm testing php connectivity to mysql. I created a
            > > > php script using the php.net sample. The script uses the mysql_connect
            > > > method and when I execute it I get the error:
            > > >
            > > > Fatal error: Call to undefined function: mysql_connect() in
            > > > /var/www/html/testPHP/testMysql.php on line 7
            > > >
            > > > I have mysqld ver 4.0.20 and php 4.2.2 that came bundled with apache
            > > > (that came bundled with RH9).
            > > >[/color]
            > >
            > > I had that configuration at one time. There is an RPM (or 2) you need to
            > > download and install from RedHat that provides the MySQL connectivity. I
            > > don't remember what it was.
            > >
            > > I eventually wanted to upgrade my PHP to get the newer GD functions. Sad[/color][/color]
            to[color=blue][color=green]
            > > discover that getting PHP upgraded via the RPM route was like pulling[/color][/color]
            teeth.[color=blue][color=green]
            > > Too many dependencies from where you are now. I finally just installed
            > > Fedora Core 1 and it resolved all my issues. Then, I noticed that the[/color][/color]
            Update[color=blue][color=green]
            > > mechanism in Fedora Core 1 indicated that a newer version of PHP was
            > > available and I ran the update. It went smoothly.
            > >
            > > - Virgil[/color]
            > Yes you're absolutely right. I tried upgrading my PHP with the latest
            > RPM and the dependencies goes on and on. I'm planning on just
            > installing Fed core 2 on my RH9 install.
            >
            > Did you install Fedora on top of RH?
            >
            > -Ray[/color]

            As I recall, I did indeed install Fedora 1 over RH9. It's my local box and
            is only for playing, so I just took the quickest route. I had other things
            to do at the moment.

            - Virgil



            Comment

            • Frogman

              #7
              Re: mysql_connect Error

              Sorry but I'm not sure what you mean by 'top post'. Can you explain. Thanks.



              Gary L. Burnore <gburnore@datab asix.com> wrote in message news:<cbhjc3$k3 l$2@blackhelico pter.databasix. com>...[color=blue]
              > On 25 Jun 2004 09:02:38 -0700, rf3@rocketmail. com (Frogman) wrote:
              >[color=green]
              > >Yes you're absolutely right. I tried upgrading my PHP with the latest
              > >RPM and the dependencies goes on and on. I'm planning on just
              > >installing Fed core 2 on my RH9 install.[/color]
              >
              > If you don't mind taking the extra time, you should compile everything
              > you want to use (apache, php, mysql, ssl etc) from the source.
              >
              > It's worth it. Especially at upgrade time.
              >[color=green]
              > >Did you install Fedora on top of RH?[/color]
              >
              >
              > That'd be a bad idea. Security issues alone make a fresh install the
              > best install.
              >
              >
              > Oh, and could you please not top post? Thx. :)
              >
              >
              > --
              > gburnore@databa six dot com
              > ---------------------------------------------------------------------------
              > How you look depends on where you go.
              > ---------------------------------------------------------------------------
              > Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              > | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              > DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              > | ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
              > Black Helicopter Repair Svcs Division | Official Proof of Purchase
              > =============== =============== =============== =============== ===============
              > Want one? GET one! http://www.databasix.com
              > =============== =============== =============== =============== ===============[/color]

              Comment

              • Tim Van Wassenhove

                #8
                Re: mysql_connect Error

                In article <d7b9d97f.04063 01252.50d16ad2@ posting.google. com>, Frogman wrote:[color=blue]
                > Sorry but I'm not sure what you mean by 'top post'. Can you explain. Thanks.[/color]

                So i did a little websearch.... typed in "top post" at
                http://www.google.com *bam* got the answer.


                --
                Tim Van Wassenhove <http://home.mysth.be/~timvw>

                Comment

                Working...