More information that I thought might be helpful...

I have two computers with the same problem.  Both have php and zf
1.9.4 minimal installed.  The php cli has zf in it's include_path and
this include path matches the include_path reported from zf show
phpinfo.

>From both systems, running Zend Tool, "zf show phpinfo" displays an
include path that points to /Applications/Zend/Zend Studio -
7.0.2/plugins/org.zend.php.framework.resource_7.0.0.v20090531-1639/resources/ZendFramework-1/library

The error message:

Current context is not valid, consider using the 'cd' command to alter
the contextfile:/Users/edlazor/Zend/workspaces/DefaultWorkspace7

Taking the error message literally, I tried running the 'cd' command
from within the Zend Tool window.  No luck, but it does seem that part
of the problem is in how the project is defined at the command line or
within zend studio...

>From the command line:

cd /web/vhosts/test
zf create project website
cd website
zf create controller Users

I open http://test in the browser (the virtual host is setup in
apache, etc.) and I get the zend framework intro page.

>From within Zend Studio:

-> File -> New -> PHP Project

Name the project "test", choose "create directory from existing
source" and point it to /web/vhosts/test/website

The project opens, showing the files...  I run Zend Tool.

running "zf" gives the general help page for zend tool.

running "zf create controller Test"

It errors out:  Current context is not valid, consider using the 'cd'
command to alter the
contextfile:/Users/edlazor/Zend/workspaces/DefaultWorkspace7

The contextfile specified makes sense - it's the default location that
Zend Studio creates projects.  I didn't use the default location
though.  I can't enter "cd /web/vhosts/test/website" in Zend Tool
without getting the 'current context' error message.

To test this.. I created a new project within Zend Studio, but this
time I specified Zend Framework Project, Create project on a local
server - it worked and so did the command 'zf create controller Test"

I also tested with a new project and chose Zend Framework -> create
new project in workspace... it didn't work

It seems to have something to do with mapping project files and
folders to the location on the hard drive... What do you think?

-Ed

Reply via email to