[horde] autoload.php

Ralf Lang ralf.lang at ralf-lang.de
Sat Jun 14 07:05:08 UTC 2025


Hi Simon,

The canonical way for all incoming traffic from the web should be like this:

- Hit an endpoint proxy file in the web/$app directory.
- Setup the composer autoloader
- require_once to the actual file in vendor/$app
- Very early in almost every endpoint it will require the 
Application.php of your app (except when it's rampage.php)
- The Application will try to load vendor/horde/base/lib/core.php which 
sets up the Horde Autoloader and some other stuff.

Something seems wrong in your install if you have two levels of vendor/

/usr/share/2024-composer-horde6/vendor/autoload.php
This one is good and expected.

/usr/share/2024-composer-horde6/vendor/horde/css_parser/bundle/vendor/autoload.php
This one is due to horde/css_parser bundling a version of sabberworm css parser inside. An old one by the way. We should probably unbundle this. For now best keep it as-is.

root at mail:~$ ls /usr/share/2024-composer-horde6/vendor/vendor/autoload.php
This is an error. It should not be there.

Can you
- send me composer.json and composer.lock from your install?
- look at various PHP files in your web/$app dir. They should only contain very few lines each and look very similar.

If you do a full backup of your horde dir you are on the safe side:

- var/config/
- composer.json
- composer.lock
- vendor/
- web/


Am 13.06.2025 um 16:49 schrieb Simon B:

> Hi Ralf,
>
> I was debuggging something else and I ran across these log lines in the
> apache error_log.
>
> [Thu Jun 12 12:41:32.582396 2025] [php:warn] [pid 502630:tid 502630]
> [client 80.187.120.191:26331] PHP Warning:
>   require_once(/usr/share/2024-composer-horde6/vendor/vendor/autoload.php):
> Failed to open stream: No such file or directory in
> /usr/share/2024-composer-horde6/vendor/horde/horde/rampage.php on line 2
> [Thu Jun 12 12:41:32.582542 2025] [php:error] [pid 502630:tid 502630]
> [client 80.187.120.191:26331] PHP Fatal error:  Uncaught Error: Failed
> opening required
> '/usr/share/2024-composer-horde6/vendor/vendor/autoload.php'
> (include_path='.:/usr/share/php') in
> /usr/share/2024-composer-horde6/vendor/horde/horde/rampage.php:2\nStack
> trace:\n#0 {main}\n  thrown in
> /usr/share/2024-composer-horde6/vendor/horde/horde/rampage.php on line 2
>
> I checked for the file, and whilst there is an autoload.php - 2 actually -
> neither is where Apache is looking for it.
>
> root at mail:~$ find /usr/share/2024-composer-horde6/ -type f -name
> autoload.php
> /usr/share/2024-composer-horde6/vendor/autoload.php
> /usr/share/2024-composer-horde6/vendor/horde/css_parser/bundle/vendor/autoload.php
> root at mail:~$ ls /usr/share/2024-composer-horde6/vendor/vendor/autoload.php
> ls: cannot access
> '/usr/share/2024-composer-horde6/vendor/vendor/autoload.php': No such file
> or directory
>
> Is it safe to move (copy one of them to the correct location?  And which
> one, since they are not identical.
>
> I am currently petrified to do a composer upgrade since I do not really
> have the skills to roll-back like the others had to do last week.
>
> Have a nice weekend.
>
> Simon



More information about the horde mailing list