zend-framework

Zend_Paginator and cache. How can I read the datas that I have sent to cache

别等时光非礼了梦想. 提交于 2019-12-07 15:17:18
问题 I register the data to cache and I see the foliowing : zend_cache---Zend_Paginator_1_42242d5fa3c4e4b7758810c276163e8a but I can't read. $request = $this->getRequest(); $q = new Model(); $paginator = Zend_Paginator::factory($q->fetchAll()); $paginator->setCurrentPageNumber($request->getParam('p')); $paginator->setItemCountPerPage(40); $this->view->q = $paginator; $fO = array('lifetime' => 3600, 'automatic_serialization' => true); $bO = array('cache_dir'=> APPLICATION_PATH . '/cache/'); $cache

Zend Framework - how to rewrite url to seo friendly url

假如想象 提交于 2019-12-07 15:16:49
问题 I got website on Zend Framework (im total noob in Zend). For example I would like to make one URL " somewebsite.com/test/about " to look like this " somewebsite.com/for-fun-link ". How do i achieve this in Zend ? Im newbie in Zend and Apache server. Where i do rewrites in Zend ? I want static URL somewebsite.com/page/about rewrite to somewebsite.com/about-product And last question: where do i usually create rewrites ? its depends of sever/technology ? 回答1: In your bootstrap, you'll need to

Question regarding Ajax Hacking

痴心易碎 提交于 2019-12-07 14:32:35
问题 All, I have a PHP website written in Zend Framework and MVC. Most of the controller actions check if the request is an Ajax request or not, else they redirect the user to home page. I am thinking about various ways to break that site. I am considering the following scenario: A user creates his own PHP project on his Local machine. User writes a JQuery ajax post request to one of the controllers on my site and tries to post malicious info. Ex: $.ajax({ type: 'POST', url: "https://marketsite

zend_navigation and modules

丶灬走出姿态 提交于 2019-12-07 13:41:41
问题 I am developing an application at the moment with zend and I have seperated the app into modules. The default module is the main site where unlogged in users access and have free reign to look around. When you log in, depending on the user type you either go to module A or module B, which is controlled by simple ACLs. If you have access to Module A you can not access Module B and visa versa. Both user types can see the default module. Now I want to use Zend_Navigation to manage the entire

Get error while editing Customers from back end in Magento

落爺英雄遲暮 提交于 2019-12-07 13:41:29
I suddenly started encountering this error out of no where and need some help. In my Manage Customers section, when ever I add a new customer, it shows up fine with all values correct. But whenever I try to edit a newly added customer I get an error page in Magento. There has been an error processing your request. And later when I return to 'Manage Customers' grid, the 'Customer Since' column for that customer record changes to this value "30 Nov -1 01:00:00" So does any one have any idea what might be going wrong over there? This is the error in var/report folder, a:5:{i:0;s:25:"No date part

How can I implement jquery in my Zend Framework application in a custom manner?

佐手、 提交于 2019-12-07 12:58:01
问题 How can I implement jquery in my Zend Framework application in a custom manner. appending jquery.js ok appending script ok send POST data to controller ok process POSTed data ok send 'AjaxContext' respond to client now ok (thanks) I'm using jquery for the first time, what am I doing wrong? 回答1: Early on, the best practice to get Zend to respond to ajax requests without the full layout was to check a variable made available via request headers. According to the documentation many client side

XDebug not working with xampp

£可爱£侵袭症+ 提交于 2019-12-07 12:05:00
问题 I'm using (or trying to anyway) use the bundled XDebug with XAMPP 1.7.2. It comes bundled with Apache 2.2.12, PHP 5.3.0, XDebug 2.0.5 and Zend (not sure on version) This is a totally fresh install of XAMPP, the only thing I've added to php.ini (at xampp/php/php.ini) is: zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll" [xdebug] xdebug.auto_trace = 1 xdebug.collect_includes = 1 xdebug.collect_params = 1 xdebug.collect_return = 1 xdebug.default_enable = 1 xdebug.extended_info = 1

eclipse PDT: How to enable content/code assist for personal PHP libraries

a 夏天 提交于 2019-12-07 11:31:25
I am struggeling getting content/code assist to work for PHP libraries (other than Zend) in my Zend Framework project folder: library Doctrine Zend (<-works with code assist...) ZendX Content assist remains blank when using this libraries... Any suggestions? Thanks, Udo Content Assist is available for any compatible resources in the include path. Right click your project folder. Then Include Path . Then Configure Include Path . A window will appear. Configure any needed resources. Further Information in the Zend Studio Manual: Adding Elements to a Project Include Path Include Paths Code Assist

How to convert .po to PHP array (Zend Framework) with Translate Toolkit?

ε祈祈猫儿з 提交于 2019-12-07 11:19:33
问题 I am trying to use po2php to convert my .po file to Zend php translations array. I am simply trying this: $ po2php translations.po translations.php , but this results in an error that I do not understand: po2php: warning: Couldn't handle input file translations.po: don't know what to do with input format .po, no template file . I do not know what a template file is an why should I provide it? UPDATE: I also tried $ po2php translations.po translations.php -t messages.pot , but this does not

recommendation for a php validation framework

萝らか妹 提交于 2019-12-07 11:14:39
问题 I'm validating allot of fields now in PHP, and I have to preform basic (string length ect.) and more complex (strip <> tags, for example) Can anyone recommend a class that does this, or maybe a framework, or maybe some functions that do these things? 回答1: I assume you're validating POSTed forms: use Zend_Form and Zend_Filter 回答2: If you're using PHP >= 5.2.0 then you can use PHP's built in filter functions. In particular, have a look at filter_var_array, which you can use to validate an array