Category Archives: php

ActiveCollab Windows Server 2003 IIS6

We are trying out ActiveCollab @ Karova instead of Basecamp. There was quite a few problems to get it working though. Mainly as it was PHP on IIS methinks. The first error was that none of the class files were not being loaded by autoloader as it didn’t know where to look so I had to tell it ->

[code lang=”php”]
private $parse_directories = array(‘%ABSOLUTEPATHTOWEBSITEDIRECTORY%’);
[/code]

in environment\classes\AutoLoader.class.php Line 36

The second error was that emails were not being sent. I reckon this was either our SMTP or PHP on windows not liking the format of the email addresses (“Philip Roche”<phil @philroche.net>)
[code lang=”php”]
function toString() {
if(trim($this->getName()) == ”) {
return trim($this->getEmail());
} else {
//return trim($this->getName()) . ‘ < ' . trim($this->getEmail()) . ‘>’;
return trim($this->getEmail());
} // if
} // toString
[/code]

in environment\library\simplemail\MailAddress.class.php Line 49

and finally, I could not upload public files as the isPrivate method was returning blank instead of 0.
[code lang=”php”]
static function setIsPrivateForObject(ProjectDataObject $object) {
$isPrivateVar = $object->isPrivate();
if($isPrivateVar!=1)
{
$isPrivateVar = 0;
}
return DB::execute(‘UPDATE ‘ . ApplicationLogs::instance()->getTableName(true) .
‘ SET `is_private` = ? WHERE `object_id` = ? AND `object_manager_class` = ?’,
$isPrivateVar, $object->getObjectId(), get_class($object->manager())
); // execute
} // setIsPrivateForObject
[/code]

in application\models\application_logs\ApplicationLogs.class.php line 61

It’s all sorted now and running and actually I am finding it alot nicer than basecamp and as it’s on our own server – a hell of a lot quicker.