Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^3: DBD::Mysql not working properly in mac OS X

by romy_mathew (Beadle)
on Nov 04, 2013 at 16:57 UTC ( #1061154=note: print w/replies, xml ) Need Help??

in reply to Re^2: DBD::Mysql not working properly in mac OS X
in thread DBD::Mysql not working properly in mac OS X

in location /System/Library/perl
i see 2 version, 5.10 and 5.12.
  • Comment on Re^3: DBD::Mysql not working properly in mac OS X

Replies are listed 'Best First'.
Re^4: DBD::Mysql not working properly in mac OS X
by tangent (Priest) on Nov 04, 2013 at 17:22 UTC
    I am assuming that your script does work when called from the terminal, but you get an error when you call it from the browser.

    If that is the case then try changing the first line of your script to:

    Also, to see any errors, add these lines directly after the first line:
    use CGI::Carp('fatalsToBrowser'); print "Content-type:text/html\n\n";
      below is the error when i used use::Carp
      install_driver(mysql) failed: Can't load '/Library/Perl/5.12/darwin-th +read-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: + dlopen(/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/ +mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/ +DBD/mysql/mysql.bundle Reason: image not found at /System/Library/Perl/5.12/darwin-thread-m +ulti-2level/ line 204. at (eval 10) line 3 Compilation failed in require at (eval 10) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at /Library/WebServer/CGI-Executables/ line 22
      I tried #!/usr/bin/perl5.12.4 failed with html error 500
        I think your script is running with perl 5.10 when called from the browser, and that your mySQL is compiled against perl 5.12. To see if this is the case, create the following script and compare the results you get when called from the browser and when called from the terminal.
        #!/usr/bin/perl print "Content-type: text/html\n\n"; my $command = `perl -v`; print "$command\n";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061154]
[holli]: you know, monk days are fun and all. but too many of them are bad for your health
[1nickt]: ...modern car. Suggests using TLA+ or other software modeling language to autogenerate code.
1nickt is not sure more and more layers separating the programmer from the program is the right way to go...
[holli]: happy one, shmem ;)
[1nickt]: I had an interview couople of weeks ago, heard from a principal engineer that a friend of his who works at The Google told him that the self-teaching software that determines the dynamic pricing for their adverts...
[1nickt]: ... has become so complex that there is no one at the Goole who knows what it does.
[marto]: William Gibson was right
[moritz]: a classical problem with machine learning
[1nickt]: moritz isn;t the difference today that the machine learning algos are in charge of most stuffs?
[moritz]: depends on what you mean by "most stuff"

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2017-11-21 13:02 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (301 votes). Check out past polls.