Problem with the 1.4 archive scripts

I upgraded my piwik server to 1.4 yesterday. After the upgrade the powershell cron script stopped working.

first I got a security warning :


File D:\piwik\misc\cron\archive.windows.ps1 cannot be loaded. The file D:\piwik
\misc\cron\archive.windows.ps1 is not digitally signed. The script will not exe
cute on the system. Please see "get-help about_signing" for more details..
At line:1 char:22
+ .\archive.windows.ps1 <<<<
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

I cleared that up and got this :


Fatal error: Undefined class constant 'MYSQL_ATTR_LOCAL_INFILE' in D:\piwik\core\Db\Adapter\Pdo\Mysql.php on line 22

on a whim I tried the ran the older 1.3 cron job from a copy of the code tree I made before the install… that one ran fine…

so whats going on here??

Try this patch to core/Db/Adapter/Pdo/Mysql.php:


Index: Mysql.php
===================================================================
--- Mysql.php	(revision 4678)
+++ Mysql.php	(working copy)
@@ -18,8 +18,11 @@
 {
 	public function __construct($config)
 	{
-		// Enable LOAD DATA INFILE
-		$config['driver_options'][PDO::MYSQL_ATTR_LOCAL_INFILE] = true; 
+		if(defined('PDO::MYSQL_ATTR_LOCAL_INFILE'))
+		{
+			// Enable LOAD DATA INFILE
+			$config['driver_options'][PDO::MYSQL_ATTR_LOCAL_INFILE] = true; 
+		}
 		parent::__construct($config);
 	}
 

thanks for the quick answer… I am getting a new error : Zend_Session is currently marked as read-only.

I do not get the same error when running the 1.3 archive scripts…

thanks

sounds like a Windows ACL issue

ok… so I can not find any folder issues… is there anything I can put in the config files to get additional debugging info??

anything…

Can you make sure your command-line php binary is the cli version? (May have to check your PATH.)

php5.exe -v
php.exe -v

PHP 5.3.3 (cli) (built: Jul 21 2010 20:36:55)
Copyright © 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2010 Zend Technologies

If Piwik detects that it’s running from php-cli, it doesn’t even start the session, so it’s unclear why/what it’s trying to write to the session file.

like I said the older version runs fine… just the new one has issues…