views:

649

answers:

1

Dear All,

I have the following problem. I am learning the Zend Framework. I have written my first simple application, and it works fine. It consists in an index page with some actions to edit a simple database.

Now, I want to add another page: similar structure, different database. I want this second page to be reachable from the first. I created the new controller, the db model and so on. Just copying and modifying the stuff for the main page.

However, when I click on the link on the main page, I get a "page not found error". Actually, I have got the same problem with the "ready-made" application given in the official quickstart zend tutorial!!! (in that case, the guestbook can't be reached).

The question is therefore: what is the way to have a web site with 2 pages, each with its own controllers and models? what files do I need to modify inside my zend application folder?

Thanks in advance!!!

Cheers, Giuseppe

A: 

Let's break the problem into two

  1. Different page

  2. Contents of the different page

The most important is the first one, therefore I will talk about this (when you solve it come back).

If the sample application does not work and yo follow the instructions, I suppose that you have not set up redirection correctly. This goes down to .htaccess file and if mod_rewrite is enabled.

Try to check the latter by a phpinfo(); in a script. Then try to see if mod_rewrite is installed, the easiest way is to search for "mod_rewrite" (Ctrl + F in most browsers)

Give feedback, you're against an easy obstacle, but don't know which one yet.

dimitris mistriotis
Hi!!! First of all, thanks a lot. Well, I did a sample script that calls phpinfo and it seems to work fine. It produces the big page.
I have made a couple of experiments. For all the applications I put in the webroot folder, the main page is accessible (with all its actions). Anything else is not accessible. So it is a configuration problem. I now need to figure out what do I need to fix...
the issue with phpinfo is not the production of the big page, but if mod_rewrite is installed. How to do check: produce the page again and search for mod_rewrite.You can check if the controllers work, using this:http://stackoverflow.com/questions/13698/php-zend-mvc-without-modrewrite(old question of mine).We have to issues: mod_rewrite, correct configuration of Controller.
dimitris mistriotis