Database connection issues

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

    Database connection issues

    I am having very strange issues today. The scripts that I have, that
    worked fine on Friday, now do not work properly. I can connect fine
    with a client application like MySql tools. I can do queries, and
    everything. I can even connect properly with mysqli, but apps that use
    mysql to connect do not retrieve the information needed. I don't get
    errors, so I don't know what is going on. This all worked for weeks
    until this weekend. I am at a loss as to what this could be.

    I also tested by connecting to a different database, and the same
    results. PHP isn't reading and writing to the database properly.

    I have no idea where to start, so if anyone has some idea, please let
    em know.

  • Rik

    #2
    Re: Database connection issues

    On Mon, 16 Jul 2007 22:10:56 +0200, mtuller <mituller@gmail .comwrote:
    I am having very strange issues today. The scripts that I have, that
    worked fine on Friday, now do not work properly. I can connect fine
    with a client application like MySql tools. I can do queries, and
    everything. I can even connect properly with mysqli, but apps that use
    mysql to connect do not retrieve the information needed. I don't get
    errors, so I don't know what is going on. This all worked for weeks
    until this weekend. I am at a loss as to what this could be.
    >
    I also tested by connecting to a different database, and the same
    results. PHP isn't reading and writing to the database properly.
    >
    I have no idea where to start, so if anyone has some idea, please let
    em know.
    First course of action: ask the hoster what they've changed. MySQL isn't
    automatically included in packages anymore, maybe they did not realize
    that while upgrading.

    Then again, you should either get errors or empty recordsets. Are you sure
    display_errors is enabled with a proper error_reporting setting? 'Does not
    work properly' does not compute here. Exactly what doesn't work, and how.

    --
    Rik Wasmus

    Comment

    • mtuller

      #3
      Re: Database connection issues

      It's on my server. Not an ISPs. display_errors is on.

      The only thing I can think of is that I ran apt-get upgrade. There was
      an error, that something wasn't installed, but I don't think it was
      anything to do with apache or php. I thought it was earlier last week
      though, before Friday.



      On Jul 16, 3:15 pm, Rik <luiheidsgoe... @hotmail.comwro te:
      On Mon, 16 Jul 2007 22:10:56 +0200, mtuller <mitul...@gmail .comwrote:
      I am having very strange issues today. The scripts that I have, that
      worked fine on Friday, now do not work properly. I can connect fine
      with a client application like MySql tools. I can do queries, and
      everything. I can even connect properly with mysqli, but apps that use
      mysql to connect do not retrieve the information needed. I don't get
      errors, so I don't know what is going on. This all worked for weeks
      until this weekend. I am at a loss as to what this could be.
      >
      I also tested by connecting to a different database, and the same
      results. PHP isn't reading and writing to the database properly.
      >
      I have no idea where to start, so if anyone has some idea, please let
      em know.
      >
      First course of action: ask the hoster what they've changed. MySQL isn't
      automatically included in packages anymore, maybe they did not realize
      that while upgrading.
      >
      Then again, you should either get errors or empty recordsets. Are you sure
      display_errors is enabled with a proper error_reporting setting? 'Does not
      work properly' does not compute here. Exactly what doesn't work, and how.
      >
      --
      Rik Wasmus

      Comment

      • Rik

        #4
        Re: Database connection issues

        [topposting fixed]

        On Mon, 16 Jul 2007 22:28:14 +0200, mtuller <mituller@gmail .comwrote:
        On Jul 16, 3:15 pm, Rik <luiheidsgoe... @hotmail.comwro te:
        >On Mon, 16 Jul 2007 22:10:56 +0200, mtuller <mitul...@gmail .comwrote:
        I am having very strange issues today. The scripts that I have, that
        worked fine on Friday, now do not work properly. I can connect fine
        with a client application like MySql tools. I can do queries, and
        everything. I can even connect properly with mysqli, but apps that use
        mysql to connect do not retrieve the information needed. I don't get
        errors, so I don't know what is going on. This all worked for weeks
        until this weekend. I am at a loss as to what this could be.
        >>
        I also tested by connecting to a different database, and the same
        results. PHP isn't reading and writing to the database properly.
        >>
        I have no idea where to start, so if anyone has some idea, please let
        em know.
        >>
        >First course of action: ask the hoster what they've changed. MySQL isn't
        >automaticall y included in packages anymore, maybe they did not realize
        >that while upgrading.
        >>
        >Then again, you should either get errors or empty recordsets. Are you
        >sure
        >display_erro rs is enabled with a proper error_reporting setting? 'Does
        >not
        >work properly' does not compute here. Exactly what doesn't work, and
        >how.
        >
        It's on my server. Not an ISPs. display_errors is on.
        Check, and error_reporting level?
        The only thing I can think of is that I ran apt-get upgrade. There was
        an error, that something wasn't installed, but I don't think it was
        anything to do with apache or php. I thought it was earlier last week
        though, before Friday.
        OK, so what is the error? What is the output of a single mysql_connect()
        call? Does it give a resource? If yes, how are queries reacting, etc.,
        etc. More info about what exactly is going wrong is required here.

        --
        Rik Wasmus

        Comment

        • mtuller

          #5
          Re: Database connection issues

          That's just it. There are no errors. The data just doesn't show up
          correctly. I copied the page that is suppose to display the data over
          to a different server, and that works. Hmmm.... I think I need to
          reinstall apache for some reason. The php.ini files for the 2 servers
          match.

          On Jul 16, 3:42 pm, Rik <luiheidsgoe... @hotmail.comwro te:
          [topposting fixed]
          >
          >
          >
          On Mon, 16 Jul 2007 22:28:14 +0200, mtuller <mitul...@gmail .comwrote:
          On Jul 16, 3:15 pm, Rik <luiheidsgoe... @hotmail.comwro te:
          On Mon, 16 Jul 2007 22:10:56 +0200, mtuller <mitul...@gmail .comwrote:
          I am having very strange issues today. The scripts that I have, that
          worked fine on Friday, now do not work properly. I can connect fine
          with a client application like MySql tools. I can do queries, and
          everything. I can even connect properly with mysqli, but apps that use
          mysql to connect do not retrieve the information needed. I don't get
          errors, so I don't know what is going on. This all worked for weeks
          until this weekend. I am at a loss as to what this could be.
          >
          I also tested by connecting to a different database, and the same
          results. PHP isn't reading and writing to the database properly.
          >
          I have no idea where to start, so if anyone has some idea, please let
          em know.
          >
          First course of action: ask the hoster what they've changed. MySQL isn't
          automatically included in packages anymore, maybe they did not realize
          that while upgrading.
          >
          Then again, you should either get errors or empty recordsets. Are you
          sure
          display_errors is enabled with a proper error_reporting setting? 'Does
          not
          work properly' does not compute here. Exactly what doesn't work, and
          how.
          >
          It's on my server. Not an ISPs. display_errors is on.
          >
          Check, and error_reporting level?
          >
          The only thing I can think of is that I ran apt-get upgrade. There was
          an error, that something wasn't installed, but I don't think it was
          anything to do with apache or php. I thought it was earlier last week
          though, before Friday.
          >
          OK, so what is the error? What is the output of a single mysql_connect()
          call? Does it give a resource? If yes, how are queries reacting, etc.,
          etc. More info about what exactly is going wrong is required here.
          >
          --
          Rik Wasmus

          Comment

          • Rik

            #6
            Re: Database connection issues

            [topposting fixed again, please don't do that]
            I am having very strange issues today. The scripts that I have,
            >that
            worked fine on Friday, now do not work properly. I can connect fine
            with a client application like MySql tools. I can do queries, and
            everything. I can even connect properly with mysqli, but apps that
            >use
            mysql to connect do not retrieve the information needed. I don't
            >get
            errors, so I don't know what is going on.
            I have no idea where to start, so if anyone has some idea, please
            >let
            em know.
            >>
            >First course of action: ask the hoster what they've changed. MySQL
            >isn't
            >automaticall y included in packages anymore, maybe they did not
            >realize
            >that while upgrading.
            >>
            >Then again, you should either get errors or empty recordsets. Are you
            >sure
            >display_erro rs is enabled with a proper error_reporting setting?
            >'Does
            >not
            >work properly' does not compute here. Exactly what doesn't work, and
            >how.
            >>
            It's on my server. Not an ISPs. display_errors is on.
            >>
            >Check, and error_reporting level?
            >>
            The only thing I can think of is that I ran apt-get upgrade. There was
            an error, that something wasn't installed, but I don't think it was
            anything to do with apache or php. I thought it was earlier last week
            though, before Friday.
            >>
            >OK, so what is the error? What is the output of a single mysql_connect()
            >call? Does it give a resource? If yes, how are queries reacting, etc.,
            >etc. More info about what exactly is going wrong is required here.
            >
            That's just it. There are no errors. The data just doesn't show up
            correctly. I copied the page that is suppose to display the data over
            to a different server, and that works. Hmmm.... I think I need to
            reinstall apache for some reason. The php.ini files for the 2 servers
            match.
            Doesn't it show up, or does it show up messed up? Please be more precise
            when reporting a problem, just saying it doesn't work correctly is hardly
            constructive. Offcourse it's possible there's something wrong with either
            Apache, MySQL or PHP install, but that's dubious.

            If it works on another server, most likely the syntax is correct. Are you
            using the same database server? Have you tried to make a simple testcase
            as I said, with a mysql_connect() statement etc? A production page is
            hardly the way to test for database problems, make a simple small page
            with some connecting and queries like 'SHOW DATABASES', undependant on
            other scripts and resources.

            --
            Rik Wasmus

            Comment

            • mtuller

              #7
              Re: Database connection issues

              Ok. I have restarted the server, and all seems ok now. I did this
              earlier and it didn't do anything. I am at a loss still, but won't
              question it. It's Monday...that's all I can figure.

              Thanks for your help Rik.



              On Jul 16, 4:22 pm, Rik <luiheidsgoe... @hotmail.comwro te:
              [topposting fixed again, please don't do that]
              >
              >
              >
              I am having very strange issues today. The scripts that I have,
              that
              worked fine on Friday, now do not work properly. I can connect fine
              with a client application like MySql tools. I can do queries, and
              everything. I can even connect properly with mysqli, but apps that
              use
              mysql to connect do not retrieve the information needed. I don't
              get
              errors, so I don't know what is going on.
              I have no idea where to start, so if anyone has some idea, please
              let
              em know.
              >
              First course of action: ask the hoster what they've changed. MySQL
              isn't
              automatically included in packages anymore, maybe they did not
              realize
              that while upgrading.
              >
              Then again, you should either get errors or empty recordsets. Are you
              sure
              display_errors is enabled with a proper error_reporting setting?
              'Does
              not
              work properly' does not compute here. Exactly what doesn't work, and
              how.
              >
              It's on my server. Not an ISPs. display_errors is on.
              >
              Check, and error_reporting level?
              >
              The only thing I can think of is that I ran apt-get upgrade. There was
              an error, that something wasn't installed, but I don't think it was
              anything to do with apache or php. I thought it was earlier last week
              though, before Friday.
              >
              OK, so what is the error? What is the output of a single mysql_connect()
              call? Does it give a resource? If yes, how are queries reacting, etc.,
              etc. More info about what exactly is going wrong is required here.
              >
              That's just it. There are no errors. The data just doesn't show up
              correctly. I copied the page that is suppose to display the data over
              to a different server, and that works. Hmmm.... I think I need to
              reinstall apache for some reason. The php.ini files for the 2 servers
              match.
              >
              Doesn't it show up, or does it show up messed up? Please be more precise
              when reporting a problem, just saying it doesn't work correctly is hardly
              constructive. Offcourse it's possible there's something wrong with either
              Apache, MySQL or PHP install, but that's dubious.
              >
              If it works on another server, most likely the syntax is correct. Are you
              using the same database server? Have you tried to make a simple testcase
              as I said, with a mysql_connect() statement etc? A production page is
              hardly the way to test for database problems, make a simple small page
              with some connecting and queries like 'SHOW DATABASES', undependant on
              other scripts and resources.
              >
              --
              Rik Wasmus

              Comment

              Working...