Issues with Perl, Xampp - connecting to Microsoft Access?
-
Hi, I just installed XAMPP after having no luck figuring out how to configure Apache (yes, I am very much a rookie). I installed it and after playing around for a while I was able to get my first Perl script to work (hello world). Step 1 accomplished. Whooo hoooo! Step two is to get my Perl script to successfully pull data from my Microsot Access DB and display it on the page. When trying to do this, it seemed I missing something called DBI. I researched some blogs on the internet and tried installing this, but it still doesn't seem to be working. From my understanding I should be able to open a DOS prompt and type "ppm". I can't do this either. When I try to open my program in a browser I first get a popup error entitlted, "apache.exe - Unable to Locate compnent" The description is, " This application has failed to start because perl58.dll was not found. Re-installing the application may fix this problem. I then get a server error, "Error message: install_driver(ODBC) failed: Can't load 'C:/xampp/perl/site/lib//auto/DBD/ODBC/O… for module DBD::ODBC: load_file:The specified module could not be found at C:/xampp/perl/lib/DynaLoader.pm line 203. at (eval 49) line 3 Compilation failed in require at (eval 49) line 3. Perhaps a required shared library or dll isn't installed where expected at C:/xampp/cgi-bin/testdb.pl line 7 " Anyone have any ideas on what I am doing incorrectly? Here is my code: #!C:/xampp/perl/bin/perl.exe #Windows-based Perl/DBI/MS Access example use DBI; #open connection to Access database $dbh = DBI->connect('dbi:ODBC:Poker'); #construct SQL statement $sqlstatement="SELECT FirstName,LastName FROM PokerTable"; #prepare and execute SQL statement $sth = $dbh->prepare($sqlstatement); $sth->execute || die "Could not execute SQL statement, maybe invalid?"; @row=$sth->fetchrow_array; ($FirstName,$LastName)=$sth->fetchrow_… #output database results while (@row=$sth->fetchrow_array) { print "@row\n" }
-
Answer:
Your first step is to get the Perl program working OUTSIDE of the Apache environment. THEN worry about running it as a CGI.
Corey G at Yahoo! Answers Visit the source
Related Q & A:
- How to call shell script into perl?Best solution by Stack Overflow
- How to enable Microsoft Access Driver (*.mdb, *.accdb) in Microsoft Azure server?Best solution by Stack Overflow
- How can I convert a string number to a number in Perl?Best solution by Stack Overflow
- What are the test automation tools that use perl as the scripting language??Best solution by Yahoo! Answers
- Is there a free program like Microsoft Access?Best solution by wiki.answers.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.