Help - Search - Members - Calendar
Full Version: Warning from Perl in 3.0D
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
lgdrummer
When I'm logged in to the main menu of MT, I see this message at the bottom of the screen:

CODE
$sth->{'insertid'} is deprecated, use $sth->{'mysql_insertid'} at <MT Path>/cgi-bin/lib/MT/ObjectDriver/DBI/mysql.pm line 30.


Any ideas? I'm wondering if it's something I did, because I initially had some trouble switching from BerkelyDB to mySQL (which I did when I upgraded to 3.0D) Everything seems to work fine, but then this message concerns me...
ingmar
QUOTE
CODE
$sth->{'insertid'} is deprecated, use $sth->{'mysql_insertid'} at <MT Path>/cgi-bin/lib/MT/ObjectDriver/DBI/mysql.pm line 30.

Any ideas?  I'm wondering if it's something I did
message concerns me...

Had the same message. Only shows up once, I think, when creating the MySQL db. Safe to ignore.
lgdrummer
yeah, went away for me too, I guess it's ok...
Claudius
Actually, I'm glad someone else finally experienced this same error message....but I've found that it doesn't completely go away. It still shows up every once in awhile upon login. Not every login, but still. Anyone else experiencing this or have any idea what is causing it?
ingmar
QUOTE (Claudius @ May 25 2004, 07:14 AM)
Actually, I'm glad someone else finally experienced this same error message....but I've found that it doesn't completely go away.  It still shows up every once in awhile upon login.  Not every login, but still.  Anyone else experiencing this or have any idea what is causing it?

Why, it says it clear enough:

QUOTE
$sth->{'insertid'} is deprecated, use $sth->{'mysql_insertid'} at /cgi-bin/lib/MT/ObjectDriver/DBI/mysql.pm line 30.

So, if it really bothers you (I've only had it once, but I haven't toyed around with MT3.0 much yet) do it the favor, open mysql.pm in you favorite text editor and change "insertid" to "mysql_insertid".
Ananna
I am getting this error as well

CODE
$sth->{'insertid'} is deprecated, use $sth->{'mysql_insertid'} at /usr/local/.../cgi-bin/lib/MT/ObjectDriver/DBI/mysql.pm line 30.


So, I will edit the mysql.pm to use the correct code.

Ah, but I look at the code and see...

CODE
sub fetch_id { $_[1]->{mysql_insertid} || $_[1]->{insertid} }


So, it's checking the same thing via mysql_insertid and insertid which is, I assume, to account for different versions of perl that people might have installed.

I would assume that the correct way to edit this line would be to change it to:

CODE
sub fetch_id { $_[1]->{mysql_insertid} }


assuming the user is using the version of perl that uses mysql_insertid and not insertid.

This could be dangerous if your ISP ever decided to downgrade perl or moved you to a different server with a different version of perl or you moved to a different ISP with a different setup with an older version of perl... well, you get the idea.

To tell you the truth, I have no idea if that's perl or not, I'm just guessing. Pretty sure it's not php or Python, though. wink.gif

Anyway, might be one of those things that stays in there forever, so the widest number of people can use MT. Which is a good thing, I suppose.

I wish I knew the language well enough, such that I could do error checking and avoid the output of an error. It just offends my precious sensibilities to see an error line output, especially when it's long enough to cause a horizontal scrollbar to appear. biggrin.gif

(On second thought, I might not change this in my installation, as I know for certain that my ISP likes to move us around to different servers depending on his mood and the state of the particular server. Beats having them go down on us while we're trying to run a website, but it's always an open question which server we might happen to be on, on any given day. At least life's never boring. smile.gif )
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.