Re: [fw-general] Zend_Tool working in 1.6 RC3?

2008-08-28 Thread Ralph Schindler
Hey Ken, 

I have updated the code from the laboratory, and will work on getting the
quickstart on the wiki up to date tomorrow.  I actually have a new
quickstart that I posted to the previously mentioned yahoo group that
supersedes the Quickstart in the wiki currently.

In either case, the code in the lab is updated and should work on windows
now.  If you have a chance to check it (I just did as well), that would be
awesome,

Thanks!
-ralph


On 8/27/08 4:43 PM, "Ken Petri" <[EMAIL PROTECTED]> wrote:

> 
> When I try to run Zend_Tool (following the Zend Tool Quickstart on the Zend
> Framework Community wiki), I get the following errors:
> 
> Fatal error: Uncaught exception 'Zend_Exception' with message 'Security
> check: Illegal character in filename' in C:\wamp
> \phpinc\ZendFramework-1.6.0RC3\library\Zend\Loader.php:232
> Stack trace:
> #0 C:\wamp\phpinc\ZendFramework-1.6.0RC3\library\Zend\Loader.php(117):
> Zend_Loader::_securityCheck('C:\wamp\phpinc\...')
> 
> #1
> C:\wamp\phpinc\ZendFramework-1.6.0RC3\laboratory\Zend_Tool\library\ZendL\Tool\
> Rpc\Loader\Abstract.php(18):
> Zend_Loade
> r::loadFile('C:\wamp\phpinc\...')
> #2
> C:\wamp\phpinc\ZendFramework-1.6.0RC3\laboratory\Zend_Tool\library\ZendL\Tool\
> Rpc\Endpoint\Abstract.php(60):
> ZendL_To
> ol_Rpc_Loader_Abstract->load()
> #3
> C:\wamp\phpinc\ZendFramework-1.6.0RC3\laboratory\Zend_Tool\library\ZendL\Tool\
> Rpc\Endpoint\Cli.php(8):
> ZendL_Tool_Rpc
> _Endpoint_Abstract->__construct()
> #4
> C:\wamp\phpinc\ZendFramework-1.6.0RC3\laboratory\Zend_Tool\bin\zf.php(55):
> ZendL_Tool_Rpc_Endpoint_Cli::main()
> #5 {main}
>   thrown in C:\wamp\phpinc\ZendFramework-1.6.0RC3\library\Zend\Loader.php on
> line 232
> 
> Any ideas, anyone?
> 
> Thanks,
> ken

-- 
Ralph Schindler
Software Engineer | [EMAIL PROTECTED]
Zend Framework| http://framework.zend.com/




RE: [fw-general] Multiple versions of VIEWS

2008-08-28 Thread Keith Pope
You want to look at the contextswitch action helper.



http://framework.zend.com/manual/en/zend.controller.actionhelpers.html



8.8.4.3. ContextSwitch and AjaxContext

- Original Message -
From: [EMAIL PROTECTED]
Sent: Thu, 8/28/2008 6:28am
To: fw-general@lists.zend.com
Subject: [fw-general] Multiple versions of VIEWS


Hi,

Given the Zend Framework MVC structure, how would I implement this -

Depending on the request source, the page gets displayed in either HTML,
XHTML Mobile, WAP or any other format?

Code examples would be nice.

Thanks
Gaurav



--

allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone, 
Hereford, HR1 3SE. 

Registered in England No. 02933191. UK VAT Reg. No. 666 9148 88. 



Telephone: 0870 243 3434, Fax: 0870 243 6041. 

Website: www.allpay.net

Email: [EMAIL PROTECTED] 



This email, and any files transmitted with it, is confidential and intended 
solely for the use of the individual or entity to whom it is addressed. If you 
have received this email in error please notify the allpay.net Information 
Security Manager at the number above.


[fw-general] Format exception msg as HTML

2008-08-28 Thread monk.e.boy

How do I make the exception messages look better in HTML?

They seem to be a blend of HTML and plain text (the stack trace is separated
by "\n"?!)

Thanks,

monk.e.boy

http://teethgrinder.co.uk/open-flash-chart-2/
-- 
View this message in context: 
http://www.nabble.com/Format-exception-msg-as-HTML-tp19196819p19196819.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Speed and performance between ZF releases

2008-08-28 Thread Benjamin Eberlei
Rasmus Lerdorf had a new talk (froscon08) on framework performance in general 
and vs using no framework at all and came up with ZF being roughly in the 
mid-field (Cake being way slower, CodeIgniter being faster).

He also talked about some optimizing strategies regarding include path, and 
the include strategy in general, so i took some time to optimize within the 
Zend Framework and found interesting results: Stripping all require_once from 
the complete Zend Framework code, and require (without once) all file 
dependancies directly in your main script gives you a performance boost of 
about 20-40% for each request.

See all the different include strategies and their numbers here:

http://www.whitewashing.de/blog/articles/73

If requiring all the dependant files up front is to hard to find out, you 
could still optimize performance of the Zend Framework by fixing your include 
path (put /usr/share/php in front of the dot, rather the default config which 
work the other way round) and strip all require_once 'Zend/*'; code from
your downloaded ZF library source code.


