1

After I do:

zf -p create dbtable.from-database

I get:

Cannot redeclare class Zend_Loader in /home/user/public_html/proj.dev/library/Zend/Loader.php on line 31

If we change the application.ini file generated and we commented the following line:

;includePaths.library = APPLICATION_PATH "/../library"

This seemed to work, and since we already have this on your public/index.php file, it seems that this is ok to comment.

However, I do not understand what is the relation between the provided error, and the lucky solution.

Does anyone know why this happened ?

1
  • The same is to say. Go learn, and be a master. Go on profound study for 10 years, and keep always updated. Go to seminars, buy books, practice every day. At the end, you will have your answer. Well... I know that. Still, stackoverflow exists. :) Commented May 2, 2011 at 0:07

2 Answers 2

1

Usually this error occurs when include_path is set twice! You have set the include_path somewhere else already.

Sign up to request clarification or add additional context in comments.

1 Comment

This seems to be a zend_tool cli miss implementation then. I've never have added a include on neither of those places and I've only used zend tool to build this structure. Somewhere during the process either the generated index file or the generated application.ini file are creating an include path that they shouldn't. I presume this will happen often when other ppl start to use zend tool cli often.
1

I got the same error when I tried to run zf create dbtable.from-database

Found out what the issue was. My zf command was being run from /usr/local/zend/share/ZendFramework/library/Zend but my project had it's own Zend Framework located at /Applications/MAMP/htdocs/NPT2/library/Zend

What I did to fix the error was remove the Zend folder in my project's library folder, and then set include_path in my php.ini file to point to /usr/local/zend/share/ZendFramework/library

See if that works for you.

2 Comments

Hi, why do you say "remove the Zend folder in my project's library folder, and then set include_path in my php.ini file to point to /usr/local/zend/share/ZendFramework/library" when the Quick Start tutorial in the Zend Framework docs states differently? When is the docs correct then? framework.zend.com/manual/en/…
@Enke The point is to have only one install of Zend framework. You could also remove the one at /usr/local/zend/share/ZendFramework/library and only have one in your project library folder. Don't know if one is better then the other. I like having just one centrally located install, that way if I update it, then every Zend app I have gets the latest version. Locating it in your project's library folder is simpler to setup however, which is prob why the Quick Start guide suggests it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.