xampp perl mysql error

Problems with the Windows version of XAMPP, questions, comments, and anything related.

xampp perl mysql error

Postby apachedon1 » 19. August 2008 23:18

I'm new to xampp so please bear with me.

I just installed xampp (xampp-win32-1.6.7) on my windows machine and
also installed the perl addon (xampp-win32-perl-addon-5.10.0-2.2.9-

I would like to write a perl script which will access a mysql database
and put the script in the cgi-bin so that it can be run when it is
accessed by a browser.

So, this is what I've done:

1. I created a database using phpMyAdmin and added a table named Names
and added two fields: FirstName and LastName

2. I created the following perl script, mysql_addrow_test.pl, and put
it in the cgi-bin folder:

print "Content-type: text/html\n\n";

use strict;
use DBI;
my $dsn = "DBI:mysql:host=localhost;database=testdatabase";
my $dbh = DBI->connect($dsn,"root","") or die "Cannot connect to

my $count = $dbh->do("INSERT INTO Names (FirstName,LastName) VALUES
if($count) {
printf "%d row(s) were updated<br/>",$count;

print "Connected<br/>";
print "Disconnected<br/>";

3. I access the script by pointing internet explorer at:

An error popup shows up on my screen with the title: "perl.exe -
Unable to Locate Component" and a message "This application has failed
to start because perl58.dll was not found. Re-installing the
application may fix this problem."

I've re-installed xampp a couple of times and the error pop-up still

Any advice on this would be much appreciated. Or, if you have an
example of how you were able to use XAMPP with a cgi perl script to
access a mysql database through browser access, that would be
appreciated also.

Thanks in advance
Posts: 1
Joined: 19. August 2008 22:46

Postby w4vy » 20. August 2008 13:35

Hi try doing a google for Active Perl and install that. quite a lot of people have had problems with the perl that comes with xampp

User avatar
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 72 guests