Hi I have a problem trying to configure Zend Frame work in test server, I have the project working fine in my local mac computer, I upload all the file to my root html docs in my test server, exactly like I have it in my local, but for some reason I can't found my controllers, the error I have is this
An error occurred
Page not found
Exception information:
Message: Invalid controller specified (MessageBroker)
Stack trace:
#0 /var/www/html/magentoreviewsZF/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /var/www/html/magentoreviewsZF/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /var/www/html/magentoreviewsZF/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/html/magentoreviewsZF/public/index.php(26): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'controller' => 'MessageBroker',
'action' => 'index',
'module' => 'default',
)
I have see in other post that changing the RewriteBase in the htaccess do the trick, but don't work for me, also I have the default structure, also the index controller and the error controller works, if I go directly to their path.
so is working is just my MessageBroker controller is not been found, why!, please anybody can point me to the right direction, I really don't know what else to do, thanks!!!
Iam not sure, but let me guess: Test Server = Windows ? Production = Linux ?
Take care about the filename / classname of your Controller on linux its case sensetive so name you Controller:
class MessagebrokerController extends Zend_Controller_Action
{}
And your filename: MessagebrokerController.php
Related
I have run zend framework project which is downloaded from live site, in localhost. All are working fine. But in front page, The following errors are shown.
There was an error.
Exception information:
Message: Action Helper by name GetEnvPath not found
Stack trace:
#0 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Action\HelperBroker.php(293): Zend_Controller_Action_HelperBroker::_loadHelper('GetEnvPath')
#1 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Action\HelperBroker.php(323): Zend_Controller_Action_HelperBroker->getHelper('getEnvPath')
#2 D:\xampp\htdocs\hyperspace_dev\application\controllers\CustomerController.php(390): Zend_Controller_Action_HelperBroker->__call('getEnvPath', Array)
#3 D:\xampp\htdocs\hyperspace_dev\application\controllers\CustomerController.php(390): Zend_Controller_Action_HelperBroker->getEnvPath()
#4 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Action.php(516): CustomerController->accountAction()
#5 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Dispatcher\Standard.php(308): Zend_Controller_Action->dispatch('accountAction')
#6 D:\xampp\htdocs\hyperspace_dev\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#7 D:\xampp\htdocs\hyperspace_dev\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#8 D:\xampp\htdocs\hyperspace_dev\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#9 D:\xampp\htdocs\hyperspace_dev\index.php(36): Zend_Application->run()
#10 {main}
Request Parameters:
array (
'controller' => 'customer',
'action' => 'account',
'module' => 'default',
)
Front page means After getting login the redirected page
And also controller are not called here
I have searched lot of things.But still now i can't resolved.
If anybody met this same problem, Please save me guys
The actionhelper GetEnvPath cannot be found. Your request and controller are probably right. I would suggest checking if it does exists and if so, if the filename and call have the right case (case sensitivity).
enable php.ini openssl
it will work ...
:)
Cheers
Neil
I have some custom form elements that use custom view helpers in my Zend Framework project. They get loaded and work properly on development machine but when I move the project over to my EC2 server they don't get loaded.
From application.ini:
resources.view.helperPath.Custom_View_Helper_ = APPLICATION_PATH "/../library/Custom/View/Helper/"
Error returned by server:
Warning: Exception caught by form: Plugin by name 'Multiselect' was not found in the registry;
used paths:
Application_Views_Helpers_Fields_: /home/user/hippo/application/views/helpers/fields/
Application_Views_Helpers_: /home/user/hippo/application/views/helpers/
Custom_View_Helper_: /home/user/hippo/application/../library/Custom/View/Helper/
Zend_View_Helper_: Zend/View/Helper/:/home/user/hippo/application/views/helpers/ Stack
Trace:
#0 /home/user/hippo/library/Zend/View/Abstract.php(1182): Zend_Loader_PluginLoader->load('Multiselect')
#1 /home/user/hippo/library/Zend/View/Abstract.php(618): Zend_View_Abstract->_getPlugin('helper', 'multiselect')
#2 /home/user/hippo/library/Zend/Form/Decorator/ViewHelper.php(241): Zend_View_Abstract->getHelper('multiselect')
#3 /home/user/hippo/library/Zend/Form/Element.php(2043): Zend_Form_Decorator_ViewHelper->render('')
#4 /home/user/hippo/library/Zend/Form/Decorator/FormElements.php(111): Zend_Form_Element->render()
#5 /home/user/hippo/library/Zend/ in /home/user/hippo/library/Zend/Form.php on line 2925
What could cause this to work on my dev machine but not on EC2?
I figured out the problem. My dev machine is a Mac and EC2 is running Linux. I had to change public $helper='multiselect' to public $helper='multiSelect' so it would search for the file name MultiSelect.php instead of Multiselect.php when searching for the view helper.
Hy Somebody!
I have a question I want to solve in Zend Framework. The situation is the following: I have an indexController, where I placed a getAktGroupMailAction - what is on my ACL - like here:
public function getAktGroupMail(){
$ggroup = new Application_Model_DbTable_Groups();
//return $groupN = $ggroup->getUserAktGroupMail();
}
If I don't put "//" characters before the word "return" I get the error messages:
Fatal error: Uncaught exception 'Zend_Acl_Exception' with message 'Resource 'error' not found' in /var/www/hobu/library/Zend/Acl.php:365 Stack trace: #0 /var/www/hobu/library/Zend/Acl.php(846): Zend_Acl->get('error') #1 /var/www/hobu/application/plugins/AccessCheck.php(19): Zend_Acl->isAllowed('user', 'error', 'error') #2 /var/www/hobu/library/Zend/Controller/Plugin/Broker.php(309): Application_Plugin_AccessCheck->preDispatch(Object(Zend_Controller_Request_Http)) #3 /var/www/hobu/library/Zend/Controller/Front.php(941): Zend_Controller_Plugin_Broker->preDispatch(Object(Zend_Controller_Request_Http)) #4 /var/www/hobu/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() #5 /var/www/hobu/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #6 /var/www/hobu/public/index.php(26): Zend_Application->run() #7 {main} Next exception 'Zend_Controller_Exception' with message 'Resource 'error' not found#0 /var/www/hobu/library/Zend/Acl.php(846): Zend_Acl->get('error') #1 /va in /var/www/hobu/library/Zend/Controller/Plugin/Broker.php on line 312
Somebody could help me?
You've not included the code for your 'Access Check' plugin which is what's generating the error, but I'm guessing what this does is call Zend_Acl using the current controller/action name. If so, the underlyng problem is not ACL related. Your $groupN = $ggroup->getUserAktGroupMail() is throwing an exception, which is causing the request to be routed to the error controller. Since you've not setup a resource called 'error', this then generates an ACL error when it checks whether the user can access that controller.
I'd suggest you modify your access check plugin so it does not check permissions if the controller name is 'error'. This should get rid of your ACL error message and let you see and fix the underlying problem.
I'm trying to put a ZF website on the Internet which works well on my local machine (WAMP).
But on the Linux server, only the main page can be properly displayed. For the other pages, I've got a fatal error:
Fatal error: Uncaught exception
'Zend_Controller_Dispatcher_Exception' with message 'Invalid
controller specified (error)' in
/var/www/staging/library/Zend/Controller/Dispatcher/Standard.php:248
Stack trace: #0
/var/www/staging/library/Zend/Controller/Front.php(954):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http)) #1
/var/www/staging/library/Zend/Application/Bootstrap/Bootstrap.php(97):
Zend_Controller_Front->dispatch() #2
/var/www/staging/library/Zend/Application.php(366):
Zend_Application_Bootstrap_Bootstrap->run() #3
/var/www/staging/public/index.php(26): Zend_Application->run() #4
{main} Next exception 'Zend_Controller_Exception' with message
'Invalid controller specified (error)#0
/var/www/staging/library/Zend/Controller/Front.php(954):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Contr in
/var/www/staging/library/Zend/Controller/Plugin/Broker.php on line
336.
I activated the URL rewriting. I'm using modules. The index.php and application.ini are very basic, we didn't custumize it.
I suppose that there is something wrong with the configuration... Thanks.
When deploying application from windows platform to Linux, most typical type of error that can be encountered is due to the filename cases. Linux system are very strict about file name and cases.
The error you are encountering is also probably one of these cases. Check the name of ErrorContainer.php and try to match the name you specify in your route and file system.
In changing server Windows => Linux. The first main things to check is ignore case in Windows. Check filenames and class names if spelled with proper first capital letter etc.
I'm trying to move a website to a new host (MediaTemple.)
When you stick to http, or https everything is fine. When going from http->https or https->http you get the error.
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()'
in /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Session.php:462
Stack trace:
#0 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Session/Namespace.php(143): Zend_Session::start(true)
#1 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Auth/Storage/Session.php(87): Zend_Session_Namespace->__construct('Zend_Auth')
#2 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Auth.php(91): Zend_Auth_Storage_Session->__construct()
#3 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Auth.php(141): Zend_Auth->getStorage()
#4 /var/www/vhosts/FakeSite.com/httpdocs/application/layouts/layout.phtml(12): Zend_Auth->hasIdentity()
#5 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/View.php(108): include('/var/www/vhosts...')
#6 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/View/Abstract.php(831): Zend_View->_run('/var/www/vhosts...')
#7 /var/www/vh in /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Session.php on line 462
Session path is writable, and seems to work fine if you stick to one protocol. There are no session_start() calls, and session.auto-start is 0.
Code is running on 3 other servers fine. It must be a configuration issue, but I haven't been able to find it
Sure looks like the server is configured with session.auto_start = 1.
So, maybe add to configs/application.ini:
phpSettings.session.auto_start = 0
I think you have a plugin(or other library), which calls session_start() function
I had the same problem, when tried to create facebook resource
I figured finally it out.
Problem was that PHP on http was running as an Apache module, and PHP on https was running as a FastCGI module.
I assume those run as different users on MediaTemple or something. The session would get created by one, and not be able to be read by the other because another user owned the file.