CrazeD Posted April 2, 2009 Share Posted April 2, 2009 I've been struggling with this for a while now. I can't seem to get MySQL to work with Perl on my Windows box. I get an Internal 500 error, and my log says: [Thu Apr 02 04:06:10 2009] [error] [client 192.168.0.30] Premature end of script headers: test.pl [Thu Apr 02 04:06:10 2009] [error] [client 192.168.0.30] Can't locate Mysql.pm in @INC (@INC contains: C:/WEB/PERL/site/lib C:/WEB/PERL/lib .) at C:/WEB/public_html/test.pl line 3.\r [Thu Apr 02 04:06:10 2009] [error] [client 192.168.0.30] BEGIN failed--compilation aborted at C:/WEB/public_html/test.pl line 3.\r Configuration: Windows XP SP2 Apache 2.0.63 ActiveState Perl 5.8.8 Build 822 DBD-Mysql 4.005 At first I couldn't even find the DBD-Mysql file, but I finally found a repository that had it and installed it with PPM. It says version 4.005 is installed, and it can verify it. My Perl script: #!C:\WEB\PERL\bin\perl.exe use Mysql; print "Content-type: text/html\n\n"; $host = 'localhost'; $user = 'root'; $pass = 'root'; $dbname = 'test'; $db = Mysql->connect($host,$dbname,$user,$pass); if ($db) { print "works..."; } So, what am I doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/152204-cant-get-mysql-to-work-with-perl/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.