[horde] trean: 404 when deleting or saving after edit

Andy Dorman adorman at ironicdesign.com
Tue Dec 16 18:24:46 UTC 2014


On 12/16/2014 07:22 AM, Andy Dorman wrote:
> On 12/16/2014 02:20 AM, Jan Niggemann wrote:
>> $filename = '/some/sensible/path/debug.txt';
>> Horde::debug($request, $filename);
>
> Well, this is weird.  I edited rampage.php as you suggested
>
> $request = $injector->getInstance('Horde_Controller_Request');
> $filename = '/var/log/horde/rampage_debug.txt';
> Horde::debug($request, $filename);
>
> But nothing is written to the file when I edit and save or try deleting
> a trean link.  I even touched the debug file and made sure permissions
> were correct (Apache runs as user "antespam")
>
> # ls -al /var/log/horde/
> drwxr-xr-x  2 antespam antespam 4096 Dec 16 07:03 .
> drwxr-xr-x 16 root     root     4096 Dec 15 06:25 ..
> -rw-rw-rw-  1 antespam antespam    0 Dec 16 06:52 rampage_debug.txt
>
> My conclusion is that I am not even running rampage.php.  Do you agree?
>
> I tried adding/editing/deleting address book (turba) and calendar
> (kronolith) and task (nag) entries with no problems and nothing was ever
> written to the debug log file...So I assume none of those apps need
> rampage.php.
>
> We use webmail (imp) every day and send/receive email with no problem.
>
> Is there another app in Horde Webmail that uses rampage.php that I can
> try to confirm whether or not the appropriate calls are getting to
> rampage.php ?
>

Also, this is the Apache 2.4 log entry for the 404 not found.
==========================
mail.fanmail.com 50.130.11.148 - - [16/Dec/2014:06:55:22 -0600] "POST 
/trean/b/save HTTP/1.1" 404 16 
"http://beta.mail.comehome.net/trean/edit.php?bookmark=144" "Mozilla/5.0 
(X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/39.0.2171.71 Safari/537.36"

This is from the browser Firebug
==========================
Request URL:http://beta.mail.comehome.net/trean/b/save
Request Method:POST
Status Code:404 Not Found

Also, my trean/config/routes.php is unchanged from the distro and 
identical to what was listed earlier in this thread.
==========================
<?php
/**
  * Setup default routes
  */
$mapper->connect('/b/save',
     array(
         'controller' => 'SaveBookmark',
     ));

$mapper->connect('/b/delete',
     array(
         'controller' => 'DeleteBookmark',
     ));

$mapper->connect('/tag/:tag',
     array(
         'controller' => 'BrowseByTag',
     ));

And finally, just for kicks I turned on Horde debug logging and nothing 
was logged when I clicked the edit/delete button and got the 404 error.

So I am pretty sure this is an Apache 2.4/php-fpm (php 5.6) config issue 
(configs below) and the request is never even making it to rampage.php.

=== /etc/apache2/conf-available/php-horde.conf ===
Alias /horde /usr/share/horde

<Directory /usr/share/horde>
   Options Indexes FollowSymLinks
   AllowOverride All
   Require all granted
   <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteBase /horde
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^(.*)$ index.php/$1 [QSA,L]
   </IfModule>
</Directory>

<Directory /usr/share/horde/config>
      Deny from all
</Directory>

<Directory /usr/share/horde/scripts>
      Deny from all
</Directory>

<Directory /usr/share/horde/locale>
      Deny from all
</Directory>

<Directory /usr/share/horde/lib>
      Deny from all
</Directory>

<Directory /usr/share/horde/templates>
      Deny from all
</Directory>

=== /etc/apache2/sites-available/z.anydomain.anymail.com.conf ===
<VirtualHost *:80>
   ServerName mail.fanmail.com
   ServerAlias *mail.*.*
   ServerAlias *mail.*.*.*
   ServerAlias beta.*mail.*.*
   DirectoryIndex index.php
   DocumentRoot /usr/share/horde/
   SuexecUserGroup antespam antespam
   IPCCommTimeout 120
   Redirect permanent /.well-known/caldav /rpc.php
   ProxyPassMatch ^/(.*\.php(/.*)?)$ 
fcgi://127.0.0.1:9000/usr/share/horde/$1
</VirtualHost>



So are there other operations that use rampage.php that I could test?

Thanks for any ideas or guidance or a working php-fpm example config.

-- 
Andy Dorman



More information about the horde mailing list