MEM wrote:
> 
> I see, since I don't have access to php.ini on my shared host env, I can
> do
> an include on index.php that stays on my public folder, for example.
> 

Yes, you can add things to your include paths in index.php. I think it was
somewhere on the quickstart 
guide, but anyway here's a snippet to do just that:

        $libraryPath = GENERAL_PATH . '/library';
        $includePath = get_include_path();
        $includePath .= PATH_SEPARATOR . $libraryPath;
        set_include_path($includePath);


MEM wrote:
> 
> Let me go in more detail. At this moment, each project on my shared host
> as
> its own subdomain configured so that, when I need to deploy things to the
> final host, I just grab all subdomain info and put it on the "costumer
> shared host", and I change the URL on my config_root file. Simple.
> 
> In order to have the library folder shared for several projects, I will
> probably need to create a subdomain just to old my zend library files. (so
> that the library folder could stay on the same level as the other project
> folders). Once this is done, and assuming (I have no clue) that we can
> easily access files from a subdomain into another, I will need to
> replicate
> this same structure on the "costumer shared host", and change the
> config_root file. 
> 
> If the "costumer shared host" don't have the possibility to have
> subdomains,
> I will not be able to deploy it without some more changes.
> 
> The main reason I wanted to have the library outside, was to update the
> library for all the zendframework sites at once but, if something goes
> wrong, all goes wrong at once as well. :s 
> 
> I do believe that, if we deploy the library for each project, and we
> relate
> each library connected to a repository where we can make synchronize, we
> can
> have more control about what project needs to use the last resources and
> the
> others that don't need for a long time. If, for some reason, one project
> needs to have a updated library folder later on, I can just download from
> the repository the info back to the development environment.
> 
> 
> I know that each case is a case, and we should organize the way it best
> fit
> us, I just want to know if, regarding this scenario, there are any better
> ways for doing it.
> 
> 
> Thanks again,
> Márcio
> 

Ok, as i see you are running in a sared hosting environment. Although it
absolutely ok, but may be 
limiting in some ways to your virual host home directory. So you may one day
consider a 
dedicated server or a vds to have more control over what goes where and what
is shared between 
virtual hosts.

But for now since you are on shared hosting the best way would be to upload
your library along with your
project. I believe you can share library between several subdomains of one
virtual host with some 
tweaking.

Regarding updates you may use versioning to your library directory not to
break several projects at once 
while updating a shared code base. And then just include the required
library version, or do a rollback if 
something went wrong. 

Regarding the deloyment of your code there are again a lot things to
consider. You can automate your 
deployment by polling source repository for updates like you said, or use a
continuous integration server 
to push updates to your projects. 

Dmitry.

-- 
View this message in context: 
http://n4.nabble.com/several-projects-library-outside-newbie-tp1694549p1744933.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to