zend-framework

ZF2 - Session dump on page change / refresh

こ雲淡風輕ζ 提交于 2019-12-13 06:49:38
问题 Last week i asked a question which is still unresolved (unfortunately). Here is the link : ZF2 empty session container between pages I'm opening a new question today because i found more understandable clues to explain my problem. This is very simple : Zend Framework 2 and/or PHP dump/purge my session containers on every single page load or refresh. It's even working like this with or without AJAX calls. Whatever i do, i can't persist my session datas because all is reset permanently. I tried

Base controller for all controllers in zend framework

ε祈祈猫儿з 提交于 2019-12-13 06:44:15
问题 I'm new to zend framework and I want to ask if is it possible to have a base controller that will be extended by all other controllers? I want to have a base class wherein I'll put all common methods and properties for all controllers I'll have on my project. Is it advisable to do this with zend or is there a better approach to this? 回答1: You could just make a base class which extends Zend_Controller_Action. Then use that as the base class for all of your controllers. Although, depending on

How to configure Zend Framework on linux machine? [closed]

[亡魂溺海] 提交于 2019-12-13 06:35:54
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago . How to configure Zend Framework on linux machine? 回答1: There are several good entrypoints in the official Zend Framework Documentation. Installaion Learning Zend Framework Zend Framework Quick Start Especially

How do I setup Zend Framework with WAMP?

笑着哭i 提交于 2019-12-13 06:32:56
问题 I read that to include the Zend framework, I must include this on the include path in php.ini. But I have a doubt. Where do I find the php.ini file in my WAMP with php 5.3.0? Please help me because I am new to this topic and also to PHP... 回答1: i see the info you are talkin about (koen) but i wrote a simple helloworld.php in zend and i am tryin to run it so it takes me to a browser or it uses its own browser... but when i click the "run as php web page", it tells me it cant find the localhost

How to remove index.php from url in Zend Framework

梦想的初衷 提交于 2019-12-13 06:27:11
问题 I am developing this app using Zend Framework 1.12. I wan to get rid off the index.php using .htaccess. Right now my url looks like this: http://foo.com:10080/Reports_Century/public/index.php/reports/neworders I want to be able to look like this http://foo.com:10080/Reports_Century/public/reports/neworders Is it possible? my htaccess looks has the following lines: RewriteEngine On RewriteCond% {REQUEST_FILENAME}-s [OR] RewriteCond% {REQUEST_FILENAME}-l [OR] RewriteCond% {REQUEST_FILENAME}-d

PHP, Zend, require_once: “failed to open stream” and “Failed opening required […]”

大憨熊 提交于 2019-12-13 06:25:31
问题 I'm going nuts! I've been SO'ing and Googling for 2 hours now. In short, things were working fine, and then I did some class-restructuring, and now I'm getting this: Warning: require_once(Zend/Mail/Transport/Sendmail.php) [function.require-once]: failed to open stream: No such file or directory in /nfs/c09/h02/mnt/136160/domains/xyz.com/html/sandbox/Zend/Mail.php on line 1175 Fatal error: require_once() [function.require]: Failed opening required 'Zend/Mail/Transport/Sendmail.php' (include

Retrieve only specific columns of spreadsheet with zend gdata from gdocs

喜夏-厌秋 提交于 2019-12-13 06:06:25
问题 I am working with relatively large spreadsheets from gdocs and access them via the zend library. I only need certain columns at any given time so in order to save memory it would be helpful to use the list-based feed to only retrieve these certain columns and not the whole spreadsheet. The basic query I am using is according to the zend documentation $query = new Zend_Gdata_Spreadsheets_ListQuery(); $query->setSpreadsheetKey($spreadsheetKey); $query->setWorksheetId($worksheetId); $listFeed =

Zend Framework 2 - get the new filename when uploading using a validator for inputfilter

醉酒当歌 提交于 2019-12-13 05:49:16
问题 I am new to ZF2, and I am trying to upload a file and use the "randomize" option of the Rename file adapter filter inside the validator. In the model I have this: public function getInputFilter() { $inputFilter = new InputFilter(); $inputFilter->add(array( 'name' => 'picture', 'required' => call_user_func(function() use ($prize_type_id){ if(isset($this->picture_old) && !empty($this->picture_old)){ return false; } if(in_array($prize_type_id, array(1,2,3,5))){ return true; }else{ return false;

Returns 302 error in phpunit when the site redirection works fine

醉酒当歌 提交于 2019-12-13 05:45:08
问题 When doing unit testing using PhpUnit in ZF2, the following message shows up: Failed asserting that 302 matches expected 200 I understand that it shown up because of the redirection command of ZF2: return $this->redirect()->toUrl('/admin/album/add'); But when I access it in the browser, the site works find with the above code. But it fails in the unit testing. What should I have to change? 回答1: A browser is not the same as unit testing or vice versa. Your expectations or results are different

Return object with Zend_Soap

拥有回忆 提交于 2019-12-13 05:27:29
问题 I would like to return an object using Zend_Soap. I also want the object given in the WSDL file. But I can't get both to work together. It's either one or the other. 1. WSDL working, but object not returning If in the phpdoc of my function on the soap server script, I write @return Application_Model_Soap_Test I can see it in the WSDL file <message name="getPostcodeOut"> <part name="return" type="tns:Application_Model_Soap_Test"/> </message> but when I run the script, it returns an empty class