zend-framework

Node no longer exists error with Zend_Session

送分小仙女□ 提交于 2019-12-08 05:20:47
问题 Hi I am having issues with my my sessions using Zend Framework 1.7.6. The problem exists when I try and store an array to the session, the session namespace also stores other userdata. I am currently getting the following message in my stacktrace Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() - ... Error #2 session_start() [function.session-start]: Node no longer exists Array The code where I think this is erroring is: //now we add the user object

On submit the form don't display its POST data

放肆的年华 提交于 2019-12-08 05:16:02
问题 I have a little experience with Zend Framework, but I like to fiddle with it until it works. But now I cannot resolve this problem. I have a form: <?php class Application_Form_Login extends Zend_Form { protected $notEmpty; public function init() { // Create NotEmpty validator $notEmpty = new Zend_Validate_NotEmpty(); // Configure validators for username element $notEmpty->setMessage('Gelieve dit veld in te vullen'); $this->setMethod('post'); // emailAddress $this->addElement('text',

How to integrate dynamically JS code in success page in magento

不问归期 提交于 2019-12-08 05:02:31
问题 I know that success.phtml is the file where I should put the code I want to execute, but I received from CJ this file which is not an html, its a php class. Question is very simple: I would like to know how can I integrate this file into the success.phtml after an order has been received.? Thank you class CommissionJunction extends Mage_Core_Helper_Data { /** * Get SKU, quantity, price and discount amount for each product in a given order * @param object $order * @return array */ private

Can't set custom validator messages in Zend_Form

為{幸葍}努か 提交于 2019-12-08 04:57:13
问题 I just can't figure it out how to set custom validator messages in Zend_Form object. Here is an example code. $this->addElement('password', 'password', array( 'label' => 'Password', 'decorators' => array('ViewHelper'), 'filters' => array('StringTrim'), 'validators' => array( array('Digits', false, array('messages' => array('notDigits' => 'Only digits are allowed here'))) ), 'required' => true )); When I try to validate the form entering invalid data a message saying "notDigits" appear. I

ZendFramework images not loading

霸气de小男生 提交于 2019-12-08 04:56:58
问题 I have a site I am developing in the ZendFramework and I have two social image pictures on the homepage. When I first load the page the images aren't there, however if I then click a link the images appear if I then click another link further into the site they disappear again, the images are in a div in the layout file they should be there all the time everything else in the layout file is apart from these.. I have been struggling on an issue of trying to echo image paths from a database in

Using node.js and socket.io alongside Zend Framework application

半城伤御伤魂 提交于 2019-12-08 04:37:54
问题 I've built a Zend Framework application. I want to implement node.js and socket.io in this application, but I have no clue where to start. I've only used node and socket.io to make a simple chat application. If anyone could give me some pointers as for where to start or what steps to take to get a better understanding of how this implementation should work. Thanks! I've seen this question, but it's really outdated. 来源: https://stackoverflow.com/questions/47674505/using-node-js-and-socket-io

How to exclude a controller action from authentication in Zend framework

女生的网名这么多〃 提交于 2019-12-08 04:14:19
问题 I'm trying to find a way so that one specific action in controller is excluded from auth and made public. I need this to be done for API integration purposes. Is there a place I could look at to change or include any functions to do this? Below is what I have in Bootstrap.php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initAutoload() { $moduleLoader = new Zend_Application_Module_Autoloader(array( 'namespace' => '', 'basePath' => APPLICATION_PATH));

Arabic in zend pdf

家住魔仙堡 提交于 2019-12-08 04:07:25
I am new in Zend framework. Now I have a problem with Zend pdf. I am trying to make a pdf document which contains arabic as well as english. But I can't print arabic in zend. Please help me with any tutorials or sample code links. This is still an issue in Zend_pdf I would recommend you to use TCPDF here is the link for that http://www.tcpdf.org/ Go through there examples http://www.tcpdf.org/examples.php If you still want to stick with zend pdf may this link be helpful. http://devzone.zend.com/1064/zend_pdf-tutorial/ //Apply font file(.ttf) for zend pdf. for example below will allow arabic

How to correctly set up exception handler in Zend?

拜拜、爱过 提交于 2019-12-08 03:58:23
问题 I'm trying to redefine exception handler for a couple of my controllers in Zend (RESTful). This is my piece of code: abstract class RestController extends Zend_Rest_Controller { public function init() { set_exception_handler(array($this, 'fault')); } public function fault($exception = null, $code = null) { echo $exception->getMessage(); } } But for some reason Zend uses default template/error handling and my fault function didnt execute. Btw, I'm using module architecture. that controller is

How to use optional parameters at zend routing

寵の児 提交于 2019-12-08 03:56:39
问题 I want to set a similar routing to the standard-router with optional parameters, e.g.: intranet.route = 'intranet/:controller/:action/:title/:id' only the id-parameter doesn't need a value. i tried giving it an default value like null - but then the variable is still set, but i don't want it to exist at all when the user does not give it any value also, how can i set up a route with dynamic values, just like this: intranet/index/index/Front%20Page/123/foo/bar then the variable $foo exists