On Tuesday 26 August 2008 19:27:27 Endijs Lisovskis wrote:
> At first let me say THANKS for your reply! I was not expecting such a long
> comment. I will definitely look at ZF 1.7 features and optimizations.
>
> I can't give you any links to articles where someone is pointing out that
> ZF is slow, except one you already gave. But each time when I talk about
> frameworks and ZF in particular I receive negative reactions and all of
> theme are because of doubts about ZF performance. Those comments I receive
> in my blog where I talk about ZF and even maybe promote it and in local PHP
> forum too.
> OK - those who comment cant provide exact numbers in which I could see
> difference between ZF and other frameworks. But all they need to say - ZF
> is complicated, big and with a lot of components etc. etc. And each version
> is becoming bigger and bigger. I would like to argue, that growth in
> features is not affecting speed - but I can't because there are no any
> tests out there.
> I hope you see the problem. In short "They say it is slow, but there is no
> way we can prove they are wrong".
>
> And sorry for my grammar and structure of sentences. English is not my
> mothers tongue, so it is not very easy for me to write in correct English.
>
> wllm wrote:
> > Where have you heard that ZF is one of the slowest frameworks out there?
> > While I haven't heard many claims that ZF is the most performant- that
> > distinction is usually reserved for Code Igniter or one of the other
> > lightweight, performance-focused frameworks- I haven't heard any claims
> > that it is the least performant. The most transparent and sound
> > benchmarks that I've seen are available here:
> > http://www.avnetlabs.com/php/php-framework-comparison-benchmarks. That
> > puts ZF at roughly 50% of the throughput of Code Igniter. That may sound
> > like a lot at first, but as I mention in a comment there, baseline PHP
> > can handle *15 times* the load than Code Igniter and CakePHP falls far
> > short of both (at least in these particular tests). This article
> > demonstrates well that accurate performance characterizations among
> > different frameworks are *extremely* difficult to come up with in the
> > first place, and that any framework faces tradeoffs between performance
> > and functionality. In the end, I'm pretty comfortable with the
> > characterization that ZF is 'twice as slow' as a framework that has been
> > optimized from the get go for performance like Code Igniter. Those who
> > understand the tests at hand and have real performance requirements will
> > understand that this may easily be eclipsed by functionality
> > requirements for any given project.
> > That said, we are planning to focus all of the Zend team's contributions
> > for 1.7 around performance analysis and enhancements. We don't have a
> > test environment with which we can thoroughly benchmark all the
> > frameworks yet, but we will have one set up soon. Once we can start
> > getting good numbers, we will focus on the performance of the MVC
> > components, along with other components- like Zend_Search_Lucene- which
> > are very sensitive to algorithmic complexity and optimizations. We've
> > already profiled the framework with a simple application and identified
> > some optimizations. If you are interested in the performance of ZF, then
> > keep your eyes peeled for optimization commits in the next few weeks.
> >
> > ,Wil
> >
> >> -Original Message-
> >> From: Endijs Lisovskis [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, August 26, 2008 8:30 AM
> >> To: fw-general@lists.zend.com
> >> Subject: [fw-general] Speed and performance between ZF releases
> >>
> >>
> >> Hi!
> >>
> >> I wanted to ask - are there any tests done to compare ZF releases to
> >> see
> >> which ones are faster and uses less resources?
> >>
> >> I'm asking this, because when there are discussions about framework

Re: [fw-general] Format exception msg as HTML

2008-08-28 Thread Jack Sleight
Assuming you're talking about the messages that appear when an exception 
isn't caught, you can use the set_exception_handler function to set your 
own custom exception handler, then you can define exactly how you want 
the exception handled/output.


http://uk2.php.net/manual/en/function.set-exception-handler.php

monk.e.boy wrote:

How do I make the exception messages look better in HTML?

They seem to be a blend of HTML and plain text (the stack trace is separated
by "\n"?!)

Thanks,

monk.e.boy

http://teethgrinder.co.uk/open-flash-chart-2/
  


--
Jack


[fw-general] Does anybody use Zend Framework with IIS

2008-08-28 Thread Nikolay Alexeev

I don't believe in it anymore  
-- 
View this message in context: 
http://www.nabble.com/Does-anybody-use-Zend-Framework-with-IIS-tp19196976p19196976.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Common Navigation Menu for all modules... how?

2008-08-28 Thread gsharma

Hi,

How do I reuse my default navigation(.phtml) in other modules?

Here's my directory structure as an example -

/domain
|---/application
|--/default
|-/controllers
|-/models
|-/views
|/layouts
|---/navigation.phtml
|/scripts
|--/admin
|-/controllers
|-/models
|-/views
|--/profiles
|-/controllers
|-/models
|-/views
|---/library
|---/public

I would like to use the navigation from default module into other modules
(i.e. admin, profiles)

Thanks Heaps!!

Warm Regards
Gaurav



[fw-general] Zend_Soap_Client or SoapClient?

2008-08-28 Thread SWilk

Hi,


This is my first steps with SOAP, not only with ZF implementation.
I bumped into something I don't understand.


Zend provides component 'Zend_Soap_Client'. The manual states that
_Zend_Soap_Client_ constructor takes two parameters.
But in the examples, no Zend_Soap_Client class is used.

Instead, _SoapClient_ class is instantiated.

I do not understand why there is no statement in the Documentation 
that one should use SoapClient instead of Zend_Soap_Client.


Why is that so?

I tried to instantiate Zend_Soap_Client with European Union VAT Number 
 validation service:

http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl
I wrote that just because all ZF classes starts with Zend, and are 
underline-separated.


The code is as follow:

Zend_Loader::loadClass('Zend_Soap_Client');
class checkVat {
 public $countryCode= 'PL';
 public $vatNumber  ='6772064405';
}


class checkVatResponse {
public $countryCode;
public $vatNumber;
public $requestDate;
public $valid;
public $name;
public $address;
}

$euVatNoValidator = new Zend_Soap_Client (
'http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl',
array(
'classmap' => array(
'checkVat'=>'checkVat',
'checkVatResponse'=>'checkVatResponse'
)
));
$response = $euVatNoValidator->checkVat(new checkVat());
var_dump($response);

When I execute it form CLI, php SEGFAULTs on two separate Linux boxes. 
 PHP versions 5.2.6-pl6-gentoo, and on Slackware compiled from 
source, version 5.2.5.

It happens while calling $euVatNoValidator->checkVat();

When I changed line
$euVatNoValidator = new Zend_Soap_Client (
to
$euVatNoValidator = new SoapClient (

...it just worked fine. It took mi an hour or so to notice that the 
class name used in examples is NOT Zend_Soap_Client, which I assumed 
form the constructor description.


There's more to it. I can use Zend_Soap_Client to getTypes() and 
getFunctions() successfully. It's just function call that causes 
SEGFAULT.


It is at least weird and I think that there should be some explanation 
why examples use PHP's SoapClient and not Zend_Soap_Client class.



P.S. Where should I report those SEGFAULTs? To PHP or ZF issue tracker?


--
Regards,
Szymon Wilkołazki


[fw-general] Call actions via CLI

2008-08-28 Thread Greg Frith

Hi all,

I'm currently using curl to call some actions at timed intervals using  
cron.  This is a far from ideal method, but has provided a quick fix  
for now.  I'd much prefer to call the actions via CLI, but I notice  
that there is currently no way to handle such requests.


I appreciate there is currently a proposal in placed for  
Zend_Controller_Request_Cli (http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Request_Cli 
), but this doesn't looked to have been touched for some time.


Just wondering if there are any plans afoot to proceed with a CLI  
request object, or how others are currently using ZF with the CLI.


:wq
Greg.


Re: [fw-general] Call actions via CLI

2008-08-28 Thread mbneto
Hi Greg,

I've been able to do this by creating the following code in my scripts

require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory(array(
  'default' => '/path/to/default/controllers'
));

$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setNeverRender(true);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);


$opts = new Zend_Console_Getopt('a:c:n:');

$controller = $opts->c;
$action = $opts->a;
$controllerAction = $controller . '/' . $action ;

$req = new Zend_Controller_Request_Http('http://xxx/' . $controllerAction);

switch ($controllerAction)
{
case 'c/a':
$req->setParam('n', $opts->n);
break;

//Special options
}

$front->setRequest($req);

$front->dispatch(); 

In my example I've used the Zend_Console_GetOpt just to have a single script
to act as my bootstrap and based on the options passed by the command line
dispatch the request to the proper controller/action.  It works BUT  I've
posted this code here before asking if this is the 'right' way to do it or
am I doing something that will break in newer versions of ZF since I am
relying on some not documented/standard functionality...

On Thu, Aug 28, 2008 at 6:52 AM, Greg Frith <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I'm currently using curl to call some actions at timed intervals using
> cron.  This is a far from ideal method, but has provided a quick fix for
> now.  I'd much prefer to call the actions via CLI, but I notice that there
> is currently no way to handle such requests.
>
> I appreciate there is currently a proposal in placed for
> Zend_Controller_Request_Cli (
> http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Request_Cli),
> but this doesn't looked to have been touched for some time.
>
> Just wondering if there are any plans afoot to proceed with a CLI request
> object, or how others are currently using ZF with the CLI.
>
> :wq
> Greg.
>


Re: [fw-general] Speed and performance between ZF releases

2008-08-28 Thread Matthew Weier O'Phinney
-- Benjamin Eberlei <[EMAIL PROTECTED]> wrote
(on Thursday, 28 August 2008, 11:06 AM +0200):
> Rasmus Lerdorf had a new talk (froscon08) on framework performance in general 
> and vs using no framework at all and came up with ZF being roughly in the 
> mid-field (Cake being way slower, CodeIgniter being faster).
> 
> He also talked about some optimizing strategies regarding include path, and 
> the include strategy in general, so i took some time to optimize within the 
> Zend Framework and found interesting results: Stripping all require_once from 
> the complete Zend Framework code, and require (without once) all file 
> dependancies directly in your main script gives you a performance boost of 
> about 20-40% for each request.

This is actually something that a lot of performance experts recommend
already, and something I want to approach with 2.0. Other projects that
are doing autoloading or discussing it are also adding some logging to
see what files are loaded per request -- which allows you to generate
the list of requires to use as you state above. When you use this
strategy alongside an opcode cache, even if not all classes are
necessary for each given request, you get a pretty significant boost.

The one place where this will not work is plugins, particularly if you
have project-specific plugins that override functionality, but which are
only used in some areas of the site. However, I think we can likely
figure out ways around this as well.

How did you strip the require statements? Did you use a script? inclued?
or...?

> See all the different include strategies and their numbers here:
> 
> http://www.whitewashing.de/blog/articles/73
> 
> If requiring all the dependant files up front is to hard to find out, you 
> could still optimize performance of the Zend Framework by fixing your include 
> path (put /usr/share/php in front of the dot, rather the default config which 
> work the other way round) and strip all require_once 'Zend/*'; code from
> your downloaded ZF library source code.
> 
> 
> On Tuesday 26 August 2008 19:27:27 Endijs Lisovskis wrote:
> > At first let me say THANKS for your reply! I was not expecting such a long
> > comment. I will definitely look at ZF 1.7 features and optimizations.
> >
> > I can't give you any links to articles where someone is pointing out that
> > ZF is slow, except one you already gave. But each time when I talk about
> > frameworks and ZF in particular I receive negative reactions and all of
> > theme are because of doubts about ZF performance. Those comments I receive
> > in my blog where I talk about ZF and even maybe promote it and in local PHP
> > forum too.
> > OK - those who comment cant provide exact numbers in which I could see
> > difference between ZF and other frameworks. But all they need to say - ZF
> > is complicated, big and with a lot of components etc. etc. And each version
> > is becoming bigger and bigger. I would like to argue, that growth in
> > features is not affecting speed - but I can't because there are no any
> > tests out there.
> > I hope you see the problem. In short "They say it is slow, but there is no
> > way we can prove they are wrong".
> >
> > And sorry for my grammar and structure of sentences. English is not my
> > mothers tongue, so it is not very easy for me to write in correct English.
> >
> > wllm wrote:
> > > Where have you heard that ZF is one of the slowest frameworks out there?
> > > While I haven't heard many claims that ZF is the most performant- that
> > > distinction is usually reserved for Code Igniter or one of the other
> > > lightweight, performance-focused frameworks- I haven't heard any claims
> > > that it is the least performant. The most transparent and sound
> > > benchmarks that I've seen are available here:
> > > http://www.avnetlabs.com/php/php-framework-comparison-benchmarks. That
> > > puts ZF at roughly 50% of the throughput of Code Igniter. That may sound
> > > like a lot at first, but as I mention in a comment there, baseline PHP
> > > can handle *15 times* the load than Code Igniter and CakePHP falls far
> > > short of both (at least in these particular tests). This article
> > > demonstrates well that accurate performance characterizations among
> > > different frameworks are *extremely* difficult to come up with in the
> > > first place, and that any framework faces tradeoffs between performance
> > > and functionality. In the end, I'm pretty comfortable with the
> > > characterization that ZF is 'twice as slow' as a framework that has been
> > > optimized from the get go for performance like Code Igniter. Those who
> > > understand the tests at hand and have real performance requirements will
> > > understand that this may easily be eclipsed by functionality
> > > requirements for any given project.
> > > That said, we are planning to focus all of the Zend team's contributions
> > > for 1.7 around performance analysis and enhancements. We don't have a
> > > test environment with which

Re: [fw-general] Call actions via CLI

2008-08-28 Thread Matthew Weier O'Phinney
-- Greg Frith <[EMAIL PROTECTED]> wrote
(on Thursday, 28 August 2008, 11:52 AM +0100):
> I'm currently using curl to call some actions at timed intervals using  
> cron.  This is a far from ideal method, but has provided a quick fix for 
> now.  I'd much prefer to call the actions via CLI, but I notice that 
> there is currently no way to handle such requests.
>
> I appreciate there is currently a proposal in placed for  
> Zend_Controller_Request_Cli 
> (http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Request_Cli 
> ), but this doesn't looked to have been touched for some time.
>
> Just wondering if there are any plans afoot to proceed with a CLI  
> request object, or how others are currently using ZF with the CLI.

This is something I'd really like to see, but simply have not had the
time to push through. If anybody would like to pick up where Cal left
off, I'll certainly provided feedback and support.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Call actions via CLI

2008-08-28 Thread Benjamin Eberlei
in my opinion using MVC on CLI is totally useluss. Its way easier to recognize
a script as already in its right location, instantiating the models and 
calling the respective actions that are desired. This also does not create 
the usual MVC overhead and is way more flexible.

Since mostly CLI scripts are run as cronjobs they "own" a far less set of 
controllers and actions and its common to create a cronjob script for each 
task that has to be done and group only tied tasks together in a single 
script. this offers greater flexibility in calling the scripts from crontab 
and allows to differentiate their meaning through the script name.

also if you use your applications MVC layout the controllers you provide are 
accessible from "public" web (aslong you dont secure them extra), which is 
bad. image someone denial of serviving your CLi scripts.

greets,
Benjamin

On Thursday 28 August 2008 12:52:25 Greg Frith wrote:
> Hi all,
>
> I'm currently using curl to call some actions at timed intervals using
> cron.  This is a far from ideal method, but has provided a quick fix
> for now.  I'd much prefer to call the actions via CLI, but I notice
> that there is currently no way to handle such requests.
>
> I appreciate there is currently a proposal in placed for
> Zend_Controller_Request_Cli
> (http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Request_Cli
> ), but this doesn't looked to have been touched for some time.
>
> Just wondering if there are any plans afoot to proceed with a CLI
> request object, or how others are currently using ZF with the CLI.
>
> :wq
>
> Greg.



-- 
Benjamin Eberlei
http://www.beberlei.de


Re: [fw-general] Speed and performance between ZF releases

2008-08-28 Thread Benjamin Eberlei
i used a script to find all lines that matched the rough pattern 
require_once '/Zend[^;]; and sourounded them with /* */.

to find all the files needed (and which is more important, order them 
correctly to solve all dependancies) i used Inclued which helps alot in this 
regard.

On Thursday 28 August 2008 14:17:09 Matthew Weier O'Phinney wrote:
> -- Benjamin Eberlei <[EMAIL PROTECTED]> wrote
>
> (on Thursday, 28 August 2008, 11:06 AM +0200):
> > Rasmus Lerdorf had a new talk (froscon08) on framework performance in
> > general and vs using no framework at all and came up with ZF being
> > roughly in the mid-field (Cake being way slower, CodeIgniter being
> > faster).
> >
> > He also talked about some optimizing strategies regarding include path,
> > and the include strategy in general, so i took some time to optimize
> > within the Zend Framework and found interesting results: Stripping all
> > require_once from the complete Zend Framework code, and require (without
> > once) all file dependancies directly in your main script gives you a
> > performance boost of about 20-40% for each request.
>
> This is actually something that a lot of performance experts recommend
> already, and something I want to approach with 2.0. Other projects that
> are doing autoloading or discussing it are also adding some logging to
> see what files are loaded per request -- which allows you to generate
> the list of requires to use as you state above. When you use this
> strategy alongside an opcode cache, even if not all classes are
> necessary for each given request, you get a pretty significant boost.
>
> The one place where this will not work is plugins, particularly if you
> have project-specific plugins that override functionality, but which are
> only used in some areas of the site. However, I think we can likely
> figure out ways around this as well.
>
> How did you strip the require statements? Did you use a script? inclued?
> or...?
>
> > See all the different include strategies and their numbers here:
> >
> > http://www.whitewashing.de/blog/articles/73
> >
> > If requiring all the dependant files up front is to hard to find out, you
> > could still optimize performance of the Zend Framework by fixing your
> > include path (put /usr/share/php in front of the dot, rather the default
> > config which work the other way round) and strip all require_once
> > 'Zend/*'; code from your downloaded ZF library source code.
> >
> > On Tuesday 26 August 2008 19:27:27 Endijs Lisovskis wrote:
> > > At first let me say THANKS for your reply! I was not expecting such a
> > > long comment. I will definitely look at ZF 1.7 features and
> > > optimizations.
> > >
> > > I can't give you any links to articles where someone is pointing out
> > > that ZF is slow, except one you already gave. But each time when I talk
> > > about frameworks and ZF in particular I receive negative reactions and
> > > all of theme are because of doubts about ZF performance. Those comments
> > > I receive in my blog where I talk about ZF and even maybe promote it
> > > and in local PHP forum too.
> > > OK - those who comment cant provide exact numbers in which I could see
> > > difference between ZF and other frameworks. But all they need to say -
> > > ZF is complicated, big and with a lot of components etc. etc. And each
> > > version is becoming bigger and bigger. I would like to argue, that
> > > growth in features is not affecting speed - but I can't because there
> > > are no any tests out there.
> > > I hope you see the problem. In short "They say it is slow, but there is
> > > no way we can prove they are wrong".
> > >
> > > And sorry for my grammar and structure of sentences. English is not my
> > > mothers tongue, so it is not very easy for me to write in correct
> > > English.
> > >
> > > wllm wrote:
> > > > Where have you heard that ZF is one of the slowest frameworks out
> > > > there? While I haven't heard many claims that ZF is the most
> > > > performant- that distinction is usually reserved for Code Igniter or
> > > > one of the other lightweight, performance-focused frameworks- I
> > > > haven't heard any claims that it is the least performant. The most
> > > > transparent and sound benchmarks that I've seen are available here:
> > > > http://www.avnetlabs.com/php/php-framework-comparison-benchmarks.
> > > > That puts ZF at roughly 50% of the throughput of Code Igniter. That
> > > > may sound like a lot at first, but as I mention in a comment there,
> > > > baseline PHP can handle *15 times* the load than Code Igniter and
> > > > CakePHP falls far short of both (at least in these particular tests).
> > > > This article demonstrates well that accurate performance
> > > > characterizations among different frameworks are *extremely*
> > > > difficult to come up with in the first place, and that any framework
> > > > faces tradeoffs between performance and functionality. In the end,
> > > > I'm pretty comfortable with the characterization that ZF

Re: [fw-general] $this->getRequest()->isPost() vs. ($_SERVER['REQUEST_METHOD'] == 'POST')

2008-08-28 Thread HMunroe


Matthew Weier O'Phinney-3 wrote:
> 
> First, you _can_ use the $_request property directly. However, if you
> ever modify getRequest() in your class or in a custom base controller
> class, then you may be accessing the wrong property or overriding
> necessary business logic. For this reason, we recommend using
> getRequest() to grab the request object. (This is good OOP practice,
> btw.)
> 
I understand that, and I am OK with it (and I welcome all the new features
added like the params stuff), but the example I gave is with $_SERVER and
not $_REQUEST. And it is a good OOP practice, but in this case is a way too
much for something so simple. 


Matthew Weier O'Phinney-3 wrote:
> 
> Next, using isPost() is more portable than using
> $_SERVER['REQUEST_METHOD']. The reasons are that your web server may or
> may not populate this environment variable, and for testing. With
> testing, we allow you to specifically set the request method -- $_SERVER
> is never modified in this case. This gives you the ability to test your
> applications without needing a web server involved.
> 
I see, it's cool.
-- 
View this message in context: 
http://www.nabble.com/%24this-%3EgetRequest%28%29-%3EisPost%28%29-vs.-%28%24_SERVER-%27REQUEST_METHOD%27--%3D%3D-%27POST%27%29-tp19185079p19199833.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Can not find $this object on the ZF view script

2008-08-28 Thread Kexiao Liao

We have developped our web application using ZF 1.5.? on linux, the
application running well in the linux box. However once we deployed the
application on the Mac OS system, $this object can not be assigned
approprite values in all view script. The Mac OS file system is
case-insentative, linux file system is case-sentative.  Following are part
of phpinfo from Mac OS system:

PHP Version 5.2.4
www.entropy.ch Release 1 (Universal Binary)

System  Darwin Colorectal-Experiment.local 8.11.0 Darwin Kernel Version
8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power
Macintosh
Build Date  Aug 31 2007 23:54:42
Configure Command   './configure' '--prefix=/usr/local/php5' '--with-apxs'
'--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv'
'--with-openssl=/usr' '--with-zlib=/usr' '--with-gd' '--with-zlib-dir=/usr'
'--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr'
'--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8'
'--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase'
'--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--with-bz2=/usr'
'--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip'
'--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--with-curl=shared,/usr/local/php5'
'--with-mysql=shared,/usr/local/php5'
'--with-mysqli=shared,/usr/local/php5/bin/mysql_config'
'--with-pdo-mysql=shared,/usr/local/php5'
'--with-libxml-dir=shared,/usr/local/php5'
'--with-xsl=shared,/usr/local/php5' '--with-pdflib=shared,/usr/local/php5'
'--with-oci8=shared,instantclient,/usr/local/php5/oracle'
'--with-pdo-oci=shared,instantclient,/usr/local/php5/oracle,10.1.0.3'
'--with-imap=../imap-2004g' '--with-kerberos=/usr' '--with-imap-ssl=/usr'
'--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5'
'--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5'
'--with-iodbc=shared,/usr' '--with-pgsql=shared,/usr/local/php5'
'--with-pdo-pgsql=shared,/usr/local/php5' '--with-t1lib=/usr/local/php5'
'--with-gettext=shared,/usr/local/php5' '--with-ming=shared,/usr/local/php5'
'--with-mcrypt=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5'
'--with-mssql=shared,/usr/local/php5'
'--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloperLibraries/Library/FrontBase'
'--with-json=shared' '--enable-memcache' '--enable-openbase_module'
Server API  Apache
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /usr/local/php5/lib
Loaded Configuration File   /usr/local/php5/lib/php.ini
Scan this dir for additional .ini files /usr/local/php5/php.d
additional .ini files parsed/usr/local/php5/php.d/10-extension_dir.ini,
/usr/local/php5/php.d/50-extension-curl.ini,
/usr/local/php5/php.d/50-extension-fbsql.ini,
/usr/local/php5/php.d/50-extension-gettext.ini,
/usr/local/php5/php.d/50-extension-json.ini,
/usr/local/php5/php.d/50-extension-mcrypt.ini,
/usr/local/php5/php.d/50-extension-mhash.ini,
/usr/local/php5/php.d/50-extension-ming.ini,
/usr/local/php5/php.d/50-extension-mssql.ini,
/usr/local/php5/php.d/50-extension-mysql.ini,
/usr/local/php5/php.d/50-extension-mysqli.ini,
/usr/local/php5/php.d/50-extension-oci8.ini,
/usr/local/php5/php.d/50-extension-odbc.ini,
/usr/local/php5/php.d/50-extension-pdf.ini,
/usr/local/php5/php.d/50-extension-pdo_mysql.ini,
/usr/local/php5/php.d/50-extension-pdo_oci.ini,
/usr/local/php5/php.d/50-extension-pdo_pgsql.ini,
/usr/local/php5/php.d/50-extension-pgsql.ini,
/usr/local/php5/php.d/50-extension-xsl.ini
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Debug Build no
Thread Safety   disabled
Zend Memory Manager enabled
IPv6 Supportenabled
Registered PHP Streams  zip, php, file, data, http, ftp, compress.bzip2,
compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2,
tls
Registered Stream Filters   string.rot13, string.toupper, string.tolower,
string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Debugger v5.2.14, Copyright (c) 1999-2008, by Zend
Technologies


apache
APACHE_INCLUDE  no value
APACHE_TARGET   no value
Apache Version  Apache/1.3.33 (Darwin) PHP/5.2.4
Apache Release  10333100
Apache API Version  19990320
Hostname:Port   10.73.153.26:80
User/Group  www(70)/70
Max RequestsPer Child: 10 - Keep Alive: on - Max Per Connection: 100
TimeoutsConnection: 300 - Keep-Alive: 15
Server Root /usr
Loaded Modules  mod_WebObjects, mod_php5, mod_bonjour, mod_hfs_apple,
mod_setenvif, mod_so, mod_log_forensic, mod_auth, mod_access, mod_rewrite,
mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
mod_autoindex, mod_include, mod_negotiation, mod_mime, mod_log_config,
http_core


Re: [fw-general] Does anybody use Zend Framework with IIS?

2008-08-28 Thread Jani Hartikainen

IIS7 on Windows Server 2008 here. Works perfectly,
though I had to tweak PHP configs to suit my tastes
(short_open_tags = On and some others)

On Thu, 28 Aug 2008 12:16:43 +0300, Nikolay Alexeev <[EMAIL PROTECTED]>  
wrote:



I don't believe in it anymore 




--
Jani Hartikainen
http://codeutopia.net/


Re: [fw-general] $this->getRequest()->isPost() vs. ($_SERVER['REQUEST_METHOD'] == 'POST')

2008-08-28 Thread Matthew Weier O'Phinney
-- HMunroe <[EMAIL PROTECTED]> wrote
(on Thursday, 28 August 2008, 05:49 AM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > 
> > First, you _can_ use the $_request property directly. However, if you
> > ever modify getRequest() in your class or in a custom base controller
> > class, then you may be accessing the wrong property or overriding
> > necessary business logic. For this reason, we recommend using
> > getRequest() to grab the request object. (This is good OOP practice,
> > btw.)
> > 
> I understand that, and I am OK with it (and I welcome all the new features
> added like the params stuff), but the example I gave is with $_SERVER and
> not $_REQUEST. And it is a good OOP practice, but in this case is a way too
> much for something so simple. 

I mainly highlighted that as I anticipated others raising the question
of why getRequest() is used over _request.

BTW, $_REQUEST != the request object. The request object encapsulates a
variety of sources, including the various sources used by $_REQUEST, but
also $_SERVER, $_ENV, etc. This simplifies access to a variety of
sources, as well as provides abstraction and encapsulation, allowing
you to seamlessly switch between environments.

It may seem overkill for "something so simple", but often using $_SERVER
is oversimplification and non-portable.

> Matthew Weier O'Phinney-3 wrote:
> > Next, using isPost() is more portable than using
> > $_SERVER['REQUEST_METHOD']. The reasons are that your web server may or
> > may not populate this environment variable, and for testing. With
> > testing, we allow you to specifically set the request method -- $_SERVER
> > is never modified in this case. This gives you the ability to test your
> > applications without needing a web server involved.
> > 
> I see, it's cool.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] Urgent help needed re. zend_layout

2008-08-28 Thread gsharma
Hi guys, I'm working on a project and need some help here. I'm trying
to implement some kind of layout here and Im not sure how to do it with
zend layout. 

My web site design is as follows:






Now the navigation has links to
modules where each module is a controller - I understand the part on
showing individual content in the main content area by calling
layout()->content however I need have the same navigation in each module. I am not sure how to go about showing the navigation for other modules (other than the default one)Is the navigation a part of the layout? how will i call it in different modules?

Re: [fw-general] Can not find $this object on the ZF view script

2008-08-28 Thread Jack Sleight

Can you provide the error you are receiving and the code that's causing it?

Kexiao Liao wrote:

We have developped our web application using ZF 1.5.? on linux, the
application running well in the linux box. However once we deployed the
application on the Mac OS system, $this object can not be assigned
approprite values in all view script. The Mac OS file system is
case-insentative, linux file system is case-sentative.  Following are part
of phpinfo from Mac OS system:

PHP Version 5.2.4
www.entropy.ch Release 1 (Universal Binary)

System  Darwin Colorectal-Experiment.local 8.11.0 Darwin Kernel Version
8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power
Macintosh
Build Date  Aug 31 2007 23:54:42
Configure Command   './configure' '--prefix=/usr/local/php5' '--with-apxs'
'--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv'
'--with-openssl=/usr' '--with-zlib=/usr' '--with-gd' '--with-zlib-dir=/usr'
'--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr'
'--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8'
'--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase'
'--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--with-bz2=/usr'
'--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip'
'--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--with-curl=shared,/usr/local/php5'
'--with-mysql=shared,/usr/local/php5'
'--with-mysqli=shared,/usr/local/php5/bin/mysql_config'
'--with-pdo-mysql=shared,/usr/local/php5'
'--with-libxml-dir=shared,/usr/local/php5'
'--with-xsl=shared,/usr/local/php5' '--with-pdflib=shared,/usr/local/php5'
'--with-oci8=shared,instantclient,/usr/local/php5/oracle'
'--with-pdo-oci=shared,instantclient,/usr/local/php5/oracle,10.1.0.3'
'--with-imap=../imap-2004g' '--with-kerberos=/usr' '--with-imap-ssl=/usr'
'--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5'
'--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5'
'--with-iodbc=shared,/usr' '--with-pgsql=shared,/usr/local/php5'
'--with-pdo-pgsql=shared,/usr/local/php5' '--with-t1lib=/usr/local/php5'
'--with-gettext=shared,/usr/local/php5' '--with-ming=shared,/usr/local/php5'
'--with-mcrypt=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5'
'--with-mssql=shared,/usr/local/php5'
'--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloperLibraries/Library/FrontBase'
'--with-json=shared' '--enable-memcache' '--enable-openbase_module'
Server API  Apache
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /usr/local/php5/lib
Loaded Configuration File   /usr/local/php5/lib/php.ini
Scan this dir for additional .ini files /usr/local/php5/php.d
additional .ini files parsed/usr/local/php5/php.d/10-extension_dir.ini,
/usr/local/php5/php.d/50-extension-curl.ini,
/usr/local/php5/php.d/50-extension-fbsql.ini,
/usr/local/php5/php.d/50-extension-gettext.ini,
/usr/local/php5/php.d/50-extension-json.ini,
/usr/local/php5/php.d/50-extension-mcrypt.ini,
/usr/local/php5/php.d/50-extension-mhash.ini,
/usr/local/php5/php.d/50-extension-ming.ini,
/usr/local/php5/php.d/50-extension-mssql.ini,
/usr/local/php5/php.d/50-extension-mysql.ini,
/usr/local/php5/php.d/50-extension-mysqli.ini,
/usr/local/php5/php.d/50-extension-oci8.ini,
/usr/local/php5/php.d/50-extension-odbc.ini,
/usr/local/php5/php.d/50-extension-pdf.ini,
/usr/local/php5/php.d/50-extension-pdo_mysql.ini,
/usr/local/php5/php.d/50-extension-pdo_oci.ini,
/usr/local/php5/php.d/50-extension-pdo_pgsql.ini,
/usr/local/php5/php.d/50-extension-pgsql.ini,
/usr/local/php5/php.d/50-extension-xsl.ini
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Debug Build no
Thread Safety   disabled
Zend Memory Manager enabled
IPv6 Supportenabled
Registered PHP Streams  zip, php, file, data, http, ftp, compress.bzip2,
compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2,
tls
Registered Stream Filters   string.rot13, string.toupper, string.tolower,
string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Debugger v5.2.14, Copyright (c) 1999-2008, by Zend
Technologies


apache
APACHE_INCLUDE  no value
APACHE_TARGET   no value
Apache Version  Apache/1.3.33 (Darwin) PHP/5.2.4
Apache Release  10333100
Apache API Version  19990320
Hostname:Port   10.73.153.26:80
User/Group  www(70)/70
Max RequestsPer Child: 10 - Keep Alive: on - Max Per Connection: 100
TimeoutsConnection: 300 - Keep-Alive: 15
Server Root /usr
Loaded Modules  mod_WebObjects, mod_php5, mod_bonjour, mod_hfs_apple,
mod_setenvif, mod_so, mod_log_forensic, mod_auth, mod_access, mod_rewrite,
mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod

Re: [fw-general] Does anybody use Zend Framework with IIS?

2008-08-28 Thread Nikolay Alexeev

Da! It works! On IIS 6.0! Should be used IIRF and php5isapi.dll as executable
for .php.
-- 
View this message in context: 
http://www.nabble.com/Does-anybody-use-Zend-Framework-with-IIS--tp19196976p19201442.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Is it possible to "skip" an action from a plugin?

2008-08-28 Thread Maurice Fonk

Hi all,

I am wondering whether it's possible to "skip" an action from plugin 
context. Based on certain conditions I want to *not* go ahead with 
execution of certain actions and use a cached version instead. I am 
wondering whether this is possible with the ZF dispatch process.


Thank you in advance,
Maurice Fonk


Re: [fw-general] Sending form on IIS

2008-08-28 Thread Nikolay Alexeev

I have solved this problem. I have changed .php executable from "php-cgi.exe"
to "php5isapi.dll". (I use IIRF for rewrite)
-- 
View this message in context: 
http://www.nabble.com/Sending-form-on-IIS-tp19158790p19201551.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Is it possible to "skip" an action from a plugin?

2008-08-28 Thread Matthew Weier O'Phinney
-- Maurice Fonk <[EMAIL PROTECTED]> wrote
(on Thursday, 28 August 2008, 04:21 PM +0200):
> I am wondering whether it's possible to "skip" an action from plugin  
> context. Based on certain conditions I want to *not* go ahead with  
> execution of certain actions and use a cached version instead. I am  
> wondering whether this is possible with the ZF dispatch process.

Yep -- just reset the state of the dispatched flag to false:

$request->setDispatched(false);

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Is it possible to "skip" an action from a plugin?

2008-08-28 Thread Maurice Fonk
I tried that, but it seems to get me into a loop. I have disabled all 
other plugins to be sure, but I can't seem to be able to pull this off.


Matthew Weier O'Phinney schreef:

-- Maurice Fonk <[EMAIL PROTECTED]> wrote
(on Thursday, 28 August 2008, 04:21 PM +0200):
  
I am wondering whether it's possible to "skip" an action from plugin  
context. Based on certain conditions I want to *not* go ahead with  
execution of certain actions and use a cached version instead. I am  
wondering whether this is possible with the ZF dispatch process.



Yep -- just reset the state of the dispatched flag to false:

$request->setDispatched(false);

  




Re: [fw-general] $this->getRequest()->isPost() vs. ($_SERVER['REQUEST_METHOD'] == 'POST')

2008-08-28 Thread HMunroe


Matthew Weier O'Phinney-3 wrote:
> 
> BTW, $_REQUEST != the request object. The request object encapsulates a
> variety of sources, including the various sources used by $_REQUEST, but
> also $_SERVER, $_ENV, etc. This simplifies access to a variety of
> sources, as well as provides abstraction and encapsulation, allowing
> you to seamlessly switch between environments.
> 

I am sorry, but I am not sure I follow -- what *other* environments ? Are
you talking about CLI applications ?

Otherwise, yeah, I am familiar w/ the request object from ZF, and all the
ideas applied there and it's cool. Sometimes I wonder what PHP would look
like if the superglobals are made read-only.
-- 
View this message in context: 
http://www.nabble.com/%24this-%3EgetRequest%28%29-%3EisPost%28%29-vs.-%28%24_SERVER-%27REQUEST_METHOD%27--%3D%3D-%27POST%27%29-tp19185079p19203132.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Can not find $this object on the ZF view script

2008-08-28 Thread Kexiao Liao

Following is my bootstrap index.php file:

db->adapter,
$configMozart->db->config->toArray () );
$dbAdapterMozart = Zend_Db::factory ( $configMozart->db->adapter,
$configMozart->db->config->toArray () );
Zend_Registry::set ( 'dbAdapter', $dbAdapter );
Zend_Registry::set ( 'dbAdapterMozart', $dbAdapterMozart );

/**
 * Initialized $db variable for the Ajax application
 */
$db = $dbAdapterMozart;
$RewriteBase = new Zend_Config_Ini ( './config.ini', 'SiteRelated' );
Zend_Registry::set ( 'RewriteBase', $RewriteBase );

/**
 *Create Zend_Acl object using Access Control List
 */
$acl = new Zend_Acl ( );
$acl->add ( new Zend_Acl_Resource ( 'index' ) )->add ( new Zend_Acl_Resource
( 'login' ) )->add ( new Zend_Acl_Resource ( 'logout' ) )->add ( new
Zend_Acl_Resource ( 'edit' ) )->add ( new Zend_Acl_Resource ( 'add' ) )->add
( new Zend_Acl_Resource ( 'delete' ) )->add ( new Zend_Acl_Resource (
'ldapsearch' ) )->add ( new Zend_Acl_Resource ( 'addperson' ) )->addRole (
new Zend_Acl_Role ( 'user' ) )->addRole ( new Zend_Acl_Role ( 'visitor' ),
'user' )->addRole ( new Zend_Acl_Role ( 'editor' ), 'user' )->addRole ( new
Zend_Acl_Role ( 'admin' ), 'editor' )->allow ()->deny ( null, 'edit' )->deny
( null, 'index' )->deny ( null, 'add' )->deny ( null, 'ldapsearch' )->deny (
null, 'addperson' )->allow ( 'user', 'add' )->allow ( 'user', 'index'
)->allow ( 'user', 'edit' )->allow ( 'admin', 'addperson' )->allow (
'admin', 'ldapsearch' );
Zend_Registry::set ( 'Acl', $acl );
/**
 * setup controller
 **/
$frontController = Zend_Controller_Front::getInstance ();
$frontController->throwExceptions ( true );
$frontController->setControllerDirectory ( './controllers' )->registerPlugin
( new MyPlugin ( ) );

$currentUser = Zend_Auth::getInstance ()->getIdentity ();
try {
$response = $frontController->dispatch ();
} catch ( Exception $e ) {
/**
 * handle exceptions yourself
 */
if ($_SERVER ['HTTP_HOST'] == 'mercx.bio.ri.ccf.org' or $_SERVER
['HTTP_HOST'] == 'test.access.ccf.org') {
echo $e;
echo " Current Session User: ";
print_r ( $currentUser );
} else {
//send mail to Jie and Kevin


echo "Error report has been sent to Support Team, they will 
handle it as
soon as possible.\n";
$mail = new Zend_Mail ( );
$mail->setBodyText ( $e . "\nCurrent Session User: \n" . 
serialize (
$currentUser ) );
//$mail->setBodyText (print_r($currentUser));
$mail->setFrom ( '[EMAIL PROTECTED]', 'Jie Dai' );
$mail->addTo ( '[EMAIL PROTECTED]', 'Jie Dai' );
$mail->addTo ( '[EMAIL PROTECTED]', 'Kevin Liao' );
$mail->setSubject ( 'DataEntry Error Report' );
$mail->send ();
}
}


It seems set_include_path statement has some problem in Mac OS server.

the stdlib.php file is located in ./lib directory, when I use require_once
('stdlib.php');
It can not load stdlib.php file. Same statement works pretty well in Linux
Server. I do not know what cause the problem? Any help will be appreciated.




Jack Sleight wrote:
> 
> Can you provide the error you are receiving and the code that's causing
> it?
> 
> Kexiao Liao wrote:
>> We have developped our web application using ZF 1.5.? on linux, the
>> application running well in the linux box. However once we deployed the
>> application on the Mac OS system, $this object can not be assigned
>> approprite values in all view script. The Mac OS file system is
>> case-insentative, linux file system is case-sentative.  Following are
>> part
>> of phpinfo from Mac OS system:
>>
>> PHP Version 5.2.4
>> www.entropy.ch Release 1 (Universal Binary)
>>
>> System   Darwin Colorectal-Experiment.local 8.11.0 Darwin Kernel Version
>> 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC
>> Power
>> Macintosh
>> Build Date   Aug 31 2007 23:54:42
>> Configure Command'./configure' '--prefix=/usr/local/php5' '--with-apxs'
>> '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv'
>> '--with-openssl=/usr' '--with-zlib=/usr' '--with-gd'
>> '--with-zlib-dir=/usr'
>> '--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr'
>> '--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8'
>> '--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase'
>> '--enable-mbstring' '--enable-calendar' '--enable-bcmath'
>> '--with-bz2=/usr'
>> '--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip'
>> '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm'
>> '--enable-sysvmsg' '--with-curl=shared,/usr/local/php5'
>> '--with-mysql=shared,/usr/local/php5'
>> '--with-mysqli=shared,/usr/local/php5/bin/mysql_config'
>> '--with-pdo-mysql=shared,/usr/local/php5'
>> '--with-libxml-dir=shared,/usr/local/php5'
>> '--with-xsl=shared,/usr/local/php5'
>> '--with-pdflib=shared,/usr/local/php5'

Re: [fw-general] $this->getRequest()->isPost() vs. ($_SERVER['REQUEST_METHOD'] == 'POST')

2008-08-28 Thread Matthew Weier O'Phinney
-- HMunroe <[EMAIL PROTECTED]> wrote
(on Thursday, 28 August 2008, 08:34 AM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > 
> > BTW, $_REQUEST != the request object. The request object encapsulates a
> > variety of sources, including the various sources used by $_REQUEST, but
> > also $_SERVER, $_ENV, etc. This simplifies access to a variety of
> > sources, as well as provides abstraction and encapsulation, allowing
> > you to seamlessly switch between environments.
> 
> I am sorry, but I am not sure I follow -- what *other* environments ? Are
> you talking about CLI applications ?

CLI, GTK, and, most importantly, unit tests, which are typically run via
CLI, but which usually setup their own environment. In the case of
Zend_Test_PHPUnit, we have stub request and response objects that are
used as drop-in replacements for the standard versions -- and which
allow you to set the values for the various data sources.

> Otherwise, yeah, I am familiar w/ the request object from ZF, and all the
> ideas applied there and it's cool. Sometimes I wonder what PHP would look
> like if the superglobals are made read-only.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] What is your Zend workflow?

2008-08-28 Thread ripcurlksm

What do you use to start your Zend projects? Eclipse?

What resources were critical when learning Zend?




Regards,
Kevin
-- 
View this message in context: 
http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19204909.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] What is your Zend workflow?

2008-08-28 Thread Juan Felipe Alvarez Saldarriaga
Eclipse PDT with subversion, database tools, remote system explorer, etc, but I 
don't know how to debug Zend Frameowrk there using Zend Debugger or XDebug :'( 
and you need OOP skills 
(http://en.wikipedia.org/wiki/Object-oriented_programming) and know about MVC 
pattern (http://en.wikipedia.org/wiki/Model-view-controller) I guess :D.

- Original Message -
From: "ripcurlksm" <[EMAIL PROTECTED]>
To: fw-general@lists.zend.com
Sent: Thursday, August 28, 2008 12:06:58 PM GMT -05:00 Columbia
Subject: [fw-general] What is your Zend workflow?


What do you use to start your Zend projects? Eclipse?

What resources were critical when learning Zend?




Regards,
Kevin
-- 
View this message in context: 
http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19204909.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] What is your Zend workflow?

2008-08-28 Thread Tobias Gies
Hi Juan,

you might want to check out this article on DevZone (about debugging using
XDebug):
http://devzone.zend.com/article/2930-Debugging-PHP-applications-with-xdebug

Best regards
Tobias

2008/8/28 Juan Felipe Alvarez Saldarriaga <[EMAIL PROTECTED]>

> Eclipse PDT with subversion, database tools, remote system explorer, etc,
> but I don't know how to debug Zend Frameowrk there using Zend Debugger or
> XDebug :'( and you need OOP skills (
> http://en.wikipedia.org/wiki/Object-oriented_programming) and know about
> MVC pattern (http://en.wikipedia.org/wiki/Model-view-controller) I guess
> :D.
>
> - Original Message -
> From: "ripcurlksm" <[EMAIL PROTECTED]>
> To: fw-general@lists.zend.com
> Sent: Thursday, August 28, 2008 12:06:58 PM GMT -05:00 Columbia
> Subject: [fw-general] What is your Zend workflow?
>
>
> What do you use to start your Zend projects? Eclipse?
>
> What resources were critical when learning Zend?
>
>
>
>
> Regards,
> Kevin
> --
> View this message in context:
> http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19204909.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] What is your Zend workflow?

2008-08-28 Thread SiCo007

I'm not really using anything special, PHP Designer, PHPMyAdmin and my head!
On the learning side the manual and this group were essential as were the
basics of MVC. Not to mention a willingness to play around and try different
methods.

Simon


ripcurlksm wrote:
> 
> What do you use to start your Zend projects? Eclipse?
> 
> What resources were critical when learning Zend?
> 
> Regards,
> Kevin
> 


-
Simon

http://www.ajb007.co.uk/
-- 
View this message in context: 
http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19205509.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] What is your Zend workflow?

2008-08-28 Thread Jeremy Brown
In addition to these lists, I have found that monitoring (and participating) in 
the #zftalk IRC channel to be immensely helpful.  If you pay attention long 
enough, you will see the patterns of what are the most common tasks people are 
trying to do or things they are running into problems with, and the most 
common, and often most desired, ways of dealing with them.  Plus, some of the 
core framework developers/contributors are in there too as well as others that 
have written blogs, tutorials, etc.  It's always nice to ask them for 
clarification on something they wrote or suggested.  Also the webinars listed 
at www.zend.com are a great resource too.


Jeremy Brown
Senior Web Developer
Spear One
972.661.6038
www.spearone.com


-Original Message-
From: SiCo007 [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 28, 2008 1:12 PM
To: fw-general@lists.zend.com
Subject: Re: [fw-general] What is your Zend workflow?


I'm not really using anything special, PHP Designer, PHPMyAdmin and my head!
On the learning side the manual and this group were essential as were the
basics of MVC. Not to mention a willingness to play around and try different
methods.

Simon


ripcurlksm wrote:
>
> What do you use to start your Zend projects? Eclipse?
>
> What resources were critical when learning Zend?
>
> Regards,
> Kevin
>


-
Simon

http://www.ajb007.co.uk/
--
View this message in context: 
http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19205509.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] What is your Zend workflow?

2008-08-28 Thread Bradley Holt
Kevin,

On Thu, Aug 28, 2008 at 1:06 PM, ripcurlksm <[EMAIL PROTECTED]> wrote:

>
> What do you use to start your Zend projects? Eclipse?


I use Zend Studio for Eclipse but I don't create it as a Zend Framework
project - I create the file system layout myself. I first create an empty
trunk in Subversion then "import" from there before I build out my project.


>
> What resources were critical when learning Zend?


The Programmer's Reference Guide  - I
read it beginning to end. Awesome job on the documentation guys, seriously!
The API Documentation  is useful
from time-to-time but I usually just find myself looking in the ZF code
itself instead. The code completion features of Zend Studio are helpful in
learning as well (which is really just using the API docs).


>
>
> Regards,
> Kevin
> --
> View this message in context:
> http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19204909.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend Layout and _forward

2008-08-28 Thread pvechi

Thanks for your reply Tobias.

In my example where I send only the title to the nav variable, i do so for
illustrative purposes. Eventually i want to send  a complete navigation
menu.

However, I am looking for direction with the code based on the example in
the ZF documentation. I am unsure how to create the menu based on the layout
view script, actionstack, or maybe the use of _forward, as it implies in the
doucmentation.

++Tx

Pete


Tobias Schifftner wrote:
> 
> Normally you should not always forward to an other action. Only if you
> really need to do so. Not all the time...
> 
> Well, as I can see you use already layout()->content; ?>, so
> all other $this->view variables will be within that. In your view script
> view/scripts/action.phtml you can just use
> 
> title ?>
> 
> But this only works when you not forward all the time. Just stay in you
> indexAction() function and you can easily use your variables in
> view/scripts/index.phtml
> 

-- 
View this message in context: 
http://www.nabble.com/Zend-Layout-and-_forward-tp19178382p19206389.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Layout and _forward

2008-08-28 Thread vladimirn

Not so hard i think.
If i understud well, you should use $this->_forward at the end of you
action.
So lets say you have IndexController.php and in this controller you want to
use forward 
_forward('menu','nav'); // where 'menu' stand for menuAction in
NavController and 'nav' is a NavController.php
}
}

