Search Results

Search found 7 results on 1 pages for 'grumpycanuck'.

Page 1/1 | 1 

  • Changing location of ClamAV logging files

    - by GrumpyCanuck
    I've run into a weird problem with ClamAV that I have been unable to resolve, due to a incredibly non-informative error message. I've installed ClamAV via aptitude on an Ubuntu box (ClamAV 0.96.5/13202 according to the system) up on EC2 and it is 100% stock. We have an additional drive mounted under /mnt where we put all our log files. When I start it up with the log files in the default location, it runs just fine. However, if I change the configuration file from /var/log/clamav/clamav.log to /mnt/clamav/clamav.log I get the error ERROR: Can't open /mnt/clamav/clamav.log in append mode (check permissions!). ERROR: Can't initialize the internal logger It's the same file with the same permissions on it, just in a different location. Any thoughts or tips on how to resolve this problem would be greatly appreciated.

    Read the article

  • Converting JSON into Python dict

    - by GrumpyCanuck
    I've been searching around trying to find an answer to this question, and I can't seem to track it down. Maybe it's too late in the evening to figure the answer out, so I turn to the excellent readers here. I have the following bit of JSON data that I am pulling out of a CouchDB record: "{\"description\":\"fdsafsa\",\"order\":\"1\",\"place\":\"22 Plainsman Rd, Mississauga, ON, Canada\",\"lat\":43.5969175,\"lng\":-79.7248744,\"locationDate\":\"03/24/2010\"},{\"description\":\"sadfdsa\",\"order\":\"2\",\"place\":\"50 Dawnridge Trail, Brampton, ON, Canada\",\"lat\":43.7304774,\"lng\":-79.8055435,\"locationDate\":\"03/26/2010\"}," This data is stored inside a Python dict under the key 'locations' in a dict called 'my_plan'. I want to covert this data from CouchDB into a Python dict so I can do the following in a Django template: {% for location in my_plan.locations %} <tr> <td>{{ location.place }}</td> <td>{{ location.locationDate }}</td> </tr> {% endfor %} I've found lots of info on converting dicts to JSON, but nothing on going back the other way Thanks in advance for the help!

    Read the article

  • django-registration with paypal integration

    - by GrumpyCanuck
    I'm trying to figure out how to integrate django-registration with django-paypal. Being a Django n00b, I'm trying to figure out how to implement a flow like this: User signs up using django-registation with 'active' flag set to 0 After registering, send user to PayPal for a subscription When they come back from PayPal successfully, I want to set 'active' to 1 I've been looking at the django-registration documentation and don't quite understand how to use different backends or implement a flow the way I want. Any tips on how to accomplish this would be greatly appreciated. django-paypal won't be a problem for me as I've done PayPal integration before (in PHP for a self-published book about CakePHP).

    Read the article

  • Compiling Gearman extension for PHP on OS-X Snow Leopard with Zend Server Community Edition

    - by GrumpyCanuck
    I was wondering if anyone else has figured out how to solve this problem. Whether I install the extension via PECL or compile it by hand, I get the same error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/gearman.so' - dlopen(/usr/local/zend/lib/php_extensions/gearman.so, 9): no suitable image found. Did find: /usr/local/zend/lib/php_extensions/gearman.so: mach-o, but wrong architecture in Unknown on line 0 I have no idea how to fix this problem and I can only bang my head into my desk so many times.

    Read the article

  • Zend_Form validation problem

    - by GrumpyCanuck
    I am having problems getting validation to work for a form built using Zend_Form. The idea is this: I have two dropdown. One is a list of players. The other is a list of free agents who play the same position as the player. I am using an onChange javascript callback to run some Ajax code that replaces the free agent list dropdown with a new one at the position of the player they've selected from the player dropdown. Now, perhaps this is the wrong way, but I built the form by creating an instance of Zend_Form and then creating all these setX methods that add elements to the form. My reasoning was that I wanted to display certain elements in specific places on the page, not just output $this-form on my template. The problem appears to be when I get the form post back, the validator seems to not know about the validation rule I set up for the free agent drop down. Here's some relevant code to look at. I'm a relative ZF n00b so feel free to tell me I am not doing things the ZF way if it leaps out at you. The action in the controller: public function indexAction() { if ($this->getRequest()->isPost()) { $form = new Baseball_Form_Transactions(); if ($form->isValid($this->_request->getPost())) { $data = $this->_request->getPost(); $leagueInfo = Doctrine::getTable('League')->findOneByShortName($data['shortLeagueName'])->toArray(); // Create the request top drop an existing player $transactionInfo = array( 'league_id' => $leagueInfo['id'], 'team_id' => $data['teamId'], 'player_id' => $data['players'], 'type' => 'drop', 'target_team_id' => 0, 'transaction_date' => date('Y-m-d H:m:s') ); $transaction = new Transaction(); $transaction->fromArray($transactionInfo); $transaction->save(); // Now we do the request to add a player $transactionInfo['team_id'] = 0; $transactionInfo['player_id'] = $data['freeAgents']; $transactionInfo['target_team_id'] = $data['teamId']; $transactionInfo['type'] = 'add'; $transaction = new Transaction(); $transaction->fromArray($transactionInfo); $transaction->save(); $this->_flashMessenger->addMessage('Added transaction'); } } $options = array( 'teamId' => $this->teamId, 'position' => 'C', 'leagueShortName' => $this->league ); $this->transactionForm->setMyPlayers($options); $this->transactionForm->setFreeAgents($options); $this->transactionForm->setTeamId($options); $this->transactionForm->setShortLeagueName($options); $this->view->transactionForm = $this->transactionForm; $this->view->messages = $this->_flashMessenger->getMessages(); $transaction = new Transaction(); $this->view->transactions = $transaction->byTeam($options); } Next we have the form itself public function setMyPlayers($options) { $data = Doctrine::getTable('Team')->find($options['teamId']); $players = array(); foreach ($data->Players->toArray() as $player) { $players[$player['id']] = "{$player['position']} - {$player['first_name']} {$player['last_name']}"; } $playersSelect = new Zend_Form_Element_Select( 'players', array( 'required' => true, 'label' => 'Players', 'multiOptions' => $players, ) ); $this->addElement($playersSelect); } public function setFreeAgents($options) { $q = Doctrine_Query::create() ->select('CONCAT(p.first_name, " ", p.last_name) as full_name, p.id, p.position') ->from('Player p') ->leftJoin('p.Teams t') ->leftJoin('t.League l ON l.short_name = ?', $options['leagueShortName']) ->where('t.id IS NULL') ->andWhere('p.position = ?', $options['position']) ->orderBy('p.last_name'); $q->setHydrationMode(Doctrine_Core::HYDRATE_ARRAY); $data = $q->execute(); $freeAgents = array(); foreach ($data as $player) { $freeAgents[$player['id']] = $player['full_name']; } $freeAgentsSelect = new Zend_Form_Element_Select( 'freeAgents', array( 'label' => 'Free Agents', 'multiOptions' => $freeAgents, 'size' => 15 ) ); $freeAgentsSelect->setRequired(true); $this->addElement($freeAgentsSelect); } public function setShortLeagueName($options) { $shortLeagueNameHidden = new Zend_Form_Element_Hidden( 'shortLeagueName', array('value' => $options['leagueShortName']) ); $this->addElement($shortLeagueNameHidden); } public function setTeamId($options) { $teamIdHidden = new Zend_Form_Element_Hidden( 'teamId', array('value' => $options['teamId']) ); $this->addElement($teamIdHidden); } There is no init or __construct() method in the form. My problem seems simple enough: reject the form contents as invalid if they have not selected someone from the free agent list. Right now, it sails through as valid. I've spent some considerable time searching online for an answer, and haven't been able to find it. Thanks in advance for any help.

    Read the article

  • PHPUnit reporting "Aborted" no matter what tests are run

    - by GrumpyCanuck
    Having a weird problem with PHPUnit. We're using PHPUnit as part of a continuous integration environment, that contains one app written using Zend Framework and one app written using CodeIgniter. Unit tests run just fine under Zend Framework, but whenever I run the tests for CodeIgniter using fooStack's CIUnit bridge, I always get the same problem at the end: PHPUnit 3.4.14 by Sebastian Bergmann. ............... . Time: 1 second, Memory: 7.00Mb OK (16 tests, 14 assertions) Aborted First off, I do not know what those empty spaces between the . means. Secondly, no matter what test I run (all of them or each one separately) I get the same Aborted message at the very end. The tests themselves do not contain any exit or die statements. When I run the same version of PHPUnit on my laptop (running OS-X Snow Leopard and same version of Zend Server Community Edition) I do not get that aborted message. Running PHP 5.3.2 on Ubuntu installed using Zend Server Community Edition. Any help with this would be greatly appreciated.

    Read the article

  • Sending Subversion Change Log Info Via Hudson

    - by GrumpyCanuck
    I'm trying to integrate Hudson into our development process, and everything is going smooth except for one thing. I had been using Phing to do deployments, and one of the things that was being triggered was an email to our tech support email address containing a list of all the commit messages between the last time code was deployed and the present SVN revision. I was doing something like this: read in a file from the root directory of the currently-deployed application that contains the SVN revision when the app was deployed place that value in a Phing variable insert that value into a command to send the SVN commit messages via email create a file in the root directory of the newly-deployed application that contains the current SVN revision I'd like to be able to add that information to the email that gets sent out by Hudson when a successful build goes out. Any pointers on how to accomplish this task in Hudson would be greatly appreciated.

    Read the article

1