command line ODBC connection problem

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

    command line ODBC connection problem

    Hello

    This is my problem:
    I hava a php script which collect data from a remote IBM DB2 AS400 ,
    and puts them on a local MYSQL server.
    Calling it from a browser, it's fine.

    I want to launch it from command line using CLI ($php script.php)
    to put it in a cron job.
    Not working!

    It gives an error line like: " odbc_connect(): SQL error: , SQL state
    è\@ø in SQLConnect".

    After "SQL state" are not readable characters.

    The error seems to be in the odbc_connect() statement?

    Any ideas?
    Can I solve it, or have to go back to PERL? (Don't want to!)

    thanks
    huge

  • hugenin

    #2
    Re: command line ODBC connection problem

    php experts, ah!

    no answers....well , thank you.

    Comment

    • David Haynes

      #3
      Re: command line ODBC connection problem

      hugenin wrote:[color=blue]
      > php experts, ah!
      >
      > no answers....well , thank you.
      >[/color]
      Let's see...
      Your problem statement:

      I have a problem with my ODBC connection from the command line although
      it works from the web server.

      I'm not going to show you the code...I expect you experts to infer it
      from my description.

      I'm not going to mention things like what OS I'm on, what version of PHP
      I have or even what parameters I am using for the connection since
      experts such as yourself don't need annoying details like that.

      I'm going to threaten to go back to perl unless you can help me.

      If you don't help me within 26 hours, I will taunt you with a sarcastic
      message.

      Gosh! Who wouldn't *jump* at the chance to help you? You make it *so* easy.

      -david-

      Comment

      • hugenin

        #4
        Re: command line ODBC connection problem

        you see David...
        had to be sarcastic to get an answer!

        Was too hard to say "post the code, please"???
        This was the first time I asked for help here,
        I understand I had to post more information. My fault.

        anyway, I solved the problem, it was easy...no perl!

        bye David.

        huge

        Comment

        • Colin Fine

          #5
          Re: command line ODBC connection problem

          hugenin wrote:[color=blue]
          > you see David...
          > had to be sarcastic to get an answer!
          >[/color]
          No, you had to ask a second time. You didn't need to be sarcastic.
          [color=blue]
          > Was too hard to say "post the code, please"???
          > This was the first time I asked for help here,
          > I understand I had to post more information. My fault.
          >[/color]
          I keep being amazed (I suppose I shouldn't be, by now) at how bad many
          people are at reporting problems (including some of the professional
          software developers who are my colleagues).

          Yours was actually better than many - you said what you were trying to
          do and you even said what result you got (you'd be amazed how many
          people looking for help just say it 'didn't work').

          But you[color=blue]
          > anyway, I solved the problem, it was easy...no perl!
          >
          > bye David.
          >
          > huge
          >[/color]
          I'm glad you solved your problem, but I have a great deal of sympathy
          with David's reply. I don't think you would have got such a sarcastic
          reply if you hadn't posted your aggressive second posting.

          Of course, given you hadn't had a reply in the first 24 hours you
          probably wouldn't have got one - because there was not enough
          information in your original posting.

          I work

          Comment

          • Jim Michaels

            #6
            Re: command line ODBC connection problem

            I had heard from another post-er that MySQL ab started to disable mysql
            stuff in command-line PHP due to licensing issues.

            "hugenin" <hugenin@gmail. com> wrote in message
            news:1137163395 .909043.321220@ g49g2000cwa.goo glegroups.com.. .[color=blue]
            > you see David...
            > had to be sarcastic to get an answer!
            >
            > Was too hard to say "post the code, please"???
            > This was the first time I asked for help here,
            > I understand I had to post more information. My fault.
            >
            > anyway, I solved the problem, it was easy...no perl!
            >
            > bye David.
            >
            > huge
            >[/color]


            Comment

            • Jim Michaels

              #7
              Re: command line ODBC connection problem

              "Jim Michaels" <jmichae3@yahoo .com> wrote in message
              news:kY6dnSrycr x0X0venZ2dnUVZ_ v6dnZ2d@comcast .com...[color=blue]
              >I had heard from another post-er that MySQL ab started to disable mysql
              >stuff in command-line PHP due to licensing issues.[/color]

              yup. tried something simple from the command-line.
              PHP Fatal error: Call to undefined function mysql_connect() in
              C:\php5.1.2\tes t.php on line 2

              [color=blue]
              >
              > "hugenin" <hugenin@gmail. com> wrote in message
              > news:1137163395 .909043.321220@ g49g2000cwa.goo glegroups.com.. .[color=green]
              >> you see David...
              >> had to be sarcastic to get an answer!
              >>
              >> Was too hard to say "post the code, please"???
              >> This was the first time I asked for help here,
              >> I understand I had to post more information. My fault.
              >>
              >> anyway, I solved the problem, it was easy...no perl!
              >>
              >> bye David.
              >>
              >> huge
              >>[/color]
              >
              >[/color]


              Comment

              Working...