Also you will like to setup in scripts/view/nav/menu.phtml and put in this
file whatever you want

then in you layout.phtml just call layout()->nav ?>

i hope this will work or help :)




pvechi wrote:
> 
> Thanks for your reply Tobias.
> 
> In my example where I send only the title to the nav variable, i do so for
> illustrative purposes. Eventually i want to send  a complete navigation
> menu.
> 
> However, I am looking for direction with the code based on the example in
> the ZF documentation. I am unsure how to create the menu based on the
> layout view script, actionstack, or maybe the use of _forward, as it
> implies in the doucmentation.
> 
> ++Tx
> 
> Pete
> 
> 
> Tobias Schifftner wrote:
>> 
>> Normally you should not always forward to an other action. Only if you
>> really need to do so. Not all the time...
>> 
>> Well, as I can see you use already layout()->content; ?>, so
>> all other $this->view variables will be within that. In your view script
>> view/scripts/action.phtml you can just use
>> 
>> title ?>
>> 
>> But this only works when you not forward all the time. Just stay in you
>> indexAction() function and you can easily use your variables in
>> view/scripts/index.phtml
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend-Layout-and-_forward-tp19178382p19207206.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] What is your Zend workflow?

2008-08-28 Thread David Mintz
> ripcurlksm wrote:
> >
> > What do you use to start your Zend projects? Eclipse?
> >
> > What resources were critical when learning Zend?
>
>

I for one have recently adopted Zend Studio for Eclipse and find it
extremely impressive even though I only know how to use about 2% of its
features. The subversion integration is beautiful and I am starting to get
into the PHPUnit support which is wonderfuly convenient, ergo a very Good
Thing. To my shame, I haven't really learned to use the debugger yet.

 I realize ZS for E has a few ZF-aware wizards (including what yo might call
a "smoking gun" Model creator that extends Zend_Db_Table_Abstract, thus
propogating the idea that model == table!) but it would be great to see a
tutorial or two on working with ZF projects in Eclipse.

Amen about the Programmer's Reference Guide. It is biblical.



-- 
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness


[fw-general] Inserting data into 2 tables in 1 form

2008-08-28 Thread andersl

Hi!

I have 2 tables - one containing basic info and one containing additional
info. Id like to create 1 page where I can insert data into both tables at
once. How can I do this?!

Regards Anders
-- 
View this message in context: 
http://www.nabble.com/Inserting-data-into-2-tables-in-1-form-tp19207622p19207622.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] About improving ZF doc translation

2008-08-28 Thread Jason Qi
Hi All,

Recently, we are experiencing a huge modification on the document formatting. 

Can we separate the formatting stuff from the documents(like what CSS does)? 
Thus, formatting stuffs are kept in one place and can apply to all languages, 
let our translators only focus on the translating job.

Thanks.

Jason.



  



RE: [fw-general] Inserting data into 2 tables in 1 form

2008-08-28 Thread Jeremy Brown
Create your form like you normally would, most likely using Zend_Form.   Then 
when the data is posted back to your script, instead of writing it to only one 
table, write only the data you want to be in the first table into it, and the 
remaining data into the other one.


Jeremy Brown
Senior Web Developer
Spear One
972.661.6038
www.spearone.com


-Original Message-
From: andersl [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 28, 2008 2:35 PM
To: fw-general@lists.zend.com
Subject: [fw-general] Inserting data into 2 tables in 1 form


Hi!

I have 2 tables - one containing basic info and one containing additional
info. Id like to create 1 page where I can insert data into both tables at
once. How can I do this?!

Regards Anders
--
View this message in context: 
http://www.nabble.com/Inserting-data-into-2-tables-in-1-form-tp19207622p19207622.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Inserting data into 2 tables in 1 form

2008-08-28 Thread till
On Thu, Aug 28, 2008 at 3:35 PM, andersl <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I have 2 tables - one containing basic info and one containing additional
> info. Id like to create 1 page where I can insert data into both tables at
> once. How can I do this?!
>
> Regards Anders

You can setup two models, both extending Zend_Db_Table_Abstract. It's
pretty simple, insert into one, getLastInsertId() (if I am not
mistaken) and then insert into the other. Or are you looking for a
more automatic solution to this?

You can also write straight queries with Zend_Db, but a model doesn't
hurt (imho).

Till


Re: [fw-general] Call actions via CLI

2008-08-28 Thread Juan Felipe Alvarez Saldarriaga
I have some "hack" to put call an action via CLI:

* I have a bootstrap with the config needed, is called cli.php 
(http://paste2.org/p/66998).
* So, I create a cli_app.php cli file then I include this cli.php inside this 
file, I have a global function that get arguments from the cli, so this 
cli_app.php have this arguments, cli_app.php --module= 
--controller= --action=, example of cli_app.php

#!/usr/bin/php -e
 (CliExamplePlugin.php) into the Front Controller 
object.

// Register plugin.
$objFrontController->registerPlugin( new CliExamplePlugin.php( $arrArguments ) 
);

#
# Dispatch front controller.
#

$objFrontController->dispatch();

So I send the arguments from the cli to plugin, so inside the plugin I got 
this: 

arrArguments = $arrArguments;
}

/**
 * Pre-Dispatch method.
 *
 * @param object Zend_Controller_Request_Abstract object.
 * @return void
 *
 * NOTE: See http://www.php.net/manual/en/language.oop5.typehinting.php
 */
public function preDispatch( Zend_Controller_Request_Abstract $objRequest )
{
// Set the right module to work in.
$objRequest->setModuleName( $this->arrArguments['module'] );

// Set controller to be executed.
$objRequest->setControllerName( $this->arrArguments['controller'] );

// Set the action that we want to execute.
$objRequest->setActionName( $this->arrArguments['action'] );
}
}

So the module, controller and action are set, then the action is executed, I 
know is pretty hacky, but work for me :).

- Original Message -
From: "Benjamin Eberlei" <[EMAIL PROTECTED]>
To: fw-general@lists.zend.com
Sent: Thursday, August 28, 2008 7:31:33 AM GMT -05:00 Columbia
Subject: Re: [fw-general] Call actions via CLI

in my opinion using MVC on CLI is totally useluss. Its way easier to recognize
a script as already in its right location, instantiating the models and 
calling the respective actions that are desired. This also does not create 
the usual MVC overhead and is way more flexible.

Since mostly CLI scripts are run as cronjobs they "own" a far less set of 
controllers and actions and its common to create a cronjob script for each 
task that has to be done and group only tied tasks together in a single 
script. this offers greater flexibility in calling the scripts from crontab 
and allows to differentiate their meaning through the script name.

also if you use your applications MVC layout the controllers you provide are 
accessible from "public" web (aslong you dont secure them extra), which is 
bad. image someone denial of serviving your CLi scripts.

greets,
Benjamin

On Thursday 28 August 2008 12:52:25 Greg Frith wrote:
> Hi all,
>
> I'm currently using curl to call some actions at timed intervals using
> cron.  This is a far from ideal method, but has provided a quick fix
> for now.  I'd much prefer to call the actions via CLI, but I notice
> that there is currently no way to handle such requests.
>
> I appreciate there is currently a proposal in placed for
> Zend_Controller_Request_Cli
> (http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Request_Cli
> ), but this doesn't looked to have been touched for some time.
>
> Just wondering if there are any plans afoot to proceed with a CLI
> request object, or how others are currently using ZF with the CLI.
>
> :wq
>
> Greg.



-- 
Benjamin Eberlei
http://www.beberlei.de


Re: [fw-general] Zend Layout and _forward

2008-08-28 Thread Tobias Schifftner

Hi Pete,

I actually did a start for a dynamic navigation. I never really finished
(and believe me, it's been a while) because I didn't really need it anymore
. But may be it gives you a hint.

Well, the navigation has to be on every page, why not use a plugin for
handeling?!?

class Navigation extends Zend_Controller_Plugin_Abstract
{
public function postDispatch (Zend_Controller_Request_Abstract $request)
{
 $this->view = Zend_Registry::get('Zend_View');

 $menuArray= $this->getAnArrayOfLinks();
 $this->getResponse()->insert('top_navigation',
$this->view->htmlList($menuArray));  

   }

   public function getAnArrayOfLink()
   {
  // Use database or whatever you like
   }
}


And in the view script just use layout()->navigation; ?>

Just try your luck, don't know whether it really works that way. It's been
too long ;-)

Greetings,
Tobias
-- 
View this message in context: 
http://www.nabble.com/Zend-Layout-and-_forward-tp19178382p19209753.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_File_Transfer_Adapter_Http proposal

2008-08-28 Thread Hinikato

Sorry for my English ;)
Zend_File_Transfer_Adapter_Http class could not handle properly multiple
file items (it set message only for first file item) and i created some
improvements. It is code:
_ensureMultipartFormData();
}

public function isValid($files)
{
$check   = $this->_getFiles($files);
$this->_messages = array();
foreach ($check as $file => $content) {
if (array_key_exists('validators', $content)) {
foreach ($content['validators'] as $class) {
$validator = $this->_validators[$class];
if (!$validator->isValid($file, $content)) {
$this->_messages[] = $validator->getMessages();
}
}
}
}
return count($this->_messages) ? false : true;
}

public function setOverwrite($flag)
{
$this->_overwrite = (bool) $flag;
return $this;
}

public function receive($files = null)
{
if (!$this->isValid($files)) {
return false;
}
$check = $this->_getFiles($files);
foreach ($check as $file => $content) {
$directory = '';
if (null !== ($destination = $this->getDestination($file))) {
$directory = $destination . DIRECTORY_SEPARATOR;
}

$filename = $content['name'];
if (!$this->_overwrite && file_exists($directory . $filename)) {
if (false === ($pos = strrpos($filename, '.'))) {
$pos = strlen($filename);
$ext = '';
} else {
$ext = substr($filename, $pos);
}
$i = 0;
do {
$filename = substr_replace($filename, $i++, $pos) .
$ext;
$destinationFile = $directory . $filename;
} while (file_exists($destinationFile));
} else {
$destinationFile = $directory . $filename;
}

if (!move_uploaded_file($content['tmp_name'], $destinationFile))
{
return false;
}
$this->_uploadedFiles[$file] = $filename;
}
return true;
}

public function getLastUploadedFile()
{
if (false === end($this->_uploadedFiles)) {
return false;
}
list($key, $val) = each($this->_uploadedFiles);
return array($key => $val);
}

public function getUploadedFiles()
{
return $this->_uploadedFiles;
}

public function getMessages()
{
return $this->_messages;
}

public function getErrors()
{
$errors = array();
while ($item = current($this->_messages)) {
$errors[] = key($item);
next($this->_messages);
}
return $errors;
}

public function setDestination($destination, $files = null) 
{
$destination = $this->_ensureWritable($destination);
parent::setDestination($destination, $files);
}

protected function _ensureWritable($dir)
{
$dir = rtrim(str_replace('\\', '/', $dir), '/');
if (!is_writable($dir) || !is_dir($dir)) {
if (!file_exists($dir)) {
// To create the folder with 0777 permissions, we need to
set umask to zero.
$umask = umask(0) ;
mkdir($dir, 0777, true);
umask($umask);
}
if (!is_writable($dir) || !is_dir($dir)) {
require_once 'Myak/File/Uploader/Exception.php';
throw new Myak_File_Uploader_Exception(sprintf('Directory
"%s" is not writable.', $dir));
}
}
return $dir;
}

protected function _ensureMultipartFormData()
{
if (count($_FILES)) {
return;
}
if (false === strpos($_SERVER['CONTENT_TYPE'],
'multipart/form-data')) {
require_once 'Myak/File/Uploader/Exception.php';
throw new Myak_File_Uploader_Exception('Submitted form does not
have enctype="multipart/form-data" attribute, no files loaded!');
}
}
}
-- 
View this message in context: 
http://www.nabble.com/Zend_File_Transfer_Adapter_Http-proposal-tp19211484p19211484.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Global View Helpers

2008-08-28 Thread Chris Tankersley
I'm sure I'm just missing something easy, but how do I register my
view helpers so that they are available to all my controllers? Right
now I'm registering them in my init() functions but is there a better
way of doing this? Or is this something best left to writing an Action
Helper for?


[fw-general] Re[fw-general] quest param

2008-08-28 Thread dele454

Hi,

I have URLs typically of this nature
http://mainevent.com/admin/members/view-profile/id/2

What if a parameter is not supplied to the URL. In order words the user
purposefully ommited the id param of the url to
http://mainevent.com/admin/members/view-profile

What would be the ideal thing to do in your controller? redirect to members
home or some sort of error message?

Am keen in knowing ;) thanks



-
dee
-- 
View this message in context: 
http://www.nabble.com/Request-param-tp19213079p19213079.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Global View Helpers

2008-08-28 Thread enportugal

Hi,

You can register it in your bootstrap


$view->setHelperPath('My/View/Helper/','My_View_Helper');

Regards


dragonmantank wrote:
> 
> I'm sure I'm just missing something easy, but how do I register my
> view helpers so that they are available to all my controllers? Right
> now I'm registering them in my init() functions but is there a better
> way of doing this? Or is this something best left to writing an Action
> Helper for?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Global-View-Helpers-tp19211790p19213165.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_File_Transfer_Adapter_Http proposal

2008-08-28 Thread Thomas Weidner
This is not a problem of Zend_File_Transfer but a problem of the actual 
implementation of Zend_Validate_Interface.
With your change the error messages are no longer translateable. This is 
problematic when using a translator for validation messages within your 
form.


Feel free to open issues for enhencements, they are always welcome.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "Hinikato" <[EMAIL PROTECTED]>

To: 
Sent: Friday, August 29, 2008 1:59 AM
Subject: [fw-general] Zend_File_Transfer_Adapter_Http proposal




Sorry for my English ;)
Zend_File_Transfer_Adapter_Http class could not handle properly multiple
file items (it set message only for first file item) and i created some
improvements.