Can't locate loadable object DBD::mysql in @INC
Hello Everyone, We are attempting to use a Perl script to access MySQL on Red Hat Linux release 7.2 (Enigma) Kernel 2.4.7-10 on an i686 Unfortunately, the below error keeps appearing: - install_driver(mysql) failed: Can't locate loadable object for module DBD::mysql in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a module that DBD::mysql requires hasn't been fully installed at ./mysqltest1 line 7 --- We have installed: mysql-3.23.49-3.i386.rpm mysql-server-3.23.49-3.i386.rpm mysql-devel-3.23.49-3.i386.rpm Msql-Mysql-modules-1.2219 DBI-1.30 DBD-mysql-2.1018 All have tested fine. Of course, mySQL works fine with PHP scripts. We have also upgraded Perl from 5.6 to 5.8 using cpan. Addionally we have copied the objects to the directory that @INC is looking in. cp -p -R /usr/local/lib/perl5/site_perl/5.8.0/i686-linux /usr/lib/perl5/5.6.0/i386-linux Now we receive this error: -- /usr/bin/perl: error while loading shared libraries: /usr/lib/perl5/5.6.0/i386-linux/auto/DBD/mysql/mysql.so: undefined symbol: Perl_get_sv - My guess would be to get "@INC" {per the initial error} to look into the proper directory {/usr/local/lib/perl5/site_perl/5.8.0/i686-linux} and not {/usr/lib/perl5/5.6.0/i386-linux} Where is the @INC and how can we change it? or any added advice would be appreciated. Thanks in advance. Nik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't locate loadable object DBD::mysql in @INC
Changing @INC would work, but to save yourself hassle later and possibly to avoid further problems you might consider upgrading/re-installing DBI, and DBD-mysql through CPAN as well, as that should fix the problems and keep your CPAN installation contiguous, aka you upgraded Perl through CPAN so you should upgrade all your modules in the same manner. install Mysql should do this, as Mysql will check for DBI as a dependency and get it at the same time. Make sure to invoke CPAN with Perl 5.8.0 executable rather than the previous one. http://danconia.org Nik wrote: > Hello Everyone, > > We are attempting to use a Perl script to access MySQL on Red Hat Linux > release 7.2 (Enigma) Kernel 2.4.7-10 on an i686 > Unfortunately, the below error keeps appearing: > > - > install_driver(mysql) failed: Can't locate loadable object for module > DBD::mysql in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux > /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux > /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at (eval 1) > line 3 > Compilation failed in require at (eval 1) line 3. > Perhaps a module that DBD::mysql requires hasn't been fully installed > at ./mysqltest1 line 7 > --- > > We have installed: > > mysql-3.23.49-3.i386.rpm > mysql-server-3.23.49-3.i386.rpm > mysql-devel-3.23.49-3.i386.rpm > > Msql-Mysql-modules-1.2219 > DBI-1.30 > DBD-mysql-2.1018 > > All have tested fine. Of course, mySQL works fine with PHP scripts. > We have also upgraded Perl from 5.6 to 5.8 using cpan. > > Addionally we have copied the objects to the directory that @INC is > looking in. > > cp -p -R /usr/local/lib/perl5/site_perl/5.8.0/i686-linux > /usr/lib/perl5/5.6.0/i386-linux > > Now we receive this error: > -- > > /usr/bin/perl: error while loading shared libraries: > /usr/lib/perl5/5.6.0/i386-linux/auto/DBD/mysql/mysql.so: undefined symbol: > Perl_get_sv > > - > > My guess would be to get "@INC" {per the initial error} to look into the > proper directory {/usr/local/lib/perl5/site_perl/5.8.0/i686-linux} and not > {/usr/lib/perl5/5.6.0/i386-linux} > > Where is the @INC and how can we change it? or any added advice would be > appreciated. > > Thanks in advance. > > Nik > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How fatalsToBrowser works ?
Thanks everybody, I've made it =)) package Die4CGI; use strict; $main::SIG{__DIE__} = \&Die4CGI::die; sub die { my $dieMesg = shift; $dieMesg =~ s/ at .+$//; my ($package, $file, $line) = caller; $file =~ s/^C:\\Server\\Staff\\Connie\\Project\\onTry\\/\\/; $file =~ s/\\/\//g; print "Content-type: text/html\n\n"; print <<"HTML"; # A lot of html # Garfield said: $dieMesg happens at: $file line $line. # A lot of html # HTML ; exit(0); } 1; So I can call it like the normal : use strict; use Die4CGI; my $file = 'somewhere/somewhere'; open FH, $file or die "$!"; # prints what I want Another fatalsToBrowser, simple and lovely!! ;) *BUT!! I still not understand, how can this overided the orgional "die" ? Why shouldn't I write as : open FH, $file or Die4CGI::die($!) ; Would anybody tell me more ? Rgds, Connie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't locate loadable object DBD::mysql in @INC
Thank you for the help, it is appreciated. We installed DBI and DBD first manually by downloading the modules. Which was probably a mistake but immediately upgraded to Perl 5.8.0 from 5.6.0 through CPAN. Rebooted the server. That problem occurred. I removed the DBI and DBD files manually and used CPAN this time. perl -MCPAN -e 'install DBI' perl -MCPAN -e 'install DBD::mysql' Installation was Successful Rebooted the server. [root@elocalhost /]$ perl -v This is perl, v5.8.0 built for i686-linux [root@localhost /]$ perl -c -MDBD::mysql -e '1' -e syntax OK - install_driver(mysql) failed: Can't locate loadable object for module DBD::mysql in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a module that DBD::mysql requires hasn't been fully installed at ./mysqltest1 line 7 - @INC is still looking in the wrong place. Is there away to have @INC look into the current location? Thanks in advance, Nik On Sat, 17 Aug 2002, Wiggins d'Anconia wrote: > Changing @INC would work, but to save yourself hassle later and possibly > to avoid further problems you might consider upgrading/re-installing > DBI, and DBD-mysql through
Re: How fatalsToBrowser works ?
You might find this link useful... http://perl.apache.org/docs/general/perl_reference/perl_reference.html#Exception_Handling_for_mod_perl Basically, fatalsToBrowser is "OK" to use, but it can be fraught with underlying issues that Matt outlines pretty well in the above URL. Has also given a talk on the subject at the last couple of O'Reilly conferences. As an aside, at eXtropia, therer was a period of a couple years where we used fatalsToBrowser quite a bit. And everytime some incompatibility happened with mod_perl or some other advanced environment, we'd submit the bug (and sometimes a sample patch) to Lincoln Stein who has been very helpful. However, Perl 5.6.0 in particular ruined all of that for us by changing the behavior of how fatalsToBrowser worked making eval {} tests impossible to use in your code. 5.6.1 fixed the problem, but there are MANY ISPs still running 5.6.0 and our support email volume skyrocketted. So now when we give out scripts we provide a "debug" version of the CGI which calls the original CGI behind the scenes wrapped in an eval system that can do the same thing as fatals To Browser. When you are done "debugging", the intention is that you disable it by changing $DEBUG = 0 instead of $DEBUG = 1 or you delete the debug script off your directory. Generally, you shouldn't enable fatalsToBrowser in production as a general security practice. The nice thing about making the debug into a separate script that calls the original CGI is that if you want to re-enable debugging output in production, your production users pointing to the main CGI script will not get any additional information. But you can still troubleshoot with the "debug" version of the URL which your production users won't have (unless they've been hacking around). This is similar in concept to the fact that CGIWRAP has a debug and nondebug version I think. Or at least that's the inspiration for me to have written this. If you want this "debug" wrapper program, you can get it by downloading just about any app off our website such as "address book". If you download "address book", you will see "address_book.cgi and address_book_debug.cgi". The debug one can be easily modified to work with your CGI script and as far as I know has no weird Perl version problems like fatalsToBrowser. Later, Gunther Connie Chan wrote: >Thanks everybody, I've made it =)) > > >package Die4CGI; >use strict; > >$main::SIG{__DIE__} = \&Die4CGI::die; > >sub die >{ my $dieMesg = shift; $dieMesg =~ s/ at .+$//; > my ($package, $file, $line) = caller; > $file =~ s/^C:\\Server\\Staff\\Connie\\Project\\onTry\\/\\/; > $file =~ s/\\/\//g; > print "Content-type: text/html\n\n"; > print <<"HTML"; ># A lot of html # > Garfield said: $dieMesg happens at: $file line $line. ># A lot of html # >HTML >; exit(0); >} > >1; > > >So I can call it like the normal : > >use strict; >use Die4CGI; > >my $file = 'somewhere/somewhere'; >open FH, $file or die "$!"; # prints what I want > >Another fatalsToBrowser, simple and lovely!! ;) > >*BUT!! I still not understand, how can this overided >the orgional "die" ? Why shouldn't I write as : >open FH, $file or Die4CGI::die($!) ; > >Would anybody tell me more ? > >Rgds, >Connie > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Online installer
Hello everyone, Can anyone tell me how to create an online cgi installer? Details: I have a program that want to install on my user's website upon their request. What I am looking for is some kind of form which the user fills out entering their ftp username/password, the directory where they want the program to be installed, the name of the directory, and some variables, like the color of the page, admin password, which will directly be inputted into the script after the installation is completed. Can anyone tell me how to do this, or if anyone has a sample to send me, it will be much appreciated. Thanks so much, Soheil -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online installer
> Hello everyone, > Can anyone tell me how to create an online cgi installer? > Details: > I have a program that want to install on my user's website upon their > request. Where are those 'website' located ? Do you mean you need a configurator at your local(server) side ? > What I am looking for is some kind of form which the user fills out entering > their ftp username/password, the directory where they want the program to be > installed, the name of the directory, and some variables, like the color of > the page, admin password, which will directly be inputted into the script > after the installation is completed. Or you mean some remote control services ? Rgds, Connie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Online installer
Hi, The programs are located on a website, and I want to offer this as a remote service, where anyone can basically use to install it on their server. They might or might not be on the same server. Thanks, Soheil -Original Message- From: Connie Chan [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 17, 2002 9:49 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Online installer > Hello everyone, > Can anyone tell me how to create an online cgi installer? > Details: > I have a program that want to install on my user's website upon their > request. Where are those 'website' located ? Do you mean you need a configurator at your local(server) side ? > What I am looking for is some kind of form which the user fills out entering > their ftp username/password, the directory where they want the program to be > installed, the name of the directory, and some variables, like the color of > the page, admin password, which will directly be inputted into the script > after the installation is completed. Or you mean some remote control services ? Rgds, Connie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online installer
i think you are going to find it very difficult to successfully accomplish this goal. there are going to be subtle differences among the various remote servers, all of which you would have to somehow take into account and handle. you most certainly would need to have your installer program locate the location of Perl on the remove server, and probably other things too...good luck and please keep us (or me at least) posted, as i am always interested in a good challenge and how it has been handled!i'm actually working on a very sophisticated script right now, one that a member of this mailing list stated that could be done. So don't let me or anyone else dissuade you from your goals! Almost anything is possible with careful planning... -Jim Soheil Shaghaghi wrote: > Hi, > The programs are located on a website, and I want to offer this as a remote service, >where anyone can basically use to install it on their server. They might or might not >be on the same server. > > Thanks, > Soheil > > -Original Message- > From: Connie Chan [mailto:[EMAIL PROTECTED]] > Sent: Saturday, August 17, 2002 9:49 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: Online installer > > > Hello everyone, > > Can anyone tell me how to create an online cgi installer? > > Details: > > I have a program that want to install on my user's website upon their > > request. > > Where are those 'website' located ? Do you mean you > need a configurator at your local(server) side ? > > > What I am looking for is some kind of form which the user fills out entering > > their ftp username/password, the directory where they want the program to be > > installed, the name of the directory, and some variables, like the color of > > the page, admin password, which will directly be inputted into the script > > after the installation is completed. > > Or you mean some remote control services ? > > Rgds, > Connie > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]