Search Results

Search found 4834 results on 194 pages for 'zend route'.

Page 7/194 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Route specific HTTP requests through pfSense OpenVPN

    - by DennisQ
    Hi, to start, I have very little knowledge on routes, iptables, etc. That said, here's what I'm trying to accomplish and where I think I'm stumped: Problem: We have an external website which we recently firewalled so it only accepts traffic from our office IP addresses. This works well at the office, but doesn't work for remote access through VPN as we don't route all traffic through OpenVPN. I would rather avoid forcing everyone to route all traffic through just to accommodate this one site. Environment: Main router box is running pfSense. Em0 is internal IP, Em1 is external. Internal net is 10.23.x and VPN is 10.0.8.0/24 I believe what I need to do is add a route to the VPN server config to send all traffic to that IP over the VPN tunnel. I think that part's working, but I don't get a response back, so I'm assuming that I need some NAT config on the VPN server to route the response back over the tunnel? What I've found so far is to try the following, but since this is a pfSense box on FreeBSD, I can't run iptables, etc. Make sure ip forwarding is enabled: echo 1 /proc/sys/net/ipv4/ip_forward Setup NAT back out: iptables -t nat -A POSTROUTING -s 10.0.8.0/24 -o em0 -j MASQUERADE Am I on the right path, and if so how do I accomplish this through pfSense UI or FreeBSD CLI? Thanks!

    Read the article

  • mysql.sock problem on Mac OS X, all Zend products

    - by Michael Stelly
    Hi folks. I posted this on the Zend forum, but I'm hoping I can get a speedier reply here. I've tried every solution provided on this forum with no luck. When I restart mysql, everything appears ok. sudo /usr/local/zend/bin/zendctl.sh restart Password: /usr/local/zend/bin/apachectl stop [OK] /usr/local/zend/bin/apachectl start [OK] Stopping Zend Server GUI [Lighttpd] [OK] spawn-fcgi: child spawned successfully: PID: 7943 Starting Zend Server GUI [Lighttpd] [OK] Stopping Java bridge [OK] Starting Java bridge [OK] Shutting down MySQL . SUCCESS! Starting MySQL . SUCCESS! Pinging locahost is also OK and resolve dns to IP. ping localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.048 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.064 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.066 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.076 ms 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.064 ms But when I attempt to access the local url for my app, I get the dreaded: Message: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). This is a show-stopper for me. I appreciate any assistance. Thank you.

    Read the article

  • Developing high-performance and scalable zend framework website [on hold]

    - by Daniel
    We are going to develop an ads website like http://www.gumtree.com/ (it will not be like this one but just to give you an ideea) and we are having some issues regarding performance and scalability. We are planning on using Zend Framework for this project but this is all that I'm sure off at this point. I don't think a classic approch like Zend Framework (PHP) + MySQL + Memcache + jQuery (and I would throw Doctrine 2 in there to) will fix result in a high-performance application. I was thinking on making this a RESTful application (with Zend Framework) + NGINX (or maybe MongoDB) + Memcache (or eAccelerator -- I understand this will create problems with scalability on multiple servers) + jQuery or maybe throw Backbone.js in there, a CDN for static content, a server for images and a scalable server for the requests and the rest. My questions are: - What do you think about my approch? - What solutions would you recommand for developing an high performance, scalable application expected to have a lot of traffic using PHP(Zend Framework 2)...I would be interested in your approch. I should note that I'm a Zend developer, I'm working with Zend for over 3 years, this is why I'm choosing it.

    Read the article

  • Asp.net MVC Route class that supports catch-all parameter anywhere in the URL

    - by Robert Koritnik
    the more I think about it the more I believe it's possible to write a custom route that would consume these URL definitions: {var1}/{var2}/{var3} Const/{var1}/{var2} Const1/{var1}/Const2/{var2} {var1}/{var2}/Const as well as having at most one greedy parameter on any position within any of the upper URLs like {*var1}/{var2}/{var3} {var1}/{*var2}/{var3} {var1}/{var2}/{*var3} There is one important constraint. Routes with greedy segment can't have any optional parts. All of them are mandatory. Example This is an exemplary request http://localhost/Show/Topic/SubTopic/SubSubTopic/123/This-is-an-example This is URL route definition {action}/{*topicTree}/{id}/{title} Algorithm Parsing request route inside GetRouteData() should work like this: Split request into segments: Show Topic SubTopic SubSubTopic 123 This-is-an-example Process route URL definition starting from the left and assigning single segment values to parameters (or matching request segment values to static route constant segments). When route segment is defined as greedy, reverse parsing and go to the last segment. Parse route segments one by one backwards (assigning them request values) until you get to the greedy catch-all one again. When you reach the greedy one again, join all remaining request segments (in original order) and assign them to the greedy catch-all route parameter. Questions As far as I can think of this, it could work. But I would like to know: Has anyone already written this so I don't have to (because there are other aspects to parsing as well that I didn't mention (constraints, defaults etc.) Do you see any flaws in this algorithm, because I'm going to have to write it myself if noone has done it so far. I haven't thought about GetVirtuaPath() method at all.

    Read the article

  • using zend form decorators

    - by pradeep
    <div class="field50Pct"> <div class="fieldItemLabel"> <label for='First Name'>First Name:</label> </div> <div class="fieldItemValue"> <input type="text" id="firstname" name="firstname" value="" /> </div> </div> <div class="clear"></div> I want the code to appear like this in source code . how do i write the same thing in zend using decorators ? The element is like $firstname = new Zend_Form_Element_Text('FirstName'); $firstname->setLabel('FirstName') ->setRequired(true) ->addFilter('StripTags') ->addFilter('StringTrim') ->addErrorMessage('Error in First Name') ->addValidator('NotEmpty');

    Read the article

  • Zend DB MYSQL Wrapper

    - by Vincent
    All, I have a PHP application written in Zend Framework with MVC style. I plan to use Zend_DB to connect to the MySQL database and process queries. I am looking for a wrapper class which makes it easy to use Zend_DB class. This wrapper class will have a constructor that connects to the Mysql db using Zend_DB. It will also have a method to return a singleton instance for each and every db connection made. Something like: $pptDB = PPTDB::getInstance(); $pptDB->setFetchMode(PPTDB::FETCH_OBJ); $result = $pptDB->fetchRow('SELECT * FROM bugs WHERE bug_id = 2'); echo $result->bug_description; Where class PPTDB extends Zend_DB Is this something feasible to have? If not, how ls would you use Zend_DB in a major application? Thanks,

    Read the article

  • Zend RegEx Validator error message issue

    - by Mallika Iyer
    Hello, I'm validating a text field in my form as follows: $name = new Zend_Form_Element_Text('name'); $name->setLabel('First Name:') ->setRequired(true) ->addFilter(new Zend_Filter_StringTrim()) ->addValidator('regex',true,array('/^[(a-zA-Z0-9)]+$/')) ->addErrorMessage('Please enter a valid first name'); What I'm trying to accomplish is - how can i display a meaningful error message? Eg: If first name is 'XYZ-', how can i display '- is not allowed in first name.' Is there a way I can access what character the regex is failing for? Would you recommend something else altogether? I thought about writing a custom validator but the regex is pretty simple, so I don't see the point. I couldn't find a decent documentation for the zend 'regex' validator anywhere. If I don't override the default error message, I simple get something like : ';;;hhbhbhb' does not match against pattern '/^[(a-zA-Z0-9)]+$/' - which I obviously don't want to display to the user. I'd appreciate your inputs.

    Read the article

  • Best way to deal with session handling in Zend Framework

    - by JACK IN THE CRACK
    So I'm starting up in Zend framework and looking to implement a site-wide "User" session.... something I can easily access from ALL modules/controllers in the application. I'm like, should I make a new namespace in the library and extend the controller, like: MyLib_Controller_Action extends Zend_Controller_Action { protected $_userSession; function preDispatch(Zend_Controller_Request_Abstract $req) { $this->_userSession = new Zend_Session_Namespace('user'); } } ANd then have all my controllers/modules/etc extend from that? Or should I create a Plugin or what? How would you go about making this plugin to pass the user session to the controller? Or do I do it in the bootstrap?? Again how to pass to controller? Also should I use Zend_Session_Namespace or Zend_Http_Cookie and also how do I encrypt and xss clean the cookie or is that did automagically?

    Read the article

  • Disable escape in Zend Form Element Submit

    - by Joaquín L. Robles
    I can't disable escaping in a Zend_Form_Element_Submit, so when the label has special characters it won't display it's value.. This is my actual Zend Form piece of code: $this->submit = new Zend_Form_Element_Submit('submit'); $this->submit->setLabel('Iniciar Sesión'); $this->submit->setIgnore(true); $this->addElement($this->submit); I've tried $this->submit->getDecorator('Label')->setOption('escape', false); but I obtain an "non-object" error (maybe submit isn't using the "Label" Decorator).. I've also tried as suggested $this->submit->setAttrib('escape', false); but no text will be shown either.. Any idea? Thanks

    Read the article

  • Where do DQL statements live in an application that is using Zend Framework and Doctrine

    - by Dewayne
    In an application that is using Zend Framework 1.10 and Doctrine 1.2, where should the DQL statements live if our application is built such that it has a Service Layer and a Gateway(aka Doctrine_Table) layer. It seems that our possibilities include: 1) Placing the DQL statements in the Service layer which seems to be a bit too high in our application hierarchy to store DQL. 2) Placing the DQL statements within each model's Table/Gateway which seems a bit redundant because we also need to expose the DQL statements that do things such as getAllUsers() through the Service layer. Which of these is a preferable design? We intend to make use of the Service layer as much as possible so that other projects might consume various parts of our application.

    Read the article

  • How to add/register helpers with Zend Framework

    - by manyxcxi
    I'm just starting out with Zend Framework and am having issues using Zend_Controller_Action_HelperBroker::addPath() to add helpers. I'm not sure if my classes are named incorrectly, I'm giving it the wrong prefix, or what I'm doing wrong so I will post the code and file structure and get out of the way. In Bootstrap.php public function __construct($application) { ... // This works with a manual include_once('../application/plugins/helpers/Csrf.php'); //Zend_Controller_Action_HelperBroker::addHelper(new Application_Controller_Action_Helper_Csrf()); // This isn't picking up my helper class automagically Zend_Controller_Action_HelperBroker::addPath('../application/plugins/helpers','Application_Controller_Action_Helper'); ... } In application/plugins/helpers/Csrf.php class Application_Controller_Action_Helper_Csrf extends Zend_Controller_Action_Helper_Abstract { ... } My directory tree: / application/ ... plugins/ helpers/ Csrf.php CsrfProtect.php ...

    Read the article

  • Zend DB inserting relational data

    - by Wimbjorno
    I'm using the Zend Framework database relationships for a couple of weeks now. My first impression is pretty good, but I do have a question related to inserting related data into multiple tables. For a little test application I've related two tables with each other by using a fuse table. +---------------+ +---------------+ +---------------+ | Pages | | Fuse | | Prints | +---------------+ +---------------+ +---------------+ | pageid | | fuseid | | printid | | page_active | | fuse_page | | print_title | | page_author | | fuse_print | | print_content | | page_created | | fuse_locale | | ... | | ... | | ... | +---------------+ +---------------+ +---------------+ Above is an example of my DB architecture Now, my problem is how to insert related data to two separate tables and insert the two newly created ID's into the fuse table at the same time. If someone could could maybe explain or give me a topic related tutorial. I would appreciate it!

    Read the article

  • Zend routing, throws resource not found

    - by bluedaniel
    Ive got a url: http://dev.local/foodies/view?id=bluedaniel and ive got in my bootstrap: protected function _initRoute() { $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini', 'production'); $router = new Zend_Controller_Router_Rewrite(); $router->addConfig($config, 'resources'); } and ive also got in my routes.ini: [production] resources.router.routes.foodies_view.route = ":foodies/:id" resources.router.routes.foodies_view.defaults.module = "foodies" resources.router.routes.foodies_view.defaults.controller = "view" resources.router.routes.foodies_view.defaults.action = "index" so http://dev.local/foodies/bluedaniel should work right? I get a Resource 'foodies:bluedaniel' not found error however with this setup

    Read the article

  • Linux route add between static LAN and Wifi Gateway

    - by Hamza
    I have two local machines connected to each other via wired ethernet and one of those machines is also connected to a wifi network which provides internet access. A pseudo-graphical representation of the topology is as follows: (PC2)----------(PC1)---------(Wifi Gateway) 192.168.2.x 10.0.0.x The configuration on PC2 is: iface eth0 inet static address 192.168.2.2 network 192.168.2.0 netmask 255.255.255.0 gateway 192.168.2.1 ...and the configuration on PC1 is: iface eth0 inet static address 192.168.2.1 network 192.168.2.0 netmask 255.255.255.0 gateway 192.168.2.1 On PC1, I've added a default route for wlan0 as I couldn't access the internet otherwise: route add default gw 10.0.0.1 wlan0 And also tried setting the gateway for the 192.168.2.x network using: route add -net 192.168.2.0 netmask 255.255.255.0 gw 10.0.0.1 But I still can't access internet from PC2. Edit I don't have access to the wifi gateway.

    Read the article

  • Problems with zend-tool reporting that providers are not valid

    - by Mario
    I have recently setup XAMPP 1.7.3 and ZendFramework 1.10.4 on a new computer and many of the commands that I normally use now fail. Here are the steps I used to setup and test ZF. First I added the ZF library folder (C:\xampp\php\ZendFramework-1.10.4\library) to the include path in php.ini. Then I added the ZF bin folder (C:\xampp\php\ZendFramework-1.10.4\bin) to my Path system variable. To test that everything is configured correctly I ran the command "zf show version" from the command line. The result is "Zend Framework Version: 1.9.6". Immediately something appears to be wrong. The file that is downloaded is "ZendFramework-1.10.4.zip" and the reported version is 1.9.6. I have re-downloaded the latest version (1.10.4) and removed old copy. Still the incorrect version number problem persisted. Having done some research there is a bug in the ZF knowledgebase that version 1.10.3 reports a wrong version number. So that may explain the version number problem. Moving forward I tried to run some zf-tool commands and certain commands reports that the action or provider is not valid. Example: C:\xampp\htdocs>zf create project test Creating project at C:/xampp/htdocs/test C:\xampp\htdocs>cd test C:\xampp\htdocs\test>zf create controller Test Creating a controller at C:\xampp\htdocs\test/application/controllers/TestController.php ... Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml' C:\xampp\htdocs\test>zf create action test Test Creating an action named test inside controller at C:\xampp\htdocs\test/application/controllers/TestController.php ... Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml' C:\xampp\htdocs\test>zf enable layout An Error Has Occurred Action 'enable' is not a valid action. ... C:\xampp\htdocs\test>zf create form Test An Error Has Occurred Provider 'form' is not a valid provider. ... Can any one provide insight into these errors and how to correct them?

    Read the article

  • Zend Cache is not retrieving cache items after some period of time

    - by Phil
    Hi, I am using Zend Cache with page caching but it seems to miss the cache after a period of time. For a while it is OK, but I come back tomorrow and hit the page, it doesn't fetch the contents from the cache. why? $frontendOptions = array( 'content_type_memorization' => true, // This remembers the headers, needed for images 'lifetime' => NULL, // cache lifetime forever 'automatic_serialization' => true, 'automatic_cleaning_factor' => 0 ); $myPageCache = new Zend_Cache_Frontend_Page(array( 'debug_header' => false, 'automatic_cleaning_factor'=>0, 'content_type_memorization' => true, 'default_options' => array( 'cache' => true, 'cache_with_get_variables' => true, 'cache_with_post_variables' => true, 'cache_with_session_variables' => true, 'cache_with_cookie_variables' => true ))); $backendOptions = array('cache_dir' => '.' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR); $cache = Zend_Cache::factory($myPageCache, 'File', $frontendOptions, $backendOptions); $cacheKey = hash('md5', "cache_" . $cachePath); // cachePath is the key I use for the cache if(!$cache->start($cacheKey)) { I output html here $cache->end(); }

    Read the article

  • Zend Framework: How to start PHPUnit testing Forms?

    - by Andrew
    I am having trouble getting my filters/validators to work correctly on my form, so I want to create a Unit test to verify that the data I am submitting to my form is being filtered and validated correctly. I started by auto-generating a PHPUnit test in Zend Studio, which gives me this: <?php require_once 'PHPUnit/Framework/TestCase.php'; /** * Form_Event test case. */ class Form_EventTest extends PHPUnit_Framework_TestCase { /** * @var Form_Event */ private $Form_Event; /** * Prepares the environment before running a test. */ protected function setUp () { parent::setUp(); // TODO Auto-generated Form_EventTest::setUp() $this->Form_Event = new Form_Event(/* parameters */); } /** * Cleans up the environment after running a test. */ protected function tearDown () { // TODO Auto-generated Form_EventTest::tearDown() $this->Form_Event = null; parent::tearDown(); } /** * Constructs the test case. */ public function __construct () { // TODO Auto-generated constructor } /** * Tests Form_Event->init() */ public function testInit () { // TODO Auto-generated Form_EventTest->testInit() $this->markTestIncomplete( "init test not implemented"); $this->Form_Event->init(/* parameters */); } /** * Tests Form_Event->getFormattedMessages() */ public function testGetFormattedMessages () { // TODO Auto-generated Form_EventTest->testGetFormattedMessages() $this->markTestIncomplete( "getFormattedMessages test not implemented"); $this->Form_Event->getFormattedMessages(/* parameters */); } } so then I open up terminal, navigate to the directory, and try to run the test: $ cd my_app/tests/unit/application/forms $ phpunit EventTest.php Fatal error: Class 'Form_Event' not found in .../tests/unit/application/forms/EventTest.php on line 19 So then I add a require_once at the top to include my Form class and try it again. Now it says it can't find another class. I include that one and try it again. Then it says it can't find another class, and another class, and so on. I have all of these dependencies on all these other Zend_Form classes. What should I do? How should I go about testing my Form to make sure my Validators and Filters are being attached correctly, and that it's doing what I expect it to do. Or am I thinking about this the wrong way?

    Read the article

  • Zend Layout and Bootstrapping

    - by emeraldjava
    So i'm using the standard Zend Layout for my site. I have a number of custom controllers and views, and the content of these pages is displayed, but the details in the head element of the layout.phtml are not shown. Do i need to manually associate the Zend_Layout with each specific controller?. I expected since the layout is loaded via the bootstrap this should be available for free. My app.ini file has # layout resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts" resources.layout.layout = "layout" #resources.view[] = # Views resources.view.encoding = "UTF-8" resources.view.basePath = APPLICATION_PATH "/views/" my layout.phtml <?php echo $this->doctype() ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php echo $this->headTitle() ?> <?php echo $this->jQuery();?> </head> <!-- application/layouts/scripts/layout.phtml --> <body> <div id="content"> <?php echo $this->layout()->content ?> </div> </body>

    Read the article

  • Password Confirmation in zend framework

    - by Behrang
    I add this class to library/My/Validate/PasswordConfirmation.php <?php require_once 'Zend/Validate/Abstract.php'; class My_Validate_PasswordConfirmation extends Zend_Validate_Abstract { const NOT_MATCH = 'notMatch'; protected $_messageTemplates = array( self::NOT_MATCH => 'Password confirmation does not match' ); public function isValid($value, $context = null) { $value = (string) $value; $this->_setValue($value); if (is_array($context)) { if (isset($context['password']) && ($value == $context['password'])) { return true; } } elseif (is_string($context) && ($value == $context)) { return true; } $this->_error(self::NOT_MATCH); return false; } } ?> then I create two field in my form like this : $userPassword = $this->createElement('password', 'user_password'); $userPassword->setLabel('Password: '); $userPassword->setRequired('true'); $this->addElement($userPassword); //create the form elements user_password repeat $userPasswordRepeat = $this->createElement('password', 'password_confirm'); $userPasswordRepeat->setLabel('Password repeat: '); $userPasswordRepeat->setRequired('true'); $userPasswordRepeat->addPrefixPath('My_Validate','My/Validate','validate'); $userPasswordRepeat->addValidator('PasswordConfirmation'); $this->addElement($userPasswordRepeat) everything is good but when i submit form always I get the 'Password confirmation does not match' message ? What's Wrong in my code

    Read the article

  • zend session exception on zend_session::start with forms

    - by Grant Collins
    Hi I'm having issues with trying to use Zend_Form_SubForm and sessions. My controller is in essance acting a wizard showing different subforms depending on the stage of the wizard. Using the example I am planning on storing the forms in a session namespace. My controller looks like this. include 'mylib/Form/addTaskWizardForm.php'; class AddtaskController extends Zend_Controller_Action{ private $config = null; private $log = null; private $subFormSession = null; /** * This function is called and initialises the global variables to this object * which is the configuration details and the logger to write to the log file. */ public function init(){ $this->config = Zend_Registry::getInstance()->get('config'); $this->log = Zend_Registry::getInstance()->get('log'); //set layout $this->_helper->layout->setLayout('no-sidemenus'); //we need to get the subforms and $wizardForms = new addTaskWizardForm(); $this->subFormSession = new Zend_Session_Namespace('addTaskWizardForms'); if(!isset($this->subFormSession->subforms)){ $this->subFormSession->subforms = $wizardForms; } } /** * The Landing page controller for the site. */ public function indexAction(){ $form = $this->subFormSession->subforms->getSubForm('start'); $this->view->form = $form; } However this is causing the application session to crash out with Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() Any idea why this is having issues with the Zend Session?? thanks.

    Read the article

  • identify accounts using zend-openid [HELP]

    - by tawfekov
    Hi! , i had successfully implemented simple open ID authentication with the [gmail , yahoo , myopenid, aol and many others ] exactly as stackoverflow do but i had a problem with identifying accounts for example 'openid_ns' => string 'http://specs.openid.net/auth/2.0' (length=32) 'openid_mode' => string 'id_res' (length=6) 'openid_op_endpoint' => string 'https://www.google.com/accounts/o8/ud' (length=37) 'openid_response_nonce' => string '2010-05-02T06:35:40Z9YIASispxMvKpw' (length=34) 'openid_return_to' => string 'http://dev.local/download/index/gettingback' (length=43) 'openid_assoc_handle' => string 'AOQobUf_2jrRKQ4YZoqBvq5-O9sfkkng9UFxoE9SEBlgWqJv7Sq_FYgD7rEXiLLXhnjCghvf' (length=72) 'openid_signed' => string 'op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle' (length=69) 'openid_sig' => string 'knieEHpvOc/Rxu1bkUdjeE9YbbFX3lqZDOQFxLFdau0=' (length=44) 'openid_identity' => string 'https://www.google.com/accounts/o8/id?id=AItOawk0NAa51T3xWy-oympGpxFj5CftFsmjZpY' (length=80) 'openid_claimed_id' => string 'https://www.google.com/accounts/o8/id?id=AItOawk0NAa51T3xWy-oympGpxFj5CftFsmjZpY' (length=80) i thought that openid_claimed_id or openid_identity is identical for every account but after some testing turns out the claimed id is changeable by the users them self in yahoo and randomly changing in case of gmail FYI am using zend openid with a bit modification on consumer class and i can't use SERG [Simple Refistration Extension] cuz currently it uses openid v1 specification :( i hadn't read the specification of openid so if any body know please help me to how to identify openid accounts to know if this account has signed in before or not

    Read the article

  • using action helpers in Zend Framework 1.8

    - by Nasser
    Hi am starting off with Zend Framework and have a question about action helpers. My first application is a simple authentication system (following a tutorial from a book). The registration and authentication seems to work fine but the redirect doesn't. I have a customer controller that has this among others: class CustomerController extends Zend_Controller_Action { // some code here...... public function authenticateAction() { $request = $this->getRequest(); if (!$request->isPost()) { return $this->_helper->redirector('login'); } // Validate $form = $this->_forms['login']; if (!$form->isValid($request->getPost())) { return $this->render('login'); } if (false === $this->_authService->authenticate($form->getValues())) { $form->setDescription('Login failed, please try again.'); return $this->render('login'); } return $this->_helper->redirector('index'); } the authenticate url is http://localhost/customer/authenticate and this seems to work fine but it does not redirect. After authentication I get a blank page which looks like its taking me to the index and just sits there. I tried using '/index' instead but that did not help either. Do I need to do anything special to make the redirector helper work? I have a logout action which behaves the same.

    Read the article

  • How to move a google doc into a folder using Zend Gdata

    - by Andre
    Hi Guys I am really struggling with moving a document from my root folder to another folder using zend gdata here is how i am trying to do it, but its not working. $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($gUser, $gPass, $service); $link = "https://docs.google.com/feeds/documents/private/full/spreadsheet:0AUFNVEpLOVg2U0E"; // Not real id for privacy purposes $docs = new Zend_GData_Docs($client); // Attach a category object of folder to this entry // I have tried many variations of this including attaching label categories $cat = new Zend_Gdata_App_Extension_Category('My Folder Name','http://schemas.google.com/docs/2007#folder'); $entry = $docs->getDocumentListEntry($link); $entry->setCategory(array($cat)); $return = $docs->updateEntry($entry,$entry->getEditLink()->href); When I run this I get No errors, but nothing seems to change, and the return data does not contain the new category. EDIT: Ok I realised that its not the category but the link that decides which "collection" (folder) a resource belongs too. https://developers.google.com/google-apps/documents-list/#managing_collections_and_their_contents says that each resource has as et of parent links, so I tried changing my code to do set link instead of set category, but this did not work. $folder = "https://docs.google.com/feeds/documents/private/full/folder%3A0wSFA2WHc"; $rel = "http://schemas.google.com/docs/2007#parent"; $linkObj = new Zend_Gdata_App_Extension_Link($folder,$rel,'application/atom+xml', NULL,'Folder Name'); $links = $entry->getLink(); array_push($links,$linkObj); $entry->setLink($links); $return = $docs->updateEntry($entry,$entry->getEditLink()->href); EDIT: SOLVED [nearly] OK Here is how to move/copy, sort of, from one folder to another: simpler than initially thought, but problem is it creates a reference and NOT a move! It now in both places at the same time.... // Folder you wnat to move too $folder = "https://docs.google.com/feeds/folders/private/full/folder%asdsad"; $data = $docs->insertDocument($entry, $folder); // Entry is the entry you want moved using insert automatically assigns link & category for you...

    Read the article

  • BSD route(8) MAN page bug

    - by Farseeker
    http://www.freebsd.org/cgi/man.cgi?query=route Route is a utility used to manually manipulate the network routing tables. It normally is not needed, as a system routing table management daemon such as routed(8), should tend to this task. ... BUGS The first paragraph may have slightly exaggerated routed(8)'s abilities. Is this really a "bug", or some developer's attempt at humour?

    Read the article

  • Including variables inside curly braces in a Zend config ini file on Linux

    - by Dave Morris
    I am trying to include a variable in a .ini file setting by surrounding it with curly braces, and Zend is complaining that it cannot parse it properly on Linux. It works properly on Windows, though: welcome_message = Welcome, {0}. This is the error that is being thrown on Linux: : Uncaught exception 'Zend_Config_Exception' with message 'Error parsing /var/www/html/portal/application/configs/language/messages.ini on line 10 ' in /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php:181 Stack trace: 0 /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php(201): Zend_Config_Ini-&gt;_parseIniFile('/var/www/html/p...') 1 /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php(125): Zend_Config_Ini-&gt;_loadIniFile('/var/www/html/p...') 2 /var/www/html/portal/library/Ingrain/Language/Base.php(49): Zend_Config_Ini-&gt;__construct('/var/www/html/p...', NULL) 3 /var/www/html/portal/library/Ingrain/Language/Base.php(23): Ingrain_Language_Base-&gt;setConfig('messages.ini', NULL, NULL) 4 /var/www/html/portal/library/Ingrain/Language/Messages.php(7): Ingrain_Language_Base-&gt;__construct('messages.ini', NULL, NULL, NULL) 5 /var/www/html/portal/library/Ingrain/Helper/Language.php(38): Ingrain_Language_Messages-&gt;__construct() 6 /usr/local/zend/share/ZendFramework/library/Zend/Contr in We are able to get the error to go away on Linux if we surround the braces with quotes, but that seems like a strange solution: welcome_message = Welcome, "{"0"}". Is there a better way to solve this issue for all platforms? Thanks for your help, Dave

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >