1

I asked this question yesterday, looking if more people can help me out.

I installed the minimal zend framework on my freshly installed linux.

Using zf create project command I created a project, no errors inside the linux's html folder.

I go to localhost/projectname and it just opens up the project directory, once I go to public, it shows me the welcome to zend framework page (seems right, right?). I add a public action to indexcontroller but it doesn't link up with zend framework.

Can anyone explain the issue here or skype me at darius.coder ???

I've never been able to install a working installation of zend framework and only need to see it done once. Can anyone PLEASE help ? I have team viewer as well.

10
  • 1
    @darius What is the error you get? What do you mean by it doesn't link up? Also, if your project is setup properly, when you type localhost/projectname it should be showing you the project and not the directory listing Commented May 19, 2011 at 7:13
  • @JohnP I would expect it to show me the index.php file too, instead of the directory. When I say it doesn't link up, i mean if i create public function contactusAction() and insert a phtml file in the views section, and i type in localhost/projectname/(or add index/)contactus, it doesn't show up. I've followed every instruction that i could find online and it seemed the setup was full proof. The thing that I think can be the problem is I didn't edit any php.ini files other than what i was told online. I must be missing include_path or..? /var/www/html/projectname is my project location Commented May 19, 2011 at 7:17
  • You need to have modrewrite enabled and make the changes in your conf file as well. Have you done that? Commented May 19, 2011 at 7:21
  • @JohnP No I haven't. I followed these instructions if-not-true-then-false.com/2010/… I will look how to enable modrewrite right now. After that what do I do? Commented May 19, 2011 at 7:24
  • 1
    The thing you seem to be missing is that the public folder within your ZF app should be your document root (well, it's not required, but is the most logical choice anyway). So, just create a local domain (yourproject.local) point that to 127.0.0.1, create an apache VirtualHost which sets the document root to the public folder of your project (see Creating A Local Domain Using Apache Virtual Hosts). Commented May 19, 2011 at 11:11

1 Answer 1

1

As you have created your project via zf command

zf create project <project name>

You can create controller , action from the same zf command

zf create action <action name> <controller name>

zf create controller <controller name>

So in this way you don't want to create view pages etc . All will be done by zf tool .

Now coming to your problem .

As you told all is well until you created a public action in IndexController.php

So the url will be http://localhost/projectname/public/

Now when you created an action contact in IndexController

You can access via

http://localhost/projectname/public/index/contact

So what you was missing I guess is the public .

Let me know whether this helps you .

Thanks

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

Comments

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.