Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:03:36+00:00 2026-06-14T11:03:36+00:00

I was using Zend’s autoloader before meeting with Composer. I have got a library

  • 0

I was using Zend’s autoloader before meeting with Composer.

I have got a library (let’s call it LibEx) which is in PHP’s global include path (c:\xampp\php\pear). It must be in a global include folder because a lot of project uses it. So, if I change a function in LibEx every project can access the latest version.

And if I want to push my code to server, I simply copy my LibEx folder to library folder which is autoloadable by Zend. Before Composer I was using this method:

set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/library'),
    realpath(APPLICATION_PATH . '/library/Zend'),
    get_include_path(),
)));

include "Zend/Loader/Autoloader.php";
Zend_Loader_Autoloader::getInstance()->registerNamespace('LibEx');

Now I’m in love with Composer. It’s really fantastic and I can autoload my project specific library with it too:

"autoload": {
    "psr-0": {"MyLib": "src/"}
}

But how can I autoload LibEx folder which is not in the DocumentRoot or WebRoot? And how to still autoload even if it’s in server and copied under src folder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:03:37+00:00Added an answer on June 14, 2026 at 11:03 am

    Did you try this?

    "autoload": {
        "psr-0": {"MyLib": "c:\somewhere\project\src"}
    }
    

    On Linux soft linking folders would be a possible solution, I don’t know if Windows do support it this days or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Zend debugger and PDT for PHP development and have run into an
Hi all I am using Zend framework for my PHP project. Basically I have
I'm currently using Zend Framework 2 beta for on PHP 5.4.4 to develop a
I'm using Zend_Search_Lucene, the PHP port of Java Lucene. I currently have some code
hi i am using zend form , i created a Zend_Form_Element_Radio element that have
I'm using Zend Studio 6.1 for Eclipse, which comes bundled with the Subversive plug-in.
I'm using the default Zend_Application design pattern which loads a zend config ini file
I am using Zend Dom component to parse some Html blocks, but i have
I am using Zend Framework for fetching GMail messages. I have been able to
I'm using a traditional Zend framework application generated using Zend tool . I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.