Problem With Solr Extension

Question regarding installation of this extension:

http://www.yiiframework.com/extension/yii-solr

In short the unit tests don’t pass, I’m wondering if it is not compatible with latest Yii or if I am doing something wrong? I’m trying Yii 1.1.13, I’ve installed Solr for apache under ubuntu, and also installed sqlite for good measure since one of the tests require this, but funny enough it made no difference installed or not.

Here is my common.php


Yii::import("packages.solr.*");

defined("SOLR_HOSTNAME") or define("SOLR_HOSTNAME","localhost");

defined("SOLR_PORT") or define("SOLR_PORT",8080);

defined("SOLR_PATH") or define("SOLR_PATH",'/solr/');


phpunit.sh --verbose ../packages/solr/tests

PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0

PHPUnit 3.6.10 by Sebastian Bergmann.


Configuration read from /WebRoot/protected/tests/phpunit.xml


..................E...EEEEE


Time: 7 seconds, Memory: 12.50Mb


There were 6 errors:


1) ASolrDocumentTest::testFindByAttributes

SolrClientException: Unsuccessful query request : Response Code 0. (null)


/WebRoot/protected/packages/solr/ASolrConnection.php:192

/WebRoot/protected/packages/solr/ASolrConnection.php:0

/WebRoot/protected/packages/solr/ASolrConnection.php:163

/WebRoot/protected/packages/solr/ASolrDocument.php:828

/WebRoot/protected/packages/solr/ASolrDocument.php:789

/WebRoot/protected/packages/solr/tests/ASolrDocumentTest.php:186


2) ASolrSearchableTest::testBasics

CDbException: CDbConnection failed to open the DB connection.


/yii/framework/db/CDbConnection.php:387

/yii/framework/db/CDbConnection.php:330

/yii/framework/db/CDbConnection.php:469

/yii/framework/db/schema/sqlite/CSqliteSchema.php:128

/yii/framework/db/schema/sqlite/CSqliteSchema.php:111

/yii/framework/db/schema/CDbSchema.php:103

/yii/framework/db/ar/CActiveRecord.php:2309

/yii/framework/db/ar/CActiveRecord.php:387

/yii/framework/db/ar/CActiveRecord.php:402

/yii/framework/db/ar/CActiveRecord.php:77

/WebRoot/protected/packages/solr/tests/ASolrSearchableTest.php:120


3) ASolrSearchableTest::testGetIsModified

Trying to get property of non-object


/yii/framework/db/ar/CActiveRecord.php:77

/WebRoot/protected/packages/solr/tests/ASolrSearchableTest.php:120


4) ASolrSearchableTest::testFind

Trying to get property of non-object


/yii/framework/db/ar/CActiveRecord.php:77

/WebRoot/protected/packages/solr/tests/ASolrSearchableTest.php:120


5) ASolrSearchableTest::testDelete

Trying to get property of non-object


/yii/framework/db/ar/CActiveRecord.php:77

/WebRoot/protected/packages/solr/tests/ASolrSearchableTest.php:120


6) ASolrSearchableTest::testPopulateFromSolr

Trying to get property of non-object


/yii/framework/db/ar/CActiveRecord.php:77

/WebRoot/protected/packages/solr/tests/ASolrSearchableTest.php:120


FAILURES!

Tests: 27, Assertions: 2184, Errors: 6.

The extension is outdated and won’t work with recent versions of Solr