Re: [fw-general] Re: Validation, identical password on Zend_Forms from .ini file

2010-08-19 Thread mandi

Vielen Dank ForgetMe :)



MfG

Armand





On Thu, 19 Aug 2010 09:14:04 -0700 (PDT), ForgetMe 

wrote:

> users.sign.elements.password.type = "password"

> users.sign.elements.password.options.label = "Kennwort"

> users.sign.elements.password.options.required = true

> users.sign.elements.password.options.validators.notempty.validator =

> "NotEmpty"

>

users.sign.elements.password.options.validators.notempty.options.messages.isEmpty

> = "Sie haben Ihr Kennwort nicht angegeben."

> users.sign.elements.password.options.validators.strlen.validator =

> "StringLength"

> users.sign.elements.password.options.validators.strlen.options.min = "8"

>

users.sign.elements.password.options.validators.strlen.options.messages.stringLengthTooShort

> = "Ihr Kennwort ist zu kurz."

> 

> users.sign.elements.repeating.type = "password"

> users.sign.elements.repeating.options.label = "Kennwortwiederholung"

> users.sign.elements.repeating.options.required = true

> users.sign.elements.repeating.options.validators.notempty.validator =

> "NotEmpty"

>

users.sign.elements.repeating.options.validators.notempty.options.messages.isEmpty

> = "Sie haben Ihre Kennwortwiederholung nicht angegeben."

> users.sign.elements.repeating.options.validators.identical.validator =

> "Identical"

> users.sign.elements.repeating.options.validators.identical.options.token

=

> password

>

users.sign.elements.repeating.options.validators.identical.options.messages.notSame

> = "Die Kennwortwiederholung stimmt nicht überein."


[fw-general] Validation, identical password on Zend_Forms from .ini file

2010-08-18 Thread mandi

Hello everyone,

Trying to use .ini files for the configuration of Zend Forms. 

How can I port the following code to a .ini form configuration?



$form->addElement('password', 'password1');

$form->addElement('password', 'password2', array(

'validators' => array(

array('identical', false, array('token' => 'password1'))

)

));





I have

elements.password.type= "password"

...



and 

elements.password2.options.validators.identical = ?



Thank you for your time,

Armand






Re: [fw-general] Zend_Service_Twitter bug?

2010-07-29 Thread mandi

On Thu, 29 Jul 2010 17:23:11 +0200, till  wrote:

> On Thu, Jul 29, 2010 at 5:16 PM,   wrote:

>>

>> Hello,

>> Can someone confirmt that this is not a bug?

>>

>> The following code was working fine until ZF 1.8.3

>>

>>  $twitter= new Zend_Service_Twitter('username', 'password');

>>  $response   = $twitter->account->verifyCredentials();

>>

>> In ZF > 1.10.x will generate an error

>> Catchable fatal error: Argument 1 passed to

>> Zend_Service_Twitter::__construct() must be an array, string given,

>> called

>> in /XController on line 363 and defined in

>> library/Zend/Service/Twitter.php  on line 131

>>

>> Chanching it to:

>>  $twitter= new Zend_Service_Twitter(array('username' =>

>> 'username', 'password' => 'password'));

>>  $response = $twitter->account->verifyCredentials();

>>

>> The following error comes up:

>> Exception information:

>>

>> Message: Twitter session is unauthorised. You need to initialize

>> Zend_Service_Twitter with an OAuth Access Token or use its OAuth

>> functionality to obtain an Access Token before attempting any API

actions

>> that require authorisation

>>

>> I do not need a Twitter Oauth Session. What happened to the old Service

>> Call? Can some one confirm this is a bug or some missunderstanding on

my

>> part?

> 

> The "old service call" was discontinued.

> 

> Till

> 

>>

>> I also found this other post by someone else having the same problem:

>> http://forums.zend.com/viewtopic.php?f=69&p=24335

>>

>> Rgds

>> Armand

>>

>>

>>



Thank you for the reply,

Does this mean that the only way of using Zend_Service_Twitter is through

Oauth? 



rgds

Armand






[fw-general] Zend_Service_Twitter bug?

2010-07-29 Thread mandi

Hello,

Can someone confirmt that this is not a bug?



The following code was working fine until ZF 1.8.3



  $twitter= new Zend_Service_Twitter('username', 'password');

  $response   = $twitter->account->verifyCredentials();



In ZF > 1.10.x will generate an error

Catchable fatal error: Argument 1 passed to

Zend_Service_Twitter::__construct() must be an array, string given, called

in /XController on line 363 and defined in

library/Zend/Service/Twitter.php  on line 131



Chanching it to: 

  $twitter= new Zend_Service_Twitter(array('username' =>

'username', 'password' => 'password'));

  $response = $twitter->account->verifyCredentials();



The following error comes up:

Exception information:



Message: Twitter session is unauthorised. You need to initialize

Zend_Service_Twitter with an OAuth Access Token or use its OAuth

functionality to obtain an Access Token before attempting any API actions

that require authorisation 



I do not need a Twitter Oauth Session. What happened to the old Service

Call? Can some one confirm this is a bug or some missunderstanding on my

part? 



I also found this other post by someone else having the same problem:

http://forums.zend.com/viewtopic.php?f=69&p=24335



Rgds

Armand






Re: [fw-general] Zend_Cache + Tags + Expiry = E xceeding max execution time?

2010-06-09 Thread mandi

I have no tests, but we have a website where we use infinite Zend_Cache

for examples and at 2.4G files everything looks normal. 

After this point I see that the I/O disk time increases a slightly and so

does the load (around 2.x). We are used to clean up the cache at this

level.



Rgds,

Armand





On Wed, 09 Jun 2010 14:27:30 +0100, Colin Guthrie 

wrote:

> Hi,

> 

> I've not done much in the way of extensive testing in this regard but I

> figured I'd ask some questions and see if any other folks are in this

> situation.

> 

> I've been developing a fairly extensive data denormalisation system

> which is based on Zend_Cache + the File backend. It makes use of Tags to

> ensure that the relevant bits of denormalised data are expired properly

> (lifetime is infinite).

> 

> I'm only rolling this out minimally just now, but plan to take this

> *much* further in due course.

> 

> The problem is, that I've had several errors in my log telling me that

> the maximum script execution time has been exceeded. This always happens

> in Zend/Cache/Backend/File.php on line 655, 659 or 962.

> 

> This part of the file generally relates to the clean() method (i.e.

> called when deleting by tag).

> 

> 

> So my question is, how scalable is the tagging support in Zend Cache

> File? Currently I only have about 89megs of data in about 22k files (so

> about 11k cached items, bearing in mind that half the files are

metadata).

> 

> I suspect that when I roll out this denormalisation scheme more

> extensively, I'll have closer to a million files.

> 

> Has anyone done any scalability tests on this? For my purposes, I'm

> happy to actually store the metadata regarding tags in a database table

> and expire the items based on that (so create a HybridFile.php backend

> of sorts - I have already created something similar to allow me to

> support tags with Memcache backend). Is this an approach that would

> scale better? Has anyone done anything similar to this?

> 

> Col


Re: [fw-general] Zend_Date throwing Cache Exception

2009-12-18 Thread mandi


Thank you very much Hector, 

I was also assisted from: 

http://www.zfsnippets.com/snippets/view/id/72/bootstrap-cache-resource 

There is a configuration line: 
/// use as default locale cache
 if (isset($options['isDefaultLocaleCache']) & 
 }

which activates the Zend_Locale cache as well. 

Regards, 

Armand 

On Fri, 18 Dec 2009 11:54:51 -0800, Hector Virgen  wrote:  

I'm not sure what's going on with Zend_Date, but as for the Cache
resource, here's a simple one I've put together: 

 /**  * Cache resource  *  * @author Hector Virgen  */ class
Default_Resource_Cache extends Zend_Application_Resource_ResourceAbstract {
 /**   * Creates a cache and returns it   *   * @return Zend_Cache_Core  
*/  public function init()  {  $options = $this->getOptions();$cache =
Zend_Cache::factory(  $options['frontend'],  $options['backend'], 
$options['frontendOptions'],  $options['backendOptions']  );return
$cache;  } } 

 To use it, just add a few lines to your application.ini: 
 
resources.cache.frontend = "Core" resources.cache.backend = "File"
resources.cache.frontendOptions.lifetime = 7200
resources.cache.frontendOptions.automatic_serialization = true
resources.cache.backendOptions.cache_dir = APPLICATION_PATH
"/../data/cache"  
--
Hector

 On Fri, Dec 18, 2009 at 11:44 AM,  wrote:
 Hello,

 Just wondering, why would a simple call on Zend_Date require Caching?

 I get:

 EXCEPTION INFORMATION:

 MESSAGE: Could not determine temp directory, please specify a cache_dir
 manually

 when I try to call new Zend_Date();

 The second question:
 Since Cache is not one in one of the "Available Resource Pluginse" what
is
 the best way to initiate it, to avoid similar messages with Zend_Date or
 Zend_Locale.

 Thank you for your time,
 Armand



Links:
--
[1] mailto:ma...@shqiperia.com


[fw-general] Zend_Date throwing Cache Exception

2009-12-18 Thread mandi
Hello, 

Just wondering, why would a simple call on Zend_Date require Caching? 

I get: 

EXCEPTION INFORMATION:

MESSAGE: Could not determine temp directory, please specify a cache_dir
manually 

when I try to call new Zend_Date(); 

The second question: 
Since Cache is not one in one of the "Available Resource Pluginse" what is
the best way to initiate it, to avoid similar messages with Zend_Date or
Zend_Locale.

Thank you for your time,
Armand



Re: [fw-general] Get the database adapter without Zend_Db_T able

2009-09-16 Thread mandi
Hello Bence,
you can call it in any controller:

$bootstrap = $this->getInvokeArg ( 'bootstrap' );
$db = $bootstrap->getResource ( 'dbconn' );

wher: 
Bootstrap.php
has this method:

protected function _initDbconn(){
$resource = $this->getPluginResource('db');
$db = $resource->getDbAdapter();
return $db;
}

application.ini
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "whatever"
resources.db.params.password = "whatever"
resources.db.params.dbname = "whatever"
resources.db.isDefaultTableAdapter = true


rgds
Armand

On Wed, 16 Sep 2009 14:39:20 +0200, BB  wrote:
> Hello,
> 
> how can I get the database adapter instance in the model (or anywhere
> else) without the Zend_Db_Table's getDefaultAdapter()?
> 
> Foo.php:
> class Model_Foo
> {
>   protected $_db;
>   public function __construct()
>   {
> $this->_db = ???;
>   }
> }
> 
> in the application.ini I have the following lines:
> resources.db.adapter = "mysqli"
> resources.db.params.host = "localhost"
> resources.db.params.username = "foo"
> resources.db.params.password = "bar"
> resources.db.params.dbname = "baz"


Re: [fw-general] view helpers within a view helper

2009-09-09 Thread mandi
And I think you should consider using the Models (DbTable) and not the
Helpers for those operations.

rgds
Armand


> 
> neobeacon wrote:
>> I create a view helper to show comments for a article.(by getting
>> article_id
>> from comments table and using foreach to get each comment).
>> 
>> But in comment table only has commentator's id.
>> 
>> I used a view helper to convert user_id to get the user name.
>> 
>> With in a view helper can I call another view helper?
>> 
>> How do I handle this  case?
>>


Re: [fw-general] can we connect and get message from gmail account use zend framework?

2009-06-04 Thread mandi


If GoogleMail allows IMAP you can use Zend_Mail to retrieve the emails of
GoogleMail. 

rgds, 

Armand 

On Thu, 4 Jun 2009 17:18:10 +0800, "art...@layese.com"  wrote:  

Hi gerritku,

There is no solution for this. I think ZF GData utilizes the google data
api http://code.google.com/apis/gdata/ [1] and that's GMail is not
included. Maybe in the future if Google opens it's API for GMail. This is
what I'm waiting for.

Thanks,
art
 On Thu, Jun 4, 2009 at 5:04 PM, gerritku  wrote:

 I need display my gmail account on my private website like information :
 total message on my gmail, total unread and display 3 last message i
 receive.
 can zend framework do like i need?
 Anyone can give me solution?

 Thanks
--
 View this message in context:
http://www.nabble.com/can-we-connect-and-get-message-from-gmail-account-use-zend-framework--tp23866282p23866282.html
[3]
 Sent from the Zend Framework mailing list archive at Nabble.com.

 

Links:
--
[1] http://code.google.com/apis/gdata/
[2]
mailto:gst...@gmx.com
[3]
http://www.nabble.com/can-we-connect-and-get-message-from-gmail-account-use-zend-framework--tp23866282p23866282.html


Re: [fw-general] Zend_Cache performance

2009-05-29 Thread mandi
Maybe I am a little bit out of the topic, 

Has anyone suceed in having hashed_directory_leve different than 0?
In my case, everything works fine when the hashed_directory_level is set to
0 (default).
As soon as I increase the value to 1 or 2 (I have a couple of hundred
thousands articles to be cached in my website), the cache does not respond
any more.
Some cache directories are being created, but they are empty and no files
are stored within them.
I have tried this in 2 servers (almost the same architecture) and the
result is the same.
The directories are created with mask 0700 (good enough). I tried also by
manually assigning umask and reloading the pages but the cache is never
stored (and never hit).

ZF 1.7.5
PHP 5.2.9
php -m | grep hash
hash 

Regards,
Armand



On Fri, 29 May 2009 13:20:13 +0200, Fabien MARTY 
wrote:
>> [...]
>> Currently I have about 12.000 cached files and sometimes  (1/10)
>> Zend_Cache
>> takes up to 10 seconds to load the cache.
> 
> if you have more than 1000 cache records, drop your cache and use
> "hashed_directory_level = 2" as an option for the File backend
> 
> Regards


[fw-general] Zend Cache Possible Bug?

2009-05-05 Thread mandi
Hello everyone, 
I am having a problem with Zend Cache - hashed_directory_level.
Everything works fine when the hashed_directory_level is set to 0
(default).
As soon as I increase the value to 1 or 2 (I have a couple of hundred
thousands articles to be cached in my website), the cache does not respond
any more.
Some cache directories are being created, but they are empty and no files
are stored within them.
I have tried this in 2 servers (almost the same architecture) and the
result is the same. 
The directories are created with mask 0700 (good enough). I tried also by
manually assigning umask and reloading the pages but the cache is never
stored (and never hit).

ZF 1.7.5
PHP 5.2.9
php -m | grep hash
hash


Thank you for your time,
Armand



Re: [fw-general] Survey: Development environment for PHP/ZFW

2009-05-05 Thread mandi
Hello Everyone,
This Survey is getting a little "Spammy". 
Can you move it to some webpage so we don't get each persons "twittering"
information about what he is using? :)

Thank you.
Armand

On Tue, 5 May 2009 01:43:27 -0700 (PDT), "monk.e.boy"
 wrote:
> 1: WinXP + CentOS
> 2: local
> 3: nusphere phped (I seem to be the only person using this? It's an
amazing
> tool. Stepping though ZF with the debugger has saved me hundreds of
> question)
> 4: SVN
> 5: none.
> 
> monk.e.boy
> 
> 
> 
> howard chen wrote:
>> 
>> Please feel free to answer:
>> 
>> 1. What OS you are using during development? Windows? Mac? Linux?
>> 2. Do you edit source code on localhost or remote? i.e. is your
>> testing environment reside on localhost or remote?
>> 3. What tool or IDE you are using? Ultraedit? Apanta? Eclipse PDT?
>> 4. Which versioning system your are using? svn? git?
>> 5. Do you use PHPUnit or other testing tools?
>> 
>> p.s. have a good day.
>> 
>>