Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

This one has got me scratching my head. It involves running some Perl code on two computers. One is my desktop computer, running Windows 7 Professional SP1, everything up to date. The other is my laptop computer, running Vista Home Premium SP2, everything up to date.

Everything else is the same - I purposely made it so. I set them both up at the same time, in the same way, because I wanted to have as close to identical development environments as possible between working in my office and going on the road. ActiveState Perl v5.12.4, Apache v2.2.17, MySQL v5.5.8, Perl DBI v1.616, and all configuration settings identical on both computers.

Yesterday I generated an error on my desktop computer in a project I am working on. I had changed a column name in a table, but forgot to update the references to that column in my code. So executing the code generated an error. I have code to display any database access errors, relying on $DBI::err and $DBI::errstr. In this case the error was of course "unknown column."

What I noticed was, when I use my laptop to run the same code on the identically structured table (that still had the column name discrepancy), I got the same error, but where my same error-catching code trys to display the contents of $DBI::err and $DBI::errstr, I get nothing. An empty string, I guess. The error is definitely generated, but $DBI::err and $DBI::errstr are empty. Only on my laptop, with all the same versions of everything.

I have an identical copy of all the projects I am working on or maintaining on both computers. So on my desktop I go to a different project, put an error into some database access code, and purposelly generate an error. The err and errstr values show up. Then I make the same purposeful error in the same project on my laptop, and err and errstr are still blank. So it's not specific to one project - I would guess that it is system-wide in some way. But what, where, how?

At this point someone will certainly wonder, when did you start noticing this happening on the laptop? Did you install something new on that laptop recently? Well, I just installed both machines last week (identical everyting, as I described above), and this is the first time I have had a database error come up in coding since then. I did not install anything new or different on the laptop.

Can any of the Perl Monks think of a situation that would cause this? Because I am currently stumped.

In reply to DBI fails to return an error code by djten

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    What's the matter? Cat got your tongue?...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (3)
    As of 2018-05-27 20:42 GMT
    Find Nodes?
      Voting Booth?