Jump to:

23479 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » PHP include_path library

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

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

Page: 1
Go to End
Author Topic: 1114 Views
  • web2works
    Avatar
    Community Member
    50 Posts

    PHP include_path library Link to this post

    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

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: PHP include_path library Link to this post

    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');

  • web2works
    Avatar
    Community Member
    50 Posts

    Re: PHP include_path library Link to this post

    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.

    1114 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.