This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Access legacy autoload from 5.0 webroot

Access legacy autoload from 5.0 webroot

Access legacy autoload from 5.0 webroot

Thursday 18 April 2013 12:12:25 pm - 1 reply

Hi Guys,

I have a quick question about the best way to access the legacy autoload from a file in the webroot...

I have a custom rss feed generator in my current 4.6 installation, which is accessed directly from the webroot with a mod_rewrite rule. It calls the old autoload file.

 require 'autoload.php';

This no longer works with the file being inside the new "web" directory.

I found this does work:

$legacyRoot = '<path_to_installation>/ezpublish_legacy';
chdir( $legacyRoot );
require $legacyRoot . '/autoload.php';


Not quite as elegant... but is this the best way to access the autoload?

Also, is this the right thread for this question, or should I keep these things to the Developer area?


Thursday 18 April 2013 12:50:41 pm

That is the similar approach to what we are doing in index_rest.php (REST v1) and index_cluster.php wrappers. Difference is we keep the original script in legacy folder, chdir to that dir and then includes it.



$legacyRoot = '/home/ezpublish/www/ezpublish/../ezpublish_legacy';
chdir( $legacyRoot );
require $legacyRoot . '/index_rest.php';

(I think I used the --symlink --relative options when running php ezpublish/console ezpublish:legacy:assets_install )

Modified on Thursday 18 April 2013 12:57:16 pm by André R


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from