Re: [fw-general] ROR Flash in ZF

2007-01-31 Thread Philip Iezzi
Thanks Ralph

It won't work yet on PHP 5.2.0 yet.
On a Windows box I'm getting the following notice:

Notice: Indirect modification of overloaded property Zend_Session::$default has 
no effect in FlashMessage.php on line 87

On a Unix box I'm not getting any notice at all, hasMessages() returns true and 
getMessages() is kinda empty...
FlashMessage Object ( [_namespace:protected] => default )

On both systems I have set error_reporting(E_ALL)
pretty weird.

Cheers,
philip

Ralph Schindler wrote:
> Philip Iezzi wrote:
>>> Notice: Indirect modification of overloaded property
>>> Zend_Session::$default has no effect in FlashMessage.php on line 42
>>>
>>> line 42 (in add()):
>>>
>>> self::$_session->{$namespace}[] = $message;
>>
>> It didn't work with Matthew's hack either...
>> http://weierophinney.net/matthew/archives/131-Overloading-arrays-in-PHP-5.2.0.html
>>
>>
> 
> I did fix and tested and commented..
> 
> http://svn.ralphschindler.com/repo/ZendFramework/library/FlashMessage.php
> 
> please let me konw what you think.  This is a standalone version of
> FlashMessaging.. Ideally, there are aspects of this that should be
> dispatched from other areas, specifically Zend_Controller_Action, and
> from Zend_View_Helper..
> 
> But I will address that within the next 2 days as I propose
> Zend_Controller_Action_Helper.  Having a component like that would allow
> for an easier and more seemless integration of FlashMessageing and other
> such related composite components.
> 
> Also, I am pretty sure this shoudl work even in PHP 5.2.0* even due to
> its brokenness.
> 
> Cheers, and let me know what you think!
> 
> -ralph
> 


[fw-general] Authentication in Mail Class

2007-01-31 Thread Sanjay Aggarwal
Right Now SMTP authentication is not there in the mail class. Is there
anyone who has implemented SMTP authentication with Zend Framework any how?
If so - do let me know asap. That will be a great help for us.
 
Regards,
Sanjay Aggarwal 


Re: [fw-general] Zend_Mail PHP 5.2.0

2007-01-31 Thread Simon Mundy

That's great Art - will look into it this evening.

Sorry to be a pain but could you also please add this to JIRA?


I'm actually using the default Sendmail.php transport.  The exception
message does not contain any useful info since the php mail() function
only returns FALSE on failure.

Here is my test program.  I replaced the real email addresses with  
xxx.com

and xxx894.org


--

Simon Mundy | Director | PEPTOLAB

""" " "" "" "" "" """ " "" " " " "  "" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654  
4124

http://www.peptolab.com




Re: [fw-general] Zend_Mail PHP 5.2.0

2007-01-31 Thread Art Hundiak
I'm actually using the default Sendmail.php transport.  The exception
message does not contain any useful info since the php mail() function
only returns FALSE on failure.

Here is my test program.  I replaced the real email addresses with xxx.com
and xxx894.org

$ cat email_test.php
setBodyText('This is the text of the mail.');

$mail->setFrom('[EMAIL PROTECTED]', 'Art Hundiak');
$mail->addTo('[EMAIL PROTECTED]', 'Art Hundiak');

$mail->setSubject('TestSubject');
$mail->send();

/* -
 * The actual php mail() seems to work
 * using an example from the manual
 */
$to  = '[EMAIL PROTECTED]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [EMAIL PROTECTED]' . "\r\n" .
   'Reply-To: [EMAIL PROTECTED]' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

?>
And here is a Zend::dump($this) from inside of the transport object when
mail() fails.

(hathor.telana.com:ahundiak) /home/ahundiak/ws2007/osso2007/apps/mail
$ php email_test.php
/usr/sbin/sendmail: unexpected response 501 to RCPT TO command


object(Zend_Mail_Transport_Sendmail)#3 (10) {
  ["subject"] => NULL
  ["EOL"] => string(1) "
"
  ["body"] => string(29) "This is the text of the mail."
  ["boundary"] => string(0) ""
  ["header"] => string(162) "From: "Art Hundiak" <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
"
  ["_headers:protected"] => array(6) {
["From"] => array(2) {
  [0] => string(36) ""Art Hundiak" <[EMAIL PROTECTED]>"
  ["append"] => bool(true)
}
["To"] => array(2) {
  [0] => string(33) ""Art Hundiak" <[EMAIL PROTECTED]>"
  ["append"] => bool(true)
}
["Subject"] => array(1) {
  [0] => string(11) "TestSubject"
}
["Content-Type"] => array(1) {
  [0] => string(32) "text/plain; charset="iso-8859-1""
}
["Content-Transfer-Encoding"] => array(1) {
  [0] => string(16) "quoted-printable"
}
["Content-Disposition"] => array(1) {
  [0] => string(6) "inline"
}
  }
  ["_isMultipart:protected"] => bool(false)
  ["_mail:protected"] => object(Zend_Mail)#1 (13) {
["_charset:protected"] => string(10) "iso-8859-1"
["_headers:protected"] => array(3) {
  ["From"] => array(2) {
[0] => string(36) ""Art Hundiak" <[EMAIL PROTECTED]>"
["append"] => bool(true)
  }
  ["To"] => array(2) {
[0] => string(33) ""Art Hundiak" <[EMAIL PROTECTED]>"
["append"] => bool(true)
  }
  ["Subject"] => array(1) {
[0] => string(11) "TestSubject"
  }
}
["_from:protected"] => string(20) "[EMAIL PROTECTED]"
["_to:protected"] => array(1) {
  [0] => string(17) "[EMAIL PROTECTED]"
}
["_recipients:protected"] => array(1) {
  ["[EMAIL PROTECTED]"] => int(1)
}
["_returnPath:protected"] => NULL
["_subject:protected"] => string(11) "TestSubject"
["_bodyText:protected"] => object(Zend_Mime_Part)#2 (10) {
  ["type"] => string(10) "text/plain"
  ["encoding"] => string(16) "quoted-printable"
  ["id"] => NULL
  ["disposition"] => string(6) "inline"
  ["filename"] => NULL
  ["description"] => NULL
  ["charset"] => string(10) "iso-8859-1"
  ["boundary"] => NULL
  ["_content:protected"] => string(29) "This is the text of the mail."
  ["_isStream:protected"] => bool(false)
}
["_bodyHtml:protected"] => bool(false)
["_mimeBoundary:protected"] => NULL
["hasAttachments"] => bool(false)
["_parts:protected"] => array(0) {
}
["_mime:protected"] => object(Zend_Mime)#4 (1) {
  ["_boundary:protected"] => string(34)
"=_514e84fd17a78051290527df8f4259f7"
}
  }
  ["_parts:protected"] => array(1) {
[0] => object(Zend_Mime_Part)#2 (10) {
  ["type"] => string(10) "text/plain"
  ["encoding"] => string(16) "quoted-printable"
  ["id"] => NULL
  ["disposition"] => string(6) "inline"
  ["filename"] => NULL
  ["description"] => NULL
  ["charset"] => string(10) "iso-8859-1"
  ["boundary"] => NULL
  ["_content:protected"] => string(29) "This is the text of the mail."
  ["_isStream:protected"] => bool(false)
}
  }
  ["recipients"] => string(33) ""Art Hundiak" <[EMAIL PROTECTED]>"
}


>
> Does the exception contain an example of the SMTP command? A 501
> means that the request is a bit screwy.
>
> Perhaps if you could look at enabling the debug constant (line 44 of
> Zend/Mail/Transport/Smtp.php) and it will display the transaction so
> you can see what is going on and email the list with the results?
> Would be happy to fix for you ASAP.
>
> Cheers
>
>> Has anyone tried Zend_Mail on a PHP 5.2.0 machine?  A simple
>> working app
>> of mine stopped working after the host upgraded from 5.1.x
>>
>> The example from the manual generates:
>>
>> /usr/sbin/sendmail: unexpected response 501 to RCPT TO command
>> Followed by an exception.
>>
>> Same code

Re: [fw-general] Zend_Mail PHP 5.2.0

2007-01-31 Thread Simon Mundy
Does the exception contain an example of the SMTP command? A 501  
means that the request is a bit screwy.


Perhaps if you could look at enabling the debug constant (line 44 of  
Zend/Mail/Transport/Smtp.php) and it will display the transaction so  
you can see what is going on and email the list with the results?  
Would be happy to fix for you ASAP.


Cheers

Has anyone tried Zend_Mail on a PHP 5.2.0 machine?  A simple  
working app

of mine stopped working after the host upgraded from 5.1.x

The example from the manual generates:

/usr/sbin/sendmail: unexpected response 501 to RCPT TO command
Followed by an exception.

Same code is working fine on a 5.1.6 machine.

Thanks in advance


--

Simon Mundy | Director | PEPTOLAB

""" " "" "" "" "" """ " "" " " " "  "" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654  
4124

http://www.peptolab.com




[fw-general] Zend_Mail PHP 5.2.0

2007-01-31 Thread Art Hundiak
Has anyone tried Zend_Mail on a PHP 5.2.0 machine?  A simple working app
of mine stopped working after the host upgraded from 5.1.x

The example from the manual generates:

/usr/sbin/sendmail: unexpected response 501 to RCPT TO command
Followed by an exception.

Same code is working fine on a 5.1.6 machine.

Thanks in advance





Re: [fw-general] ROR Flash in ZF

2007-01-31 Thread Ralph Schindler


Good catch, I Commited in haste it seems when I was commenting and 
cleaning up, its updated now, and works, ive tested ;)


Thanks,
Ralph

Nico Edtinger wrote:

[31.01.2007 21:08] Ralph Schindler wrote:

Cheers, and let me know what you think!


There's a bug:

// ...
protected static function start()
{
if ($namespace == "") {
throw new Exception(__CLASS__ . ": namespace cannot be null.");
}
// ...

$namespace is not defined.

nico





Re: [fw-general] ROR Flash in ZF

2007-01-31 Thread Nico Edtinger

[31.01.2007 21:08] Ralph Schindler wrote:

Cheers, and let me know what you think!


There's a bug:

// ...
protected static function start()
{
if ($namespace == "") {
throw new Exception(__CLASS__ . ": namespace cannot be  
null.");

}
// ...

$namespace is not defined.

nico


Re: [fw-general] ROR Flash in ZF

2007-01-31 Thread Ralph Schindler

Philip Iezzi wrote:

Notice: Indirect modification of overloaded property Zend_Session::$default has 
no effect in FlashMessage.php on line 42

line 42 (in add()):

self::$_session->{$namespace}[] = $message;


It didn't work with Matthew's hack either...
http://weierophinney.net/matthew/archives/131-Overloading-arrays-in-PHP-5.2.0.html



I did fix and tested and commented..

http://svn.ralphschindler.com/repo/ZendFramework/library/FlashMessage.php

please let me konw what you think.  This is a standalone version of 
FlashMessaging.. Ideally, there are aspects of this that should be 
dispatched from other areas, specifically Zend_Controller_Action, and 
from Zend_View_Helper..


But I will address that within the next 2 days as I propose 
Zend_Controller_Action_Helper.  Having a component like that would allow 
for an easier and more seemless integration of FlashMessageing and other 
such related composite components.


Also, I am pretty sure this shoudl work even in PHP 5.2.0* even due to 
its brokenness.


Cheers, and let me know what you think!

-ralph


Re: [fw-general] error in pdo\mysql.php

2007-01-31 Thread Bill Karwin

SHY wrote:

hey,

there is a small error in Zend/Db/Adapter/Pdo/Mysql.php.

Fixed in revision 3116.

Bill Karwin


Re: [fw-general] PEAR Channel Distro

2007-01-31 Thread Gavin Vess
I think it would be great if a community member stepped forward and 
contributed some code for use on our Community Development server to 
automate this :)


It is on the "todo" list here:
http://framework.zend.com/wiki/display/ZFDEV/Sandbox

I can easily see how convenient a "pear update" would be for sharing the 
ZF library across all accounts on the same server.


Cheers,
Gavin

Michael Caplan wrote:

-->

Haven’t done it myself, but according to this blog it seems possible: 
http://urdalen.com/blog/?p=135


*From:* Daniel O'Connor [mailto:[EMAIL PROTECTED]
*Sent:* January 31, 2007 7:47 AM
*To:* fw-general@lists.zend.com
*Subject:* Re: [fw-general] PEAR Channel Distro

It seems to me that the biggest hurdle to keeping zend framework up to 
date on a pear channel of its own is turning it into a pear package is 
altogether too manual.


Have we looked at the difficulty in setting up a phing task to 
automagically build the package? It's already done for the tarball...






Re: [fw-general] Determining installed version of QMail, Exim, etc.

2007-01-31 Thread Olivier Lépine

Hi Simon,

It doesn't make much sense to try to detect the version of Qmail, since 
the stable one is 1.0.3 for almost 10 years now. A lot of different 
patches can be applied which you will not be able to detect accurately.


Qmail goes to /var/qmail by default. You can access the config files in 
/var/qmail/control, though i'ts no warranty that qmail is indeed up and 
running (or able to) on the server.


Cheers,
Olivier

Quatrain, Conseil et solutions web pour l'entreprise
33 rue de la Bonneterie, 84000 Avignon, France
tél. +33 (0)4 90 80 40 40  fax +33 (0)4 90 80 40 43
Skype : crapougnax / +33 (0) 870 445 250
http://www.quatrain.com
--



Simon Mundy a écrit :

Hi everyone

I'm in the middle of writing a 'Mail' config utility for 
Zend_Environment that tries to determine the locally installed MTA - 
it will help debugging quite a lot.


So far I can reliably determine Postfix (since it's my MTA of choice 
:) and I _think_ I've got Exim covered but can't for the life of me 
work out how you can check which version of Qmail is installed.


Can anyone help with the following:-

* Using either a config file or binary to determine version for Qmail
* Using either a config file or binary to determine version for Exim 
(I currently use:-


if (preg_match('/Exim version/msi', $this->_config = 
shell_exec('exim -bV'))) {

return 'exim';
}

* Using either a config file or binary to determine version for Sendmail

Any others that we should be looking for?

I'm also needing it to be cross platform, although the php.ini file 
can give some clues as to the path/host/port etc.


As a start, here's how Postfix config can be returned:-

if (preg_match('/mail_version/msi', $this->_config = 
shell_exec('postconf -d'))) {

return 'postfix';
}

and parsed...

preg_match_all('/([^\s]+)\s=\s([^\s]+)/msi', $this->_config, 
$config, PREG_PATTERN_ORDER);

$config = array_combine($config[1], $config[2]);

Cheers

--

Simon Mundy | Director | PEPTOLAB

""" " "" "" "" "" """ " "" " " " "  "" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
http://www.peptolab.com




smime.p7s
Description: S/MIME Cryptographic Signature


[fw-general] error in pdo\mysql.php

2007-01-31 Thread SHY

hey,

there is a small error in Zend/Db/Adapter/Pdo/Mysql.php.
on line 104 it says:

[code]
'PRIMARY' => (bool) (strtoupper($val['key']) == 'PRI')
[/code]

which produces a Notice as the $val thing is not defined in the current
scope and thus the 'PRIMARY' index is false no matter what. i guess it
should be

[code]
'PRIMARY' => (bool) (strtoupper($row['key']) == 'PRI')
[/code]

which of course works as expected.


SHY


RE: [fw-general] PEAR Channel Distro

2007-01-31 Thread Michael Caplan
Haven't done it myself, but according to this blog it seems possible:
http://urdalen.com/blog/?p=135

 

 

From: Daniel O'Connor [mailto:[EMAIL PROTECTED] 
Sent: January 31, 2007 7:47 AM
To: fw-general@lists.zend.com
Subject: Re: [fw-general] PEAR Channel Distro

 

It seems to me that the biggest hurdle to keeping  zend framework up to
date on a pear channel of its own is turning it into a pear package is
altogether too manual.

Have we looked at the difficulty in setting up a phing task to
automagically build the package? It's already done for the tarball... 

-- 
Browser feels a little bit slow? http://thebetterbrowser.com/newer 



RE: [fw-general] PEAR Channel Distro

2007-01-31 Thread Michael Caplan
I too am only using some components from Zend Framework.  With the
tarball, I'm forced to deploy the entire library and weed out the
components I don't need.  That is too much work for deployment, and
fault prone.

-Original Message-
From: Michael Gauthier [mailto:[EMAIL PROTECTED] 
Sent: January 30, 2007 5:19 PM
To: fw-general@lists.zend.com
Cc: Nathan Fredrickson
Subject: RE: [fw-general] PEAR Channel Distro

At silverorange we use some elements from the Zend Framework already.
All our other code is managed through PEAR channels (both ours and
PEAR's) and we'd love it if Zend Framework was also available through a
PEAR channel. This would make keeping up-to-date with Zend a lot easier
from our perspective.

-Mike

On Tue, 2007-30-01 at 10:50 -0700, Michael Caplan wrote:
> Hi Andries,
> 
> I would think that distributing via a PEAR channel would help reach a
> broader public.  Was that not the case?
> 
> Not to beat what I assume is a long dead discussion, I don't see the
> connection between a need to release the whole codebase in steps VS
> making each component available as separate PEAR packages.
> 
> Best,
> 
> Michael
> 
> 
> -Original Message-
> From: Andries Seutens [mailto:[EMAIL PROTECTED] 
> Sent: January 30, 2007 12:05 PM
> To: Michael Caplan
> Cc: Richard Thomas; fw-general@lists.zend.com
> Subject: Re: [fw-general] PEAR Channel Distro
> 
> Hello,
> 
> The priority reason for setting up the PEAR channel, was to reach a 
> broader public, that would be testing our code, and thus gather more 
> feedback.
> 
> There have been numerous discussions about this in the past, and there

> has been decided to stick to the idea of code reales of the whole 
> codebase in steps. We do not want to end up with "Zend Framework 1.0" 
> being a mix of stable and "not-so-stable" components.
> 
> Best regards,
> 
> Andriesss
> 
> 
> Michael Caplan schreef:
> > Being very new to Zend FW, I'm curious why a maintained and
segmented
> > (IE: each Zend FW component like Zend_Filter available
independently)
> > PEAR distribution hasn't been a core distribution method.  It seems
> like
> > it would be a logic step considering that Zend FW fits nicely into
> PEAR
> > packages.  It also, for myself any I don't see why not others too,
> would
> > make deploying and managing Zend FW much easier.  
> > 
> > I saw that there was a discussion on this a while back, but this
> > initiative was obviously abandoned. 
> > 
> > Michael
> > 
> > -Original Message-
> > From: Richard Thomas [mailto:[EMAIL PROTECTED] 
> > Sent: January 30, 2007 11:19 AM
> > To: fw-general@lists.zend.com
> > Subject: Re: [fw-general] pear.zfdev.com vs errors
> > 
> > Errors have been disabled for that domain, As to updates will have
to
> > see if the person who did .15 for us can put together a more recent
> > package
> > 
> > On 1/30/07, Michael Caplan <[EMAIL PROTECTED]> wrote:
> >> For what it is worth, I'd rather a PEAR distribution of Zend FW.
It
> >> would be much more convenient installing and managing a series of
> Zend
> >> PEAR packages, then a tarball of everything.
> >>
> >> Best,
> >>
> >> Michael
> >>
> >>
> >> -Original Message-
> >> From: Andries Seutens [mailto:[EMAIL PROTECTED]
> >> Sent: January 30, 2007 9:45 AM
> >> To: Daniel O'Connor
> >> Cc: fw-general@lists.zend.com; Richard Thomas
> >> Subject: Re: [fw-general] pear.zfdev.com vs errors
> >>
> >> Daniel O'Connor schreef:
> >>> pear.zfdev.com  - does anyone
> >>>
> >>>1. feel like switching off display errors on that box
> >>
> >> Not on the whole box, because it's a development box, not a
> production
> >> environment. Perhaps only on the "pear" virtual server.
> >>
> >>
> >>>2. feel like giving us an updated package there?
> >>
> >> An update would be nice, but I'm thinking that you might be the
only
> > one
> >> who that was still aware of the pear packages for ZF ;).
> >>
> >> Regards,
> >>
> >>
> >> Andriesss
> >>
> >>
> > 
> > 
> > 
> 
> 




Re: [fw-general] PEAR Channel Distro

2007-01-31 Thread Daniel O'Connor

It seems to me that the biggest hurdle to keeping  zend framework up to date
on a pear channel of its own is turning it into a pear package is altogether
too manual.

Have we looked at the difficulty in setting up a phing task to automagically
build the package? It's already done for the tarball...

--
Browser feels a little bit slow? http://thebetterbrowser.com/newer


Re: [fw-general] trunk bkarwin: - Redesign quoteIdentifier() and getQuoteIdentifierSymbol() methods, implement i...

2007-01-31 Thread Philip Iezzi
I don't know how to contact you personally, so I post this small request again 
to the list, sorry.
This small typo is still there:

Index: library/Zend/Db/Adapter/Pdo/Mysql.php
===
--- library/Zend/Db/Adapter/Pdo/Mysql.php   (revision 3107)
+++ library/Zend/Db/Adapter/Pdo/Mysql.php   (working copy)
@@ -101,7 +101,7 @@
 'LENGTH'  => null,
 'SCALE'   => null,
 'PRECISION'   => null,
-'PRIMARY' => (bool) (strtoupper($val['key']) == 'PRI')
+'PRIMARY' => (bool) (strtoupper($row['key']) == 'PRI')
 );
 }
 return $desc;



Thanks for your improvements!
Cheers,
Philip


Philip Iezzi wrote:
> Hi bkarwin
> 
> rev. 3093:
> http://framework.zend.com/fisheye/changelog/Zend_Framework/?cs=3093
> Please fix...
> 
> ===
> Index: library/Zend/Db/Adapter/Pdo/Mysql.php
> ===
> --- library/Zend/Db/Adapter/Pdo/Mysql.php   (revision 3098)
> +++ library/Zend/Db/Adapter/Pdo/Mysql.php   (working copy)
> @@ -87,7 +87,7 @@
>   */
>  public function describeTable($tableName, $schemaName = null)
>  {
> -$sql = "DESCRIBE $table";
> +$sql = "DESCRIBE $tableName";
>  $result = $this->fetchAll($sql);
>  $desc = array();
>  foreach ($result as $key => $row) {
> @@ -101,7 +101,7 @@
>  'LENGTH'  => null,
>  'SCALE'   => null,
>  'PRECISION'   => null,
> -'PRIMARY' => (bool) (strtoupper($val['key']) == 'PRI')
> +'PRIMARY' => (bool) (strtoupper($row['key']) == 'PRI')
>  );
>  }
>  return $desc;
> ===
> 
> I didn't test the other adapters, just checked on Pdo/Mysql.
> 
> Thanks!
> Philip
>