Bugzilla – Bug 12073
Scanner fails to run using Perl code under ActivePerl 5.10
Last modified: 2009-05-18 22:18:21 UTC
Running on Windows Server 2003 with code checked out from SVN repository /7.4/branches/noweb-sqlite under ActivePerl 5.10.0.1004. The SC server runs fine, the web interface is operational, the empty SQLite database is created, settings stick, logging works, but the scanner does not run. On startup, the SC server sees an empty SQLite database and logs that it is initiating a scan. After that there's nothing in server.log related to a scan, no scanner.log is created, and no isScanning record is created in the metainformation table of the SQLite database. Running a scan manually from the web ui fares no better.
I think the problem here was attempting to run with multiple versions of Perl installed on the server. If I set things up so that Perl 5.10 is the only available version (and the only \perl\bin\ in the PATH environment variable) then the scanner runs. I suspect that change 7953 for bug 3530 may not work on all systems, but I don't know how to go about debugging it. Is there some way to get SC to log the command being used to launch the scanner?
The following patch will print what exact command is going to be run: Index: D:/workspace/tinysc/server/Slim/Music/Import.pm =================================================================== --- D:/workspace/tinysc/server/Slim/Music/Import.pm (revision 26659) +++ D:/workspace/tinysc/server/Slim/Music/Import.pm (working copy) @@ -147,6 +147,9 @@ $command = $Config{'perlpath'}; } + use Data::Dumper; + print Data::Dumper::Dumper($command, @args); + # Pass debug flags to scanner if ( $main::debug ) { push @scanArgs, '--debug', $main::debug;
Thanks, Michael. I found the problem. I wasn't aware that you can't just move Perl from one installation directory to another. There are a number of paths specified in \lib\Config-heavy.pl that need to point to the correct installation directory. $Config{'perlpath'} doesn't necessarily contain the path of the Perl executable that is running SC. Instead, it's just a configuration string. In this case it contained C:\Perl\bin\perl.exe, which on my system is the 5.8 Perl executable. I believe this was because I originally installed 5.10 to that directory before finding that SC didn't run under 5.10.
> Thanks, Michael. I found the problem. I wasn't aware that you can't > just move Perl from one installation directory to another. Great! Thanks for the feedback.