Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have just moved from Linux to Windows, and I have to use the Zend Framework library. Where should the library be placed?

  • Directly on C drive
  • Create a lib folder like C:/lib/
  • Create a lib folder in my user folder

I am wondering if there is a classic folder where these kind of libraries are placed.

Update:I am asking about the location on my own standpoint. The Zend Framework library is a PHP framework.

share|improve this question
    
Please provide more information. –  Ramhound Jun 25 '12 at 14:09
    
What Zend library? –  Yannis Rizos Jun 25 '12 at 14:15
    
Do you mean from your own standpoint of from your final users standpoints ? –  Emilio Garavaglia Jun 25 '12 at 14:24
    
Thank you, I have updated the question with more details. –  Gabriel Diaconescu Jun 26 '12 at 7:30

3 Answers 3

up vote 10 down vote accepted

Generally speaking, your app should live in either:
1) C:\Program Files\your_app_name
2) C:\Program Files (x86)\your_app_name

For 32 bit OSs such as XP, use #1. For 64 bit OSs use #1 if your app is 64 bit. Use #2 if your app is 32 bit.

Also take a look at MS's Developer Guidelines

share|improve this answer
5  
Please note that the actual names of those folders depends on the localization of the OS: "Program Files" exist only on english-localized installations. You should rely on environment variables or to registry keys to get the actual folder names. In any case don't place things directly in those folders, ut create appropriate sub-folders. –  Emilio Garavaglia Jun 25 '12 at 14:43
4  
@EmilioGaravaglia "Program Files" does exist in non english-localized installations, but you just see another name in Explorer. But I agree, use the evironment variable %programfiles%. –  ComFreek Jun 25 '12 at 14:56
3  
@ComFreek: Not sure: may be it is remapped at the file-stystem level, not as a shell-extension. But it may be even not on C:\ ... so ... never trust, but refer to %programfiles%. Also, user dependent configuration data, should go to %appdata% Anyways, thanks for the clarification. –  Emilio Garavaglia Jun 25 '12 at 15:01
3  
@ComFreek: that is only true since Windows Vista. In an Win XP environment, the folder names were localized. –  Doc Brown Jun 25 '12 at 15:31
    
I don't think that's such a good idea. Access to files in those directories requires elevation to administrator. –  vascowhite Nov 6 '12 at 8:21

I would generally make any application specific dependencies travel with the source code rather than install libraries in a specific location. This means you don't have to hunt down the specific version of said library 18 months from now when you are applying an emergency patch at the very least. It can open the door to continuos delivery and deployment.

Major dependencies -- such as PHP or Java or what have you -- should be installed in a typical manner for the platform. For PHP in windows this typically means the Web Platform Installer.

share|improve this answer

Depending on the use of the machine then i would give the following advice:-

  1. For server machines if you are using the windows machine as a server machine then i would advice you to save the zend library files in a locations you can easy access. like C://zendLibs. Then include the zendLibs path to the include path of your php.ini. advantage is any application that will be deployed to the server will by default use the libraries eliminating the need for copying the libraries in every project.
  2. for development machines if you are using the zend library files on a developers machine, i would suggest copying the files in the application. this is to avoid the "its working on my machine" clause when the application is deployed. this will definitely make the application bulky and many of its libraries will not be used. the other thing about coping the code on the developer machine is thhe support for auto completion with some IDE, only used netbeans though, and it works perfectly(auto complete).

either way you can copy your library any place on the machine as long as its accessible to the application.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.