Search Results

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

Page 88/452 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • zend_captcha always fails isValid()

    - by Grant Collins
    Hi, I've got an issue with Zend_Captcha always returning false when the page is submitted and the captcha's isValid() method is being called. It's driving my nuts because this as far as I am concerned should work. I start by declaring this at the top of the action function of the controller $captcha = new Zend_Captcha_Image('captcha', array( 'captcha' => array( 'name' => 'graduatesignupcaptcha', 'wordlen' => 6, 'font' => $this->config->captcha->font, 'imgDir' => $baseUrl.'/images/captcha/', 'imgUrl' => $this->config->webserver->name.'/images/captcha/', ) ) ); $captcha->setHeight(80) ->setTimeout(300); I do usual form validation and that all works, however it is when I come to validate that the value entered into form for the captcha it always returns false. //next we check the captcha text to ensure that the form is a person not a script $captchaText = $form->getElement('captchainput')->getValue(); $captchaId = $form->getElement('captchaid')->getValue(); //$captchaSession = new Zend_Session_Namespace('Zend_Form_Captcha_'.$captchaId); $captchaArray = array( 'id' => $captchaId, 'input' => $captchaText ); if(!$captcha->isValid($captchaArray)){ $log->log(implode(",",$captcha->getErrors()), Zend_Log::DEBUG); $form->getElement('captchainput')->setErrors(array('messages' => 'Bad security code')); $formFailed = true; } I've check to ensure that the id that I am getting and storing as a hidden element in my form match the image that is being generated but no matter what I do this always fails. Am I missing something simple here?? Or is there a better way of dealing with this?? Thanks,

    Read the article

  • ZF: How can I modify the error message for the required / notempty validator in the ini file

    - by heininger
    I'ld like to configure my forms using config with an ini file. I need individualized error messages like the following one: suche.elements.methode.options.validators.strlen.options.messages.stringLengthTooLong = "Der Suchbegriff '%value%' ist zu lang!" This works well for strlen and regex, but how do I set it up for "required" elements? I tried stuff like suche.elements.methode.options.validators.notempty.options.messages.isEmpty = "Der Suchbegriff darf nicht leer sein!" but this throws exceptions.

    Read the article

  • Ubuntu 12.04.3 alongside Windows 8.1

    - by user208329
    I brought a new Notebook which has pre-installed Windows 8.1 with an uefi* (-Bios) and secure boot*. (* can switch or turn so off, still no success) When i try to install Ubuntu 12.04.3, the installer doesn't recognize Windows 8.1. There were options, to delete the whole disk or do something else. The second option, shows a few partitions (NTFS) but no Windows. The Ubuntu 13.10 version even did start on my notebook, it gets frozen during start up. (I thought. maybe the newer one will recognize Windows.) I'm not very confident in manipulating grub, I hope there is an easy way or an easy description. Gparted shows: Device Type Size Used /dev/sda freespace 1MB /dev/sda ntfs 1073MB 408MB /dev/sda2 efi 104MB 52MB /dev/sda3 ntfs 134MB 45MB /dev/sda4 ntfs 988465MB 23947MB /dev/sda5 ntfs 10424MB 9483MB free space 0MB /dev/sdb1 fat32 16929MB 9412MB (USB-drive Ubuntu-image)

    Read the article

  • How do I get secure AuthSub session tokens in PHP ?

    - by robertdd
    I am using the Google/YouTube APIs to develop web application which needs access to a users YouTube account. Normal unsecure requests work fine and I can upgrade one time tokens to session tokens without any hassle. The problem comes when I try and upgrade a secure token to a session token, I get: ERROR - Token upgrade for CIzF3546351vmq_P____834654G failed : Token upgrade failed. Reason: Invalid AuthSub header. Error 401 i use this: function updateAuthSubToken($singleUseToken) { try { $client = new Zend_Gdata_HttpClient(); $client->setAuthSubPrivateKeyFile('/home/www/key.pem', null, true); $sessionToken = Zend_Gdata_AuthSub::AuthSubRevokeToken($sessionToken, $client); $client->setAuthSubToken($sessionToken); } catch (Zend_Gdata_App_Exception $e) { print 'ERROR - Token upgrade for ' . $singleUseToken . ' failed : ' . $e->getMessage(); return; } $_SESSION['sessionToken'] = $sessionToken; generateUrlInformation(); header('Location: ' . $_SESSION['homeUrl']); }

    Read the article

  • how to properly display utf encoded characters on my utf-8 encoded page?

    - by Ali
    Hi guys I'm retrieving emails and some of my emails have utf encoded text. However even though my page is encoded as utf 8 - in some places when I try to out put utf text I get funny characters like : =?utf-8?B?Rlc6INqp24zYpyDYotm+INin2LMg2YXYs9qp2LHYp9uB2bkg2qnbjCDZhtmC?= =?utf-8?B?2YQg2qnYsdiz2qnYqtuSINuB24zaug==?= Whereas in other areas of the same page it displays fine. WHats going on?

    Read the article

  • How do I get the Zend_Application's database into a model class?

    - by Billy ONeal
    I have a Zend_Framework application, which has a whole bunch of model classes. I need these model classes to be able to access the application's database (naturally). Currently I've put this in my index.php: Zend_Registry::set('db', $application->bootstrap()->getBootstrap() ->getPluginResource('db')->getDbAdapter()); And then $db = Zend_Registry::get('db'); in each of my model classes that require the database. But this seems like a horrible horrible hack. Am I missing something basic here?

    Read the article

  • Zend_DB_Table Update problem

    - by davykiash
    Am trying to construct a simple update query in my model class Model_DbTable_Account extends Zend_Db_Table_Abstract { protected $_name = 'accounts'; public function activateaccount($activationcode) { $data = array( 'accounts_status' => 'active', ); $this->update($data, 'accounts_activationkey = ' . $activationcode); } However I get an SQLSTATE[42S22]: Column not found: 1054 Unknown column 'my activation code value' in 'where clause' error. What am I missing in Zend_Table update construct?

    Read the article

  • i demand you all men to help

    - by Hello you all men
    you all men i demand answer, you say not real question?? many page get big load for long time and now we are suspended and http://stackoverflow.com/questions/2890840/how-can-we-make-our-website-scalable and please you help men very sorry -bern

    Read the article

  • Ignore SSL errors in Zend_Http_Client

    - by webdestroya
    In PHP curl there are two functions used to ignore all SSL errors (invalid cert, self signed, expired, so on): curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); I am switching over to use Zend_Http_Client, but I can't seem to find a way to force it to ignore errors. (I don't have a way to test it just yet, I wanted to see if anybody has done this before) So, does anybody know the equivalent function/functions to do this in Zend_Http_Client?

    Read the article

  • Invalid parameter number: number of bound variables does not match number of tokens

    - by Alex
    I have a table: 'objects' with few columns: object_id:int, object_type:int, object_status:int, object_lati:float, object_long:float My query is : $stmt = $db->query('SELECT o.object_id, o.object_type, o.object_status, o.object_lati, o.object_long FROM objects o WHERE o.object_id = 1'); $res = $stmt->fetch(); Pdo throw error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens When i remove column object_lati or object_long query is work fine.

    Read the article

  • Magento Set Grid to Filter Automatically by Current Day using Existing Datetime Column in Grid

    - by Tegan Snyder
    In Magento I'm creating a custom module and would love to be able to filter automatically by the datetime column so that the intial grid listing shows only entities related to "todays" date. Here is my datetime column: $this->addColumn('ts', array( 'header' => $hlp->__('Activated'), 'align' => 'left', 'index' => 'ts', 'type' => 'datetime', 'width' => '160px', )); I'm think there should be a way for me to just add a filter to the collection like so: $now = Mage::getModel('core/date')->timestamp(time()); $dateTime = date('m/d/y h:i:s', $now); $collection = Mage::getModel('mymodule/items')->getCollection() ->addFieldToFilter('ts', $dateTime); But this doesn't work? Am I using the wrong filter? My "ts" field in the database is a "datetime" field, but the default magento "From: " - "To:" date range selectors don't use hours, minutes, seconds. Any ideas? Thanks, Tegan

    Read the article

  • Sales by Category in Magento?

    - by Tegan Snyder
    We have a category called "Clearance" on our Magento website. Ideally it would be nice to be able to get a report of all orders sold in that category. Is there anyway I can join the orders collection with the products collection and filter by category id? Here is a similar thread: http://www.magentocommerce.com/boards/viewthread/44296/ Any ideas, or am I crazy? It doesn't need to be pretty.

    Read the article

  • 404 Not Found When Requesting URI With Encoded Patameters

    - by Richard Knop
    I am pretty sure this is some problem with the Apache configuration because it used to work on the previous hosting provider with the same PHP/MySQL configuration. In my application, users are able to delete photos by going to URIs like this: http://example.com/my-account/remove-media/id/9/ret/my-account%252Fedit-album%252Fid%252F1 The paramater id is an id of a photo to be removed, the parameter ret is a relative URL where user should be redirected after the removal of the photo but after clicking on a link like that I get 404 Not Found error with the text: Not Found The requested URL /public/my-account/remove-media/id/9/ret/my-account/edit-album/id/1 was not found on this server. Though it used to work on my previous hosting provider so I guess it is just some easy Apache configuration issue? One more thing, there is a htaccess file that changes the document root to /public: RewriteEngine On php_value upload_max_filesize 15M php_value post_max_size 15M php_value max_execution_time 200 php_value max_input_time 200 # Exclude some directories from URI rewriting #RewriteRule ^(dir1|dir2|dir3) - [L] RewriteRule ^\.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} !^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^public/.*$ /public/index.php [NC,L] In the public folder there is a second htaccess file for MVC: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] # Turn off magic quotes #php_flag magic_quotes_gpc off

    Read the article

  • What is the purpose of return'ing $this when setting vars in the model

    - by TaMeR
    I am a self thought hobby programmer and therefore don't have the fundamentals always down the way you professionals do. So please excuse me if this is basic. What is the purpose or benefit of return'ing $this when setting vars in the model. I have seen this done in other places too but cant figure this out. Sample code: public function setAlias($Alias){ $this->_Alias = (string) $Alias; return $this; } public function getAlias(){ return $this->_Alias; }

    Read the article

  • Zend_XmlRpc :Failed to parse response error

    - by davykiash
    Am trying to get a simple hello world XMLRPC server setup to work.However I get this Failed to parse response error error when I run the test URL http://localhost/client/index/ on my browser In my Rpc Controller that handles all my XMLRPC calls class RpcController extends Zend_Controller_Action { public function init() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); } public function xmlrpcAction() { $server = new Zend_XmlRpc_Server(); $server->setClass('Service_Rpctest','test'); $server->handle(); } } In my client Controller that calls the XMLRPC Server class ClientController extends Zend_Controller_Action { public function indexAction() { $clientrpc = new Zend_XmlRpc_Client('http://localhost/rpc/xmlrpc/'); //Render Output to the view $this->view->rpcvalue = $clientrpc->call('test.sayHello'); } } In my Service_Rpctest function <?php class Service_Rpctest { /** * Return the Hello String * * @return string */ public function sayHello() { $value = 'Hello'; return $value; } } What am I missing?

    Read the article

  • Force usb to use same device id, instead of new one

    - by m s kumar
    I am having some trouble in automating the task. I am testing some android based mobiles in linux machine. The automation script uses the device id under "/dev/bus/usb/001/"053" it will be always under bus 001 only.. But the dev is will be random like if i insert one mobile then the dev id will be 053, if remove and insert it again then the dev id will be 054.. The problem is, when some tests runs on the device and if device gets rebooted then new dev id is showing for the rebooted one and my scripts failing due to new dev id.. Is there any way to force usb devices to use same dev id instead of new one. So that there will be no issues to my tests even after device reboots. Thanks in advance.

    Read the article

  • magento, making a grouped product show on sale based on product children prices

    - by thrice801
    Hi, Question regarding Magento and sale items. So I have to use grouped items to link multiple items which are the same style but different colors, these are the items I have showing on my search results/category pages. - I am trying to figure out how I can make the master sku, show as on sale, when the children items are marked on sale. I am able to make it show up on the product page, but anytime I have tried calling any of the getchildren methods outside of grouped.phtml, I have failed, horribly. I think I worked on that method for probably 36 hours unsuccessfully calling it from any other page. So, I thought I would ask here. Does anyone know how I could call the getchildskus or whatever it is method, from the category page, so that I can do something like, for each child product, compare sale price with active price, if there is a difference, calculate the percentage off, and display the largest difference as "ON SALE, UP TO 30% OFF!", or whatever it may be? Any help would be much appreciated. (oh, and I cant set a price on the main group sku, I sell sunglasses and watches mainly and many times a different color will differ in price quite significantly.)

    Read the article

  • Zend_Validate_Abstract custom validator not displaying correct error messages.

    - by Jeremy Dowell
    I have two text fields in a form that I need to make sure neither have empty values nor contain the same string. The custom validator that I wrote extends Zend_Validate_Abstract and works correctly in that it passes back the correct error messages. In this case either: isEmpty or isMatch. However, the documentation says to use addErrorMessages to define the correct error messages to be displayed. in this case, i have attached ->addErrorMessages(array("isEmpty"=>"foo", "isMatch"=>"bar")); to the form field. According to everything I've read, if I return "isEmpty" from isValid(), my error message should read "foo" and if i return "isMatch" then it should read "bar". This is not the case I'm running into though. If I return false from is valid, no matter what i set $this-_error() to be, my error message displays "foo", or whatever I have at index[0] of the error messages array. If I don't define errorMessages, then I just get the error code I passed back for the display and I get the proper one, depending on what I passed back. How do I catch the error code and display the correct error message in my form? The fix I have implemented, until I figure it out properly, is to pass back the full message as the errorcode from the custom validator. This will work in this instance, but the error message is specific to this page and doesn't really allow for re-use of code. Things I have already tried: I have already tried validator chaining so that my custom validator only checks for matches: ->setRequired("true") ->addValidator("NotEmpty") ->addErrorMessage("URL May Not Be Empty") ->addValidator([*customValidator]*) ->addErrorMessage("X and Y urls may not be the same") But again, if either throws an error, the last error message to be set displays, regardless of what the error truly is. I'm not entirely sure where to go from here. Any suggestions?

    Read the article

  • Image Magic Make Fails - PHP extension

    - by Kyle Adams
    So I was doing the following: sudo apt-get install php-pear php5-dev sudo apt-get install imagemagick libmagickwand-dev sudo pecl install imagick It all works till I get the error: make: *** [imagick_class.lo] Error 1 ERROR: `make' failed Which according to blog posts and forms is because of libmagick9-dev, how ever when trying to install this I get: sudo apt-get install libmagick9-dev Reading package lists... Done Building dependency tree Reading state information... Done Package libmagick9-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: graphicsmagick-libmagick-dev-compat E: Package 'libmagick9-dev' has no installation candidate Thoughts?

    Read the article

  • Cannot access new product attributes in grid display

    - by russjman
    I added a couple new attribute to my products(a boolean "yes/no" fields). They are variables to enable/disable the price from displaying on the product detail page, and grid view. I managed to get it work on the product info page. But on product grid page I cant seem to access those variable. Specifically, the template i am working with is catalog/product/list.phtml. Ive tried adding them in the xml file like this layout/catalog.xml: <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"> <action method="addAttribute"><name>DisplayPrice</name></action> <action method="addAttribute"><name>CustomOrder</name></action> </block> and I am trying to access the attributes like so in catalog/product/list.phtml: <?php echo $_product->getDisplayPriceName()? "Yes" : "No" ; echo $_product->getCustomOrderName()? "Yes" : "No" ;?> ive also added in the Mage config file app/code/core/Catalog/etc/config.xml: <frontend> <!---- stuff before this --> <product> <collection> <attributes> <name /> <url_key /> <price /> <special_price /> <custom_order /> <!--new attribute --> <display_price /> <!--new attribute --> <special_from_date /> <special_to_date /> <short_description /> <thumbnail /> <small_image /> <image_label /> <thumbnail_label /> <small_image_label /> <tax_class_id /> <status /> <news_from_date /> <news_to_date /> <created_at /> <updated_at /> </attributes> </collection> </product> </frontend> At this point im shooting in the dark. I dont know enough about the Magento backend to know where else i need to go or look. ANY feed back will be greatly appreciated. thanks in advance.

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >