zend-framework

Class 'PharData' not found

我的梦境 提交于 2019-12-11 05:15:37
问题 I get this error on my production server (CentOS 5.4 and php 5.3.5) : Warning: include_once(PharData.php): failed to open stream: No such file or directory in /var/www/ZendFramework/library/Zend/Loader.php on line 146 Warning: include_once(): Failed opening 'PharData.php' for inclusion (include_path='/var/www/fw:/var/www/vmms:/var/www/ZendFw/library:.:/usr/share/pear:/usr/share/php') in /var/www/ZendFw/library/Zend/Loader.php on line 146 Fatal error: Class 'PharData' not found in /var/www/vm

Vhost Zend Framework configuration MAMP - redirected to the index page of the server

孤街醉人 提交于 2019-12-11 05:07:14
问题 I have checked out the posts and made the appropriate changes to the configuration files to make zend framework 2 to work on my local environment. Everything goes fine but the redirection of the page on specifying the vhost name doesnot work appropriately. It displays me the home page of the MAMP server with the directory listing. Here is what I have done till now: httpd.conf <VirtualHost *:80> ServerName newportalcopper.localhost DocumentRoot /Applications/MAMP/htdocs/NewPortalCopper/public

Zend_Form with xthml scripts (without using decorators)

不打扰是莪最后的温柔 提交于 2019-12-11 05:05:55
问题 (I follow this post to got the logic how to use Zend_Form without using decorators.) within the action I create Zend_Form object and assigned the form to the view before rendering it: public function indexAction() { $form = new Zend_Form(); $form->setAction('process') ->setMethod('post'); $username = $form->createElement('text','username'); $username->addValidator('alnum') ->setRequired(true) ->addFilter('StringtoLower'); $description = $form->createElement('textarea','description');

ZF3 - Populate Select from Database

大城市里の小女人 提交于 2019-12-11 05:03:32
问题 I'm doing some work using Zend Framework 3 and I need to display in the form a select populated with options comming from the database. I am using SQL Abstraction used in the Zend Tutorial blog part. The idea is to show the form that is already build and add a simple select with data returned from a different table, all the form is working using the users table (which has the country id) and i would like to link that id to the correct table and then show all the countries in the select..

Zend Form captcha Decorator

守給你的承諾、 提交于 2019-12-11 04:49:59
问题 Zend Captcha generates 3 elements together are captcha image, hidden input element, input text box for captcha code respectively and places them side by side without any separator. I want to decorate captcha image tag only in captcha element being generated by zend form captcha. And leave input elements intact. I don't want to create custom decorator class for it. Is there any way to do this? I delve into zend decorator where I see $_separator variable. Can it be helpful? Please help. 回答1:

How to display a web page and keep its location a secret?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 04:48:44
问题 Background: I have a PHP based (Zend Framework) application. It is secure, and only users who have been invited are able to access its resources. One of the resources that I want to keep secure is a link to a private Google Calendar. This is a public link, but I want to be in control of who can view it. There may be a time when a user account will be revoked and I don't want that user to still be able to access the calendar. So I would like to display this Google Calendar page without giving

Zend Framework Session swapping issue

霸气de小男生 提交于 2019-12-11 04:46:55
问题 I'm helping develop a website based on Zend Framework which has begun to experience session swapping issues that appear at random. WE have found no way of detecting this issue except when our users and ourselves experience session swaps when refreshing or navigating the site. we have found no order or pattern to help us determine what the cause is. Our system uses two database, standard website database and an API database. We have noticed that the cron jobs for these two database create a

Cannot load module's index action for Zend Framework Module

て烟熏妆下的殇ゞ 提交于 2019-12-11 04:41:54
问题 I am trying to create a module for an admin interface but am having trouble getting it to respond at all - What I've done so far is this: I've modified my main application's bootstrap file to load the modules directory: $modules = PROJECT_DIR . '/library/PHPLib/ZF/Modules'; define('MODULES_DIR', $modules); $frontController->addModuleDirectory(MODULES_DIR); The module is contained inside my external PHP library that I re-use for every project, ZendFramework based or not. This is the first time

Is it possible to update multiple rows at the time using Zend_Db_Table?

陌路散爱 提交于 2019-12-11 04:41:09
问题 I have a simple array. $a = array( array('id' => 2, 'year' => 2010), array('id' => 3, 'year' => 2011) ); And i have a MySQL table with id primary key. Now I update my table like this: foreach ($a as $v) { $db->update($v, array('id = ?' => $v['id'])); } And my $a contains 3700 rows. I need to create one big query instead of loop. How can do it? Thank you in advance. Sorry for my english. 回答1: What your asking isn't often done, as you would usually use update() to either set a lot of records to

Zend Database Adapter - Complex MySQL Query

那年仲夏 提交于 2019-12-11 04:28:28
问题 I have defined a function in my Navigation model that executes a query, and I was wondering if there's a more "Zendy" way of generating/executing the query. The query I'm using was proposed by Bill Karwin on another thread here for setting arbitrary record order. I tried using a prepared statement, but the values in the SIGN() function got quoted. I'm using the PDO adapter for MySQL. /** * */ public function setPosition($parentId, $oldPosition, $newPosition) { $parentId = intval($parentId);