Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

PHP include_path library

Go to End

3 Posts   1527 Views


Community Member, 50 Posts

26 September 2010 at 12:36am

Hi is it possible to set the include_path to include one library for multiple silverstripe websites. I'm using Apache on a Debain server.

Thanks Ben


Community Member, 473 Posts

26 September 2010 at 1:01am

If you're talking about multiple silverstripe instances using the same sapphire/cms folders, I managed this using symlinks and either creating a silverstripe-cache folder in each site, or using _ss_environment.php to define a unique TEMP_FOLDER path for each site.

If you're after just generic libraries, you can just set the include path in your _config.php, using something like:

set_include_path(get_include_path() . PATH_SEPARATOR .'/path/to/thirdparty/library');


Community Member, 50 Posts

26 September 2010 at 10:42pm

Thanks for that. I have set the include path in PHP then put the RewriteRule sapphire folder in the includes ok but I am getting the 404 error from the .htaccess file. Do I need to update this?

Not Found

The requested URL /web2works/sapphire/main.php was not found on this server.