Hi, Could it be that no data is written, or read from the files when executing from the server? Possible your server uses another user then mysql. And the server has no access to the files, or the permissons set on the files do not allow them to be read from that user.
You should test it by using some breaks that print the output to a file or to the screen, so that you can see what is happening. Regards, Almar van Pel -----Oorspronkelijk bericht----- Van: Sascha Kettner [mailto:[EMAIL PROTECTED]] Verzonden: zondag, december 23, 2001 18.29 Aan: [EMAIL PROTECTED] Onderwerp: Perl Problem! Hi! I have a proplem using my perl code to write some data into my mysql database. When running in consolemode anything works fine, but when executed by the wwwserver the scripts is processed without errors, except the data is not written into the database! Any idea how to fixit? Thanks in advance Sascha PS: the code sub generatepins { open (GETESTET, ">> /usr/local/httpd/sms/generated.pin"); open (GENERIERT, "< ./pinanfrage.dat"); ####db connect und write######## my $dbh = DBI->connect("DBI:mysql:database=prepaid;host=localhost", "root", "sascha28", {'RaiseError' => 1}); while(my $reader = <GENERIERT>) { chomp($reader); print GETESTET "$reader\n"; $dbh->do("INSERT INTO pins (pin, msisdn, value, knd) VALUES ($reader, 'frei', $wert, '$kunde')"); } # Disconnect from the database. $dbh->disconnect(); close GENERIERT; close GETESTET; } --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
