Search Results

Search found 11280 results on 452 pages for 'zend newbie dev'.

Page 27/452 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Debugging with Zend Studio / Eclipse

    - by Tower
    Hi, Is it possible to debug PHP scripts so that it keeps running until an expression is true? For example, I want to know when $a becomes a certain value. I don't want to keep pressing step into and wait until the variable $a changes the value to it.

    Read the article

  • Zend Framework: Zend_translate and routing related issue

    - by Dan
    I have implemented Zend_Navigation, Zend_Translate in my application. The routing is setup in Bootstrap.php like below. $fc = Zend_Controller_Front::getInstance(); $zl=new Zend_Locale(); Zend_Registry::set('Zend_Locale',$zl); $lang=$zl->getLanguage().'_'.$zl->getRegion(); $router = $fc->getRouter(); $route = new Zend_Controller_Router_Route(':lang/:module/:controller/:action/*', array( 'lang'=>$lang, 'module'=>'default', 'controller'=>'index', 'action'=>'index' )); $router->addRoute('default', $route); $fc->setRouter($router); $fc->registerPlugin( new Plugin_LanguageSetup()); in LaunguageSetup Plugin i have defined the dispatchLoopStartup method to do the checking of the language param public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { $this->createLangUrl($request); $this->_language = $request->getParam('lang'); if ((!isset($this->_language)) || !in_array($this->_language, $this->_languagesArray)) { $this->_language = 'en_US'; $request->setParam('lang', 'en_US'); } $file = APPLICATION_PATH.$this->_directory.$this->_language.'.csv'; $translate = new Zend_Translate('csv', $file, $this->_language); Zend_Registry::set('Zend_Translate', $translate); $zl = Zend_Registry::get('Zend_Locale'); $zl->setLocale($this->_language); Zend_Registry::set('Zend_Locale', $zl); // $fc = Zend_Controller_Front::getInstance(); // $router = $fc->getRouter(); // $route = new Zend_Controller_Router_Route(':lang/:module/:controller/:action/*', array( // 'lang'=>$this->_language, 'module'=>'default', 'controller'=>'index', 'action'=>'index' // )); // $router->addRoute('default', $route); // $fc->setRouter($router); } What happen is the language always have the default value, the 'lang' param never default lang value in route, even if i type it in the address bar manually i.e /en_US/module/controller/action/ It always get revert back to the default Zend_locale(); Only way i can fix it is to setup the route again in the plugin and inject a correct language value as default. Any Idea why?

    Read the article

  • My method is being recognized within my own program. Newbie mistake probably.

    - by Sergio Tapia
    Here's my code: sentenceToTranslate = raw_input("Please write in the sentence you want to translate: ") words = sentenceToTranslate.split(" ") for word in words: if isVowel(word[0]): print "TEST" def isVowel(letter): if letter.lower() == "a" or letter.lower() == "e" or letter.lower() == "i" or letter.lower() == "o" or letter.lower() == "u": return True else: return False The error I get is: NameError: name 'isVowel' is not defined What am I doing wrong?

    Read the article

  • Zend Framework: Flash Messenger, add a message from the model

    - by Dan
    Any idea on how best to add a message to flash messenger from the model? As FlashMessenger is an action helper, this seems not to be possible, so the obvious solution is to create an internal message object in the model, and return that to the controller from where you can use addMessage(). But if you want to return something else as well, this falls down. Another idea is an additional session namespace for these internal messages, which is then merged in with the Flash Messenger namespace messages at output time? Anyone have any thoughts or experience on this? Cheers.

    Read the article

  • Calling a wsdl in php over https using Zend Soap Client

    - by Sam Segers
    When I'm trying to connect to a webservice I always get the next fault SoapFault exception: [s:Sender] An error occurred when verifying security for the message I have to use a security header like: <o:Security env:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsu:Timestamp env:mustUnderstand="1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Created>2010-06-10T08:22:59Z</wsu:Created> <wsu:Expires>2010-06-12T10:22:59Z</wsu:Expires> </wsu:Timestamp> <o:UsernameToken> <o:Username>myUsername</o:Username> <o:Password>myPassword</o:Password> </o:UsernameToken> </o:Security> My username and password are correct, I have allready tried to change the expiration date later but that doesn't solve it. What else could be the reason for this fault?

    Read the article

  • Route all requests through PageController except existing controllers (Zend Framework)

    - by ChrisRamakers
    For a new CMS i've developed a Pages module that allows me to manage the site's tree structure. Each page is reachable from the url http://www.example.com/pageslug/ where pageslug identifies the page being called. What I want to achieve now is a route that allows me to route all incoming requests to a single PagesController unless it's a request to an existing controller (like images for example). It's easy enough to catch all requests to the Pages Controller but how to exclude existing controllers? This is my module bootstrap. How can i achieve this in the most preferrable way <?php class Default_Bootstrap extends Zend_Application_Module_Bootstrap { protected function _initRoute() { $this->bootstrap('frontController'); /* @var $frontcontroller Zend_Controller_Front */ $frontcontroller = $this->getResource('frontController'); $router = $frontcontroller->getRouter(); $router->addRoute( 'all', new Zend_Controller_Router_Route('*', array('controller' => 'pages', 'action' => 'view') ) ); } }

    Read the article

  • Zend framework currency validation

    - by Dan
    How can I validate (a form element in this case) to ensure that the value is a currency? Have looked at Zend_Validate_Float. Needs to check that value is between 0 and 2dp. Ideally locale-aware (as ZVF is) to allow for locale specific formatting (thousands, decimal as comma/dot) Would also want to extend to allow/disallow negative values And provide optional upper/lower limits. Is the key, as I can do 3. and 4. with a chain. Do I need regex?

    Read the article

  • Zend remove anchor text in url redirect

    - by user351785
    I have a form that is using an anchor name as it's action so that when the form is submitted it is it goes straight back to the form (for example 'www.domain.com/page#contact-form). The idea is if there are any errors then it'll go straight to the form (that's near the bottom of the page) so you can see the errors and continue filling in the form. If the form is valid, I want it to redirect to another page (for example www.domain.com/another-page). The problem is that the redirect url still has the anchor text in the url (in the above example it is www.domain.com/another-page#contact-form). I am using $this->_helper->redirector->goToRouteAndExit(array(), 'another-page', true); to goto the another-page route. I have tried setting the url specifically but that doesn't fix it either. How do I redirect to another page and remove that anchor text from the url?

    Read the article

  • Not Recieving JSON object into my Zend Controller

    - by davykiash
    Am am sucessfully parsing and sending json values from my client for my server side controller to recieve and parse $("#test2").click(function() { $.ajax({ type: "POST", url: "<?php echo $this->baseUrl() ?>/expensetypes/add", data: JSON.stringify(wrapFormValues($('#expensetypes'))), contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg){ alert( "Data Saved: " + msg ); } }); }); However in my controller the code $this->getRequest()->getPost() doesnt seem to recieve the json object that my client is sending though firebug clearly shows that my json object is being parsed and sent. What am I missing?

    Read the article

  • Zend Framework - no public folder

    - by poru
    Hello, I'm going to host an app on a shared host and there I couldn't create virtual host or change something at apache. Often apps with ZF looks like that: root public index.php .htaccess application library I have sth. like that: root application index.php .htaccess All my code is in the application folder. But there are also some .ini and .xml files with sensitive information e.g. login names and passwords and so on... If I add a .htaccess in the application folder with deny from all is the information secure inside the folder?

    Read the article

  • Using Zend Framework and Doctrine with independend modular structures

    - by stefax
    I've seen a lot of articles about integrating ZF and Doctrine. There is also a proposal for ZF here but they have always two possible structures. Either they put all models into one top level model directory or they put it into a module related model directory. application |-- Bootstrap.php |-- configs |-- controllers |-- models - EITHER HERE |-- modules | -- examplemodule | |-- controllers | |-- models - OR HERE | |-- views |-- views For our projects I see problems for either of the two options: 1. One directory: application/models - in a complex system after a short time there will be hundreds of files, over all when you have the table classes two (e.g. User.php and UserTable.php). 2. Module based model directories: application/modules/examplemodule/models - in many cases we use models in multiple modules at the same time. So the "User" is required e.g. in the modules "game", "administration", ... Is there a way to use some kind of sub directories under the top level directory "models" to get some grouping. It should be completely independent of the module structure. application |-- Bootstrap.php ... |-- models | -- user | |-- User.php | |-- Friend.php | |-- other user related models | -- game | |-- Game.php | |-- Score.php | |-- ... ... Any solution should support autoloading and the class generation from yaml files. Any ideas, links or solutions? Thanks!

    Read the article

  • Zend: Fetching row from session db table after generating session id

    - by Nux
    Hi, I'm trying to update the session table used by Zend_Session_SaveHandler_DbTable directly after authenticating the user and writing the session to the DB. But I can neither update nor fetch the newly inserted row, even though the session id I use to check (Zend_Session::getId()) is valid and the row is indeed inserted into the table. Upon fetching all session ids (on the same request) the one I newly inserted is missing from the results. It does appear in the results if I fetch it with something else. I've checked whether it is a problem with transactions and that does not seem to be the problem - there is no active transaction when I'm fetching the results. I've also tried fetching a few seconds after writing using sleep(), which doesn't help. $auth->getStorage()->write($ident); //sleep(1) $update = $this->db->update('session', array('uid' => $ident->user_id), 'id='.$this->db->quote(Zend_Session::getId())); $qload = 'SELECT id FROM session'; $load = $this->db->fetchAll($qload); echo $qload; print_r($load); $update fails. $load doesn't contain the row that was written with $auth-getStorage()-write($identity). $qload does contain the correct query - copying it to somewhere else leads to the expected result, that is the inserted row is included in the results. Database used is MySQL - InnoDB. If someone knows how to directly fix this (i.e. on the same request, not doing something like updating after redirecting to another page) without modifying Zend_Session_SaveHandler_DbTable: Thank you very much!

    Read the article

  • Trouble with this Python newbie exercise. Using Lists and finding if two adjacent elements are the s

    - by Sergio Tapia
    Here's what I got: # D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_adjacent(nums): for number in nums: numberHolder = number # +++your code here+++ return I'm kind of stuck here. What can I do?

    Read the article

  • addmultioption array problem in Zend

    - by davykiash
    Am trying to add options in my Zend_Form_Element_Select element $monthvalues = new Zend_Form_Element_Select('month_values'); $table = new Model_DbTable_Options(); $monthvalues->addMultiOptions($table->Months()) In my Model_DbTable_Options model I have public function Months() { $array = array( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec', ); return $array; } It aint giving me the desired outcome. Whats missing?

    Read the article

  • Trouble using the ref keyword. Very newbie question!

    - by Sergio Tapia
    Here's my class: public class UserInformation { public string Username { get; set; } public string ComputerName { get; set; } public string Workgroup { get; set; } public string OperatingSystem { get; set; } public string Processor { get; set; } public string RAM { get; set; } public string IPAddress { get; set; } public UserInformation GetUserInformation() { var CompleteInformation = new UserInformation(); GetPersonalDetails(ref CompleteInformation); GetMachineDetails(ref CompleteInformation); return CompleteInformation; } private void GetPersonalDetails(ref UserInformation CompleteInformation) { } private void GetMachineDetails(ref UserInformation CompleteInformation) { } } I'm under the impression that the ref keyword tells the computer to use the same variable and not create a new one. Am I using it correctly? Do I have to use ref on both the calling code line and the actual method implementation?

    Read the article

  • Zend Framework And Parameters

    - by Randy Mayer
    Hi! Is there any way how to view all sent parameters if I do not know their name? For example, I sent these parameters: id = 1 (GET) name = 'John' (GET) surname = 'Smith' (GET) Example $request = $this->getRequest(); echo $request->getParam[0]; // Will output 1 echo $request->getParam[1]; // Will output 'John' echo $request->getParam[2]; // Will output 'Smith' Thank you! (I'm not a native English speaker.)

    Read the article

  • zend framework can't find Model classes ?

    - by user284503
    Yall: I have a simple question, it might be a simple configuration issue, but I have a Model defined, and when I try to access it from a controller it fails. The Model is in the model directory, and when I look at the quickstart app, it seems like this should work. Here is my model: <?php class Application_Model_User { protected $_user; protected $_password; protected $_userId; // very simple right } ?> My controller just stops.. here is the controller code: <?php class UserController extends Zend_Controller_Action { public function init() { } public function indexAction() { // display login form $users = new Application_Model_User(); echo "test never echos.. stopped above ? weird huh.."; // fails before .. } ?> Thank you everyone,

    Read the article

  • Suspend file validation on Zend Framework

    - by dimitris mistriotis
    Hi, Currently on my application I have a form where I ask the user to upload an image file to be used as a logo. I want to allow the user to reset that to nothing by supplying no file (by just pressing the upload button from the browser). In this scenario the only thing left is to suspend file validation when no file is included. Currently I get the *self::NO_FILE* error from the *Zend_Validate_File_Upload* class. Is there any way to suspend the validation so that nothing will be checked if no file has been provided?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >