1

I'm new to zend, so I'm working through this tutorial here. If you skip to about 1:10, he creates a new contoller, and then types the name of it in the url. This brings up the appropriate view. All good. However, when I do it I get a big NOT FOUND and this 'The requested URL /cube was not found on this server'. Any ideas on what I'm doing wrong.

Sorry if this is a little vague, if you need more details, let me know.

Here's a few you may need:

Server: Xampp

OS: Windows Vista 32bit

Zend version: 1.11.6

2 Answers 2

1

Do you have correctly configured .htaccess file in the project's root directory? Take a look at this. You have to have mod_rewrite enabled in Apache. This can be done by editing the httpd.conf file, which should be in the Apache installation folder. Then you should add a .htaccess file into the root folder of you project with the following content:

RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php

Or alternatively one can use ZF without mod_rewrite. To do so, configure front controller this way:

Zend_Controller_Front::getInstance()->setBaseUrl('/url/to/app/index.php')
Sign up to request clarification or add additional context in comments.

2 Comments

It's possible. I can't say I particularly understand htaccess configuration, so this link's great for me thanks. I'll get back once I've had a read and a ponder.
Took me some time, I had all sorts of unrelated problems with my server. Anyway, the main thing was that I didn't configure my http.conf file correctly. Thanks for your help.
0

Try something like this on DOS command line:

SET PATH=%PATH%;C:\wamp\bin\php\php5.3.0    
C:\>wamp\www> C:\wamp\www\ZendFramework\bin\zf.bat create controller test

use correct path for zf.bat and php

If still some problem then comment out this line in application.ini and try again

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

I faced this problem earlier. Look at this post. Hope this will help.

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.