From joel at fentin.com Mon Dec 19 10:29:47 2016 From: joel at fentin.com (Joel Fentin) Date: Mon, 19 Dec 2016 10:29:47 -0800 Subject: [San-Diego-pm] Stuck again Message-ID: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> I'm trying to modify Perl code I wrote years ago. First I have to get it running as is. It won't. --------------- my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT 10"); There is no error and no data. This works on a website on BlueHost. It also works on a personal server in an old computer using old windows, old Perl, old Apache, & old MySQL. --------------- So then, I tried something newer: $sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10"); $sth->execute()||($error="Error:$DBI::errstr\n"); $ref=$dbh->fetchall_arrayref(); The error: Can't locate object method "fetchall_arrayref" via package "DBI::db" at C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line 285 (There is a use DBI; statement at the start of the program.) Any help/ideas/wisdom/suggestions appreciated. -- Joel Fentin tel: 760-749-8863 Personal Website: http://fentin.com From mark.schoonover at gmail.com Mon Dec 19 10:36:35 2016 From: mark.schoonover at gmail.com (Mark Schoonover) Date: Mon, 19 Dec 2016 10:36:35 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> Message-ID: Do you have the correct DBD installed? Mark Schoonover KA6WKE Author: 4NEC2 The Definitive Guide Website: http://www.ka6wke.net Resume: http://cv.ka6wke.net On Mon, Dec 19, 2016 at 10:29 AM, Joel Fentin wrote: > I'm trying to modify Perl code I wrote years ago. First I have to get it > running as is. It won't. > > --------------- > > my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT 10"); > > There is no error and no data. > > This works on a website on BlueHost. > It also works on a personal server in an old computer using old windows, > old Perl, old Apache, & old MySQL. > > --------------- > > So then, I tried something newer: > > $sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10"); > $sth->execute()||($error="Error:$DBI::errstr\n"); > $ref=$dbh->fetchall_arrayref(); > The error: Can't locate object method "fetchall_arrayref" via package > "DBI::db" at C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line 285 > > (There is a use DBI; statement at the start of the program.) > > Any help/ideas/wisdom/suggestions appreciated. > > -- > Joel Fentin tel: 760-749-8863 > Personal Website: http://fentin.com > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm at pm.org > http://mail.pm.org/mailman/listinfo/san-diego-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel at fentin.com Mon Dec 19 11:29:48 2016 From: joel at fentin.com (Joel Fentin) Date: Mon, 19 Dec 2016 11:29:48 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> Message-ID: <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> I don't know. I don't know how to know. showmodules.pl says: DBD::ADO -- 2.99 DBD::CSV -- 0.48 DBD::ODBC -- 1.52 DBD::Oracle -- 1.74 DBD::Pg -- 3.5.3 DBD::SQLite -- 1.50 DBD::mysql -- 4.041 DBI -- 1.636 ============================== On 12/19/2016 10:36 AM, Mark Schoonover wrote: > Do you have the correct DBD installed? > > > Mark Schoonover KA6WKE > Author: 4NEC2 The Definitive Guide > > Website: http://www.ka6wke.net > Resume: http://cv.ka6wke.net > > On Mon, Dec 19, 2016 at 10:29 AM, Joel Fentin > wrote: > > I'm trying to modify Perl code I wrote years ago. First I have to > get it running as is. It won't. > > --------------- > > my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT 10"); > > There is no error and no data. > > This works on a website on BlueHost. > It also works on a personal server in an old computer using old > windows, old Perl, old Apache, & old MySQL. > > --------------- > > So then, I tried something newer: > > $sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10"); > $sth->execute()||($error="Error:$DBI::errstr\n"); > $ref=$dbh->fetchall_arrayref(); > The error: Can't locate object method "fetchall_arrayref" via > package "DBI::db" at C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line 285 > > (There is a use DBI; statement at the start of the program.) > > Any help/ideas/wisdom/suggestions appreciated. > > -- > Joel Fentin tel: 760-749-8863 > Personal Website: http://fentin.com > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm at pm.org > http://mail.pm.org/mailman/listinfo/san-diego-pm > > > -- Joel Fentin tel: 760-749-8863 Personal Website: http://fentin.com From chris.grau at gmail.com Mon Dec 19 11:35:17 2016 From: chris.grau at gmail.com (Christopher Grau) Date: Mon, 19 Dec 2016 11:35:17 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> Message-ID: The fetchall_arrayref() method is attached to the statement handle ($sth) rather than the database handle ($dbh). On Mon, Dec 19, 2016 at 10:29 AM, Joel Fentin wrote: > I'm trying to modify Perl code I wrote years ago. First I have to get it > running as is. It won't. > > --------------- > > my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT 10"); > > There is no error and no data. > > This works on a website on BlueHost. > It also works on a personal server in an old computer using old windows, > old Perl, old Apache, & old MySQL. > > --------------- > > So then, I tried something newer: > > $sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10"); > $sth->execute()||($error="Error:$DBI::errstr\n"); > $ref=$dbh->fetchall_arrayref(); > The error: Can't locate object method "fetchall_arrayref" via package > "DBI::db" at C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line 285 > > (There is a use DBI; statement at the start of the program.) > > Any help/ideas/wisdom/suggestions appreciated. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim.bollman at gmail.com Mon Dec 19 11:47:20 2016 From: tim.bollman at gmail.com (Tim Bollman) Date: Mon, 19 Dec 2016 11:47:20 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> Message-ID: I believe your problem is simply that you want $sth->fetchall_arrayref() instead of $dbh->...; -Tim On Mon, Dec 19, 2016 at 11:29 AM, Joel Fentin wrote: > I don't know. I don't know how to know. > > showmodules.pl says: > > DBD::ADO -- 2.99 > DBD::CSV -- 0.48 > DBD::ODBC -- 1.52 > DBD::Oracle -- 1.74 > DBD::Pg -- 3.5.3 > DBD::SQLite -- 1.50 > DBD::mysql -- 4.041 > DBI -- 1.636 > > ============================== > > On 12/19/2016 10:36 AM, Mark Schoonover wrote: > >> Do you have the correct DBD installed? >> >> >> Mark Schoonover KA6WKE >> Author: 4NEC2 The Definitive Guide >> >> Website: http://www.ka6wke.net >> Resume: http://cv.ka6wke.net >> >> On Mon, Dec 19, 2016 at 10:29 AM, Joel Fentin > > wrote: >> >> I'm trying to modify Perl code I wrote years ago. First I have to >> get it running as is. It won't. >> >> --------------- >> >> my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT 10"); >> >> There is no error and no data. >> >> This works on a website on BlueHost. >> It also works on a personal server in an old computer using old >> windows, old Perl, old Apache, & old MySQL. >> >> --------------- >> >> So then, I tried something newer: >> >> $sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10"); >> $sth->execute()||($error="Error:$DBI::errstr\n"); >> $ref=$dbh->fetchall_arrayref(); >> The error: Can't locate object method "fetchall_arrayref" via >> package "DBI::db" at C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line >> 285 >> >> (There is a use DBI; statement at the start of the program.) >> >> Any help/ideas/wisdom/suggestions appreciated. >> >> -- >> Joel Fentin tel: 760-749-8863 >> Personal Website: http://fentin.com >> _______________________________________________ >> San-Diego-pm mailing list >> San-Diego-pm at pm.org >> http://mail.pm.org/mailman/listinfo/san-diego-pm >> >> >> >> > -- > Joel Fentin tel: 760-749-8863 > Personal Website: http://fentin.com > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm at pm.org > http://mail.pm.org/mailman/listinfo/san-diego-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel at fentin.com Mon Dec 19 13:49:53 2016 From: joel at fentin.com (Joel Fentin) Date: Mon, 19 Dec 2016 13:49:53 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> Message-ID: Thank you for getting back to me. I made the change. No error. No data. In the old computer where all works: DBD::SQLite -- 1.13 DBD::mysql -- 3.0002 DBI -- 1.58 Can it be that selectall_arrayref & fetchall_arrayref have been dropped? In another program within the computer fetchrow_array works. ==================== On 12/19/2016 11:47 AM, Tim Bollman wrote: > I believe your problem is simply that you want $sth->fetchall_arrayref() > instead of $dbh->...; > > -Tim > > On Mon, Dec 19, 2016 at 11:29 AM, Joel Fentin > wrote: > > I don't know. I don't know how to know. > > showmodules.pl says: > > DBD::ADO -- 2.99 > DBD::CSV -- 0.48 > DBD::ODBC -- 1.52 > DBD::Oracle -- 1.74 > DBD::Pg -- 3.5.3 > DBD::SQLite -- 1.50 > DBD::mysql -- 4.041 > DBI -- 1.636 > > ============================== > > On 12/19/2016 10:36 AM, Mark Schoonover wrote: > > Do you have the correct DBD installed? > > > Mark Schoonover KA6WKE > Author: 4NEC2 The Definitive Guide > > > Website: http://www.ka6wke.net > Resume: http://cv.ka6wke.net > > On Mon, Dec 19, 2016 at 10:29 AM, Joel Fentin > >> wrote: > > I'm trying to modify Perl code I wrote years ago. First I > have to > get it running as is. It won't. > > --------------- > > my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT > 10"); > > There is no error and no data. > > This works on a website on BlueHost. > It also works on a personal server in an old computer using old > windows, old Perl, old Apache, & old MySQL. > > --------------- > > So then, I tried something newer: > > $sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10"); > $sth->execute()||($error="Error:$DBI::errstr\n"); > $ref=$dbh->fetchall_arrayref(); > The error: Can't locate object method "fetchall_arrayref" via > package "DBI::db" at > C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line 285 > > (There is a use DBI; statement at the start of the program.) > > Any help/ideas/wisdom/suggestions appreciated. > > -- > Joel Fentin tel: 760-749-8863 > > > Personal Website: http://fentin.com > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm at pm.org > > > http://mail.pm.org/mailman/listinfo/san-diego-pm > > > > > > > -- > Joel Fentin tel: 760-749-8863 > Personal Website: http://fentin.com > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm at pm.org > http://mail.pm.org/mailman/listinfo/san-diego-pm > > > -- Joel Fentin tel: 760-749-8863 Personal Website: http://fentin.com From chris.grau at gmail.com Mon Dec 19 14:01:19 2016 From: chris.grau at gmail.com (Christopher Grau) Date: Mon, 19 Dec 2016 14:01:19 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> Message-ID: Are you positive that data exists in the table for the instance you're connecting to? What does the native database client return? On Mon, Dec 19, 2016 at 1:49 PM, Joel Fentin wrote: > Thank you for getting back to me. > > I made the change. No error. No data. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel at fentin.com Mon Dec 19 14:48:53 2016 From: joel at fentin.com (Joel Fentin) Date: Mon, 19 Dec 2016 14:48:53 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> Message-ID: <4e3faf38-8cdc-3e61-6b4a-0af2e7673257@fentin.com> I have another tool that displays the right data. For purposes of this inquiry, I pasted the following in the same place in the program: my $QtyDiscos = $dbh->selectrow_array("SELECT COUNT(*) FROM titulo");#qty of CDs in DB die "|$QtyDiscos|"; The result: |26898| MySQL has been bought and sold a few times. I don't know very much, but my hunch is that this is about changes/disappearances/different instructions regarding selectall_arrayref & fetchall_arrayref. -------------------- On 12/19/2016 2:01 PM, Christopher Grau wrote: > Are you positive that data exists in the table for the instance you're > connecting to? What does the native database client return? > > On Mon, Dec 19, 2016 at 1:49 PM, Joel Fentin > wrote: > > Thank you for getting back to me. > > I made the change. No error. No data. > -- Joel Fentin tel: 760-749-8863 Personal Website: http://fentin.com From chris.grau at gmail.com Mon Dec 19 15:37:59 2016 From: chris.grau at gmail.com (Christopher Grau) Date: Mon, 19 Dec 2016 15:37:59 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: <4e3faf38-8cdc-3e61-6b4a-0af2e7673257@fentin.com> References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> <4e3faf38-8cdc-3e61-6b4a-0af2e7673257@fentin.com> Message-ID: At this point, I don't know what to tell you. There doesn't appear to be enough information to guess what might be going wrong for you. The count returns a value, so there must be data in the table. But the selection apparently returns nothing. Again, I don't see enough to do more than make wild guesses. The ownership of MySQL is inconsequential. The DBI interface is completely removed from that and it is highly unlikely that the DBD::mysql module would let it vanish, breaking the entire interface. On Mon, Dec 19, 2016 at 2:48 PM, Joel Fentin wrote: > I have another tool that displays the right data. > > For purposes of this inquiry, I pasted the following in the same place in > the program: > > my $QtyDiscos = $dbh->selectrow_array("SELECT COUNT(*) FROM titulo");#qty > of CDs in DB > die "|$QtyDiscos|"; > > The result: |26898| > > MySQL has been bought and sold a few times. I don't know very much, but my > hunch is that this is about changes/disappearances/different instructions > regarding selectall_arrayref & fetchall_arrayref. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel at fentin.com Mon Dec 19 16:54:59 2016 From: joel at fentin.com (Joel Fentin) Date: Mon, 19 Dec 2016 16:54:59 -0800 Subject: [San-Diego-pm] Stuck again In-Reply-To: References: <8bcbecc1-39c3-0c9d-1876-f34f4c75ef8f@fentin.com> <3a40ed3a-a29b-053f-aa92-1fb841eddf07@fentin.com> <4e3faf38-8cdc-3e61-6b4a-0af2e7673257@fentin.com> Message-ID: <39dfaa0a-6a92-8416-9cc2-53b8e8a0422d@fentin.com> I thank you for your efforts. At this point I need to teach myself how to use other than selectall_arrayref & fetchall_arrayref. ================================= On 12/19/2016 3:37 PM, Christopher Grau wrote: > At this point, I don't know what to tell you. There doesn't appear to be > enough information to guess what might be going wrong for you. > > The count returns a value, so there must be data in the table. But the > selection apparently returns nothing. Again, I don't see enough to do > more than make wild guesses. > > The ownership of MySQL is inconsequential. The DBI interface is > completely removed from that and it is highly unlikely that the > DBD::mysql module would let it vanish, breaking the entire interface. > > On Mon, Dec 19, 2016 at 2:48 PM, Joel Fentin > wrote: > > I have another tool that displays the right data. > > For purposes of this inquiry, I pasted the following in the same > place in the program: > > my $QtyDiscos = $dbh->selectrow_array("SELECT COUNT(*) FROM > titulo");#qty of CDs in DB > die "|$QtyDiscos|"; > > The result: |26898| > > MySQL has been bought and sold a few times. I don't know very much, > but my hunch is that this is about changes/disappearances/different > instructions regarding selectall_arrayref & fetchall_arrayref. > -- Joel Fentin tel: 760-749-8863 Personal Website: http://fentin.com