[fw-general] Re: Newbie : Message: Invalid controller specified
hey, Please bear with me. Being new to PHP and Zend I couldnt find my error. So I have started afresh with a new sample project. I had correctly connected to Zend until I did a zf create action add Index zf create action edit Index... But I think I have created them on the wrong folder . I had right clicked on square (projectname)and run the scripts . They were created in ..square/application/views/scripts/index (in the same folder where there is the index.phtml). I have deleted them but Im getting the error message below with URL: http://localhost:8080/ === Exception information: Message: Action index does not exist and was not trapped in __call() Stack trace: #0 C:\mowes_0174\mowes_0174\www\square\library\Zend\Controller\Action.php(515): Zend_Controller_Action-__call('indexAction', Array) #1 C:\mowes_0174\mowes_0174\www\square\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action-dispatch('indexAction') #2 C:\mowes_0174\mowes_0174\www\square\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #3 C:\mowes_0174\mowes_0174\www\square\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front-dispatch() #4 C:\mowes_0174\mowes_0174\www\square\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap-run() #5 C:\mowes_0174\mowes_0174\www\square\public\index.php(26): Zend_Application-run() #6 {main} Request Parameters: array ( 'controller' = 'index', 'action' = 'index', 'module' = 'default', Can someone pls guide a newbie out of this 'trap' Thanks -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3340920.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Newbie : Message: Invalid controller specified
mich wrote: They were created in ..square/application/views/scripts/index (in the same folder where there is the index.phtml). This is actually the correct location for the files, assuming they were named add.phtml and edit.phtml. These are view files which are loaded when calling the matching functions in the index controller (hence the reason they are in the views/scripts/index folder - they are view scripts belonging to the controller named index). This being fine (although you deleted the files, so maybe not now) your problem seems to be coming from somewhere else. Do you have a a public function indexAction() in the file /application/controllers/IndexController.php? Perhaps you edited the file and inadvertently renamed or removed that file? -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3341433.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Newbie : Message: Invalid controller specified
Hi, No, the public function indexAction() is there and havent touched the file. I have since then created another project with the same name but I would like to know as I need to do the same action again and most probably end up with the same error. btw would the path be: http://localhost/square/public/index/add ?? In case this is correct , could there be another reason.?? thanks to everyone Mich -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3341512.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Newbie : Message: Invalid controller specified
mich wrote: btw would the path be: http://localhost/square/public/index/add ?? Mich, It's somewhat difficult to say what the URL would be ... you seem to be changing your server setup between each post. But assuming that when you first create the project, you can view the Zend page at http://localhost, you would be able to access the actions you are creating at http://localhost/index/add etc. Or if, as per your last post, you get to your starter page at http://localhost/square/public, then the action URL would be http://localhost/square/public/index/add. You may get more help on issues such as this from an alternate source, perhaps http://www.zfforums.com/ ZFForums . -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3342461.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: Newbie : Message: Invalid controller specified
Hi, what if you want a URL like this: http://localhost/press_release Would you create a new controller called press_release and the actions associated with it. If the end user requires this to be an underscore. What do we do? Cheers, -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3339719.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Newbie : Message: Invalid controller specified
On Mon, Mar 7, 2011 at 11:06 AM, tkuben tku...@hotmail.com wrote: what if you want a URL like this: http://localhost/press_release Would you create a new controller called press_release and the actions associated with it. If the end user requires this to be an underscore. What do we do? The ZF convention is to convert dashes to camel case when it comes to controllers, e.g.: /foo-bar = FooBarController /derp-doo-dun = DerpDooDunController If you want to use underscores, you'll need to create a route that routes press_release to whichever controller/action you end up creating to handle this request. For more information on routes check out the documentation here: http://framework.zend.com/manual/en/zend.controller.router.html If you are using Zend_Application and want to configure your routes with application.ini, refer to this documentation here: http://framework.zend.com/manual/en/zend.application.available-resources.html#zend.application.available-resources.router I hope this helps! -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com
[fw-general] Re: Newbie : Message: Invalid controller specified
Hi Mark all , Many thanks for your suggestion. I changed the name andstarted the tutorial zf-tutorial in the hope of getting a project going. It seems it needs some patience to get going with Zend I have beentrying to connect to the public/index now but remain unsuccessful. When I get the screen of Zend but when I type : http://localhost:8080/zf-tutorial/public/index.php--- I get the Zend screen but then when I remove the index.php I get an error, which looks like it cannot find the path. I have gone over the steps of the tutorial several times and checked but unsuccessful. Can someone pls help many thanks -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3337511.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Newbie : Message: Invalid controller specified
Hello Mark, I would recheck your .htaccess file and your site configuration. Regards. On Sun, Mar 6, 2011 at 12:23 PM, mich michm...@gmail.com wrote: Hi Mark all , Many thanks for your suggestion. I changed the name andstarted the tutorial zf-tutorial in the hope of getting a project going. It seems it needs some patience to get going with Zend I have beentrying to connect to the public/index now but remain unsuccessful. When I get the screen of Zend but when I type : http://localhost:8080/zf-tutorial/public/index.php--- I get the Zend screen but then when I remove the index.php I get an error, which looks like it cannot find the path. I have gone over the steps of the tutorial several times and checked but unsuccessful. Can someone pls help many thanks -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3337511.html Sent from the Zend Framework mailing list archive at Nabble.com. -- j .sanders
[fw-general] Re: Newbie : Message: Invalid controller specified
Hey, Many thanks for your help. can you please specific the exact files as being new to Zend and php I m a bit confused. My zf-tutorial project is in the c://mowes_0174/mowes_0174/www/zf-tutorial and what do I check for please? Servername is zf-tutorial.local -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Newbie-Message-Invalid-controller-specified-tp3334842p3337656.html Sent from the Zend Framework mailing list archive at Nabble.com.