Horde5 Debian 8/Ispconfig 3.1 error

Discussion in 'HOWTO-Related Questions' started by felan, Dec 15, 2016.

  1. felan

    felan Member HowtoForge Supporter

    Hi.
    I've used the howto install horde5 on Debian Jessie and ISPConfig3 and have encountered a problem. When I click on the edit symbol on an addressbook, I get a message from my browser that "Safari can't open the page "https://designrus.dk/horde/turba/addressbook/edit.php?...." It does not happen with the calendar or other modules. I can add adresses and all through activesync.

    Any ideas?
     
  2. sjau

    sjau Local Meanie Moderator

    Which howto? Does it work in another browser?
     
  3. felan

    felan Member HowtoForge Supporter

  4. sjau

    sjau Local Meanie Moderator

    what's in your /var/www/horde/.htaccess ?
     
  5. felan

    felan Member HowtoForge Supporter

    This is .htaccess:
    Code:
    # IMPORTANT: DO NOT EDIT THIS FILE!
    # It will be overwritten with any future upgrade.
    
    <IfModule authz_core_module>
        Require all granted
    </IfModule>
    <IfModule !authz_core_module>
        Allow from all
    </IfModule>
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /horde
        RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        RewriteCond   %{REQUEST_FILENAME}  !-d
        RewriteCond   %{REQUEST_FILENAME}  !-f
        RewriteRule ^(.*)$ rampage.php [QSA,L]
    </IfModule>
     
  6. sjau

    sjau Local Meanie Moderator

    I have no idea where you get the edit.php for.... try:

    ..../horde/turba/browse.php
     
  7. sjau

    sjau Local Meanie Moderator

    ah... I found out where the edit is from.... but for me it's:


    horde/turba/addressbooks/edit.php

    adressbooks... not addressbook
     
  8. felan

    felan Member HowtoForge Supporter

    PHP:
    <?php
    /**
    * Turba browse.php.
    *
    * Copyright 2000-2016 Horde LLC (http://www.horde.org/)
    *
    * See the enclosed file LICENSE for license information (ASL).  If you did
    * did not receive this file, see http://www.horde.org/licenses/apache.
    *
    * @author  Chuck Hagenbuch <chuck@horde.org>
    * @package Turba
    */

    require_once __DIR__ '/lib/Application.php';
    Horde_Registry::appInit('turba');

    /* If default source is not browsable, try one from the addressbooks pref */
    if (empty($cfgSources[Turba::$source]['browse'])) {
        
    $addressbooks Turba::getAddressBooks();
        foreach (
    $addressbooks as $source) {
            if (!empty(
    $cfgSources[$source]['browse'])) {
                
    Turba::$source $source;
                break;
            }
        }
    }

    $params = array(
        
    'addSources' => $addSources,
        
    'attributes' => $attributes,
        
    'browse_source_count' => $browse_source_count,
        
    'browser' => $browser,
        
    'cfgSources' => $cfgSources,
        
    'copymoveSources' => $copymoveSources,
        
    'conf' => $conf,
        
    'factory' => $injector->getInstance('Turba_Factory_Driver'),
        
    'history' => $injector->getInstance('Horde_History'),
        
    'notification' => $notification,
        
    'page_output' => $page_output,
        
    'prefs' => $prefs,
        
    'registry' => $registry,
        
    'source' => Turba::$source,
        
    'turba_shares' => $injector->getInstance('Turba_Shares'),
        
    'vars' => Horde_Variables::getDefaultVariables(),
    );

    $browse = new Turba_View_Browse($params);
    $browse->run();
     
  9. felan

    felan Member HowtoForge Supporter

    edit.php
    PHP:
    <?php
    /**
    * Turba addressbooks - edit.
    *
    * Copyright 2001-2016 Horde LLC (http://www.horde.org/)
    *
    * See the enclosed file LICENSE for license information (ASL). If you
    * did not receive this file, see http://www.horde.org/licenses/apache.
    */

    require_once __DIR__ '/../lib/Application.php';
    Horde_Registry::appInit('turba');

    // Exit if this isn't an authenticated user, or if there's no source
    // configured for shares.
    if (!$GLOBALS['registry']->getAuth() || !$session->get('turba''has_share')) {
        
    Horde::url(''true)->redirect();
    }

    $vars Horde_Variables::getDefaultVariables();
    try {
        
    $addressbook $injector->getInstance('Turba_Shares')->getShare($vars->get('a'));
    } catch (
    Horde_Share_Exception $e) {
        
    $notification->push($e);
        
    Horde::url(''true)->redirect();
    }
    $owner $addressbook->get('owner') == $GLOBALS['registry']->getAuth() ||
        (
    is_null($addressbook->get('owner')) && $GLOBALS['registry']->isAdmin());
    if (!
    $owner &&
        !
    $addressbook->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
        
    $notification->push(_("You are not allowed to see this addressbook."), 'horde.error');
        
    Horde::url(''true)->redirect();
    }

    $form = new Turba_Form_EditAddressBook($vars$addressbook);

    // Execute if the form is valid.
    if ($owner && $form->validate($vars)) {
        
    $original_name $addressbook->get('name');
        try {
            
    $form->execute();
            if (
    $addressbook->get('name') != $original_name) {
                
    $notification->push(sprintf(_("The addressbook \"%s\" has been renamed to \"%s\"."), $original_name$addressbook->get('name')), 'horde.success');
            } else {
                
    $notification->push(sprintf(_("The addressbook \"%s\" has been saved."), $original_name), 'horde.success');
            }
            
    Horde::url(''true)->redirect();
        } catch (
    Turba_Exception $e) {
            
    $notification->push($e);
        }
    }

    $vars->set('name'$addressbook->get('name'));
    $vars->set('description'$addressbook->get('desc'));

    $page_output->header(array(
        
    'title' => $form->getTitle()
    ));
    $notification->notify(array('listeners' => 'status'));
    if (
    $owner) {
        echo 
    $form->renderActive($form->getRenderer(), $varsHorde::url('addressbooks/edit.php'), 'post');
    } else {
        echo 
    $form->renderInactive($form->getRenderer(), $vars);
    }
    $page_output->footer();
     
  10. felan

    felan Member HowtoForge Supporter

    Yeah same here. I mistyped.
     
  11. sjau

    sjau Local Meanie Moderator

    Then I have no idea.... maybe check in #horde on freenode
     
  12. felan

    felan Member HowtoForge Supporter

    Hmm.. I have NO idea what in the world I've done, but now it works O.O

    Well thanks for your help, even though we never found out why, sjau.

    Merry Christmas!
     
  13. sjau

    sjau Local Meanie Moderator

    good that it's working... strange that it wasn't before...
     

Share This Page