[fw-general] Electronic Medical Records on Zend Framework

2008-03-22 Thread photo312

I am considering to use  Zend for an electronic medical record application. I
will be needing a secure application with authentication, authorization,
storing XML in the database, encryption of data, and internationalization.
Originally I was going to do coding by "hand" without any framework but
would like to know if Zend has all the necessary tools that I need that
would scale in an enterprise setting.

Please advise.
-- 
View this message in context: 
http://www.nabble.com/Electronic-Medical-Records-on-Zend-Framework-tp16230044s16154p16230044.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Locale and browser detection question (ZF 1.5)

2008-03-22 Thread Thomas Weidner

Robert,

as short summary:

*) Delete the else tree. Its not needed as described before.
*) Look at your array_key_exists clause... it's not doing what you expect it 
to do.


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

- Original Message - 
From: "Robert Castley" <[EMAIL PROTECTED]>
To: "Robert Castley" <[EMAIL PROTECTED]>; "Thomas Weidner" 
<[EMAIL PROTECTED]>

Sent: Saturday, March 22, 2008 11:40 PM
Subject: RE: [fw-general] Zend_Locale and browser detection question (ZF 
1.5)




Hi Thomas,

I know I am a pain, but I have already tried everything and it still 
doesn't
work as advertised.  I must be missing something but I can't figure it 
out.


I have now modified my code as follows, so my question now is, is this OK?

   public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
   $frontendOptions = array('lifetime' => 7200);
   $backendOptions = array('cache_dir' =>
Zend_Registry::get('config')->general->sessionSavePath);
   $cache = Zend_Cache::factory('Page', 'File', $frontendOptions,
$backendOptions);
   Zend_Translate::setCache($cache);

   $locale = new Zend_Locale();

   $options = array('scan' => Zend_Translate::LOCALE_DIRECTORY);

   $translate = new Zend_Translate('csv', 'languages', 'auto',
$options);

   if (!array_key_exists(substr($locale->__toString(), 0, 2),
$translate->getList())) {
   Zend_Registry::get('logger')->info('Locale ' . $locale . 'not
found resetting to English');
   $translate->setLocale('en');
   } else {
   $translate->setLocale('browser');
   }

   Zend_Registry::set('Zend_Translate', $translate);
   }

This seems to set the locale to English if, for example I choose Catalan
which is not a translated language in my app.

Thanks for being patient with me :-)

- Robert

-Original Message-
From: Thomas Weidner [mailto:[EMAIL PROTECTED]
Sent: 22 March 2008 22:27
To: Robert Castley; fw-general@lists.zend.com
Subject: Re: [fw-general] Zend_Locale and browser detection question (ZF
1.5)

Robert,

as I already said within the issue you opened you must use 'auto' when you
use directory scanning instead of 'browser'.
For 2) I gave you already the solution
And 3) can not work... you are using different options in your example 
code

1 and 3 because you set no language to use, so it uses always the last
found.

Please do not re-ask already answered questions ;-)

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

- Original Message -
From: "Robert Castley" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, March 22, 2008 11:14 PM
Subject: [fw-general] Zend_Locale and browser detection question (ZF 1.5)



I currently have:

public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
 $translate = new Zend_Translate('csv', 'languages', 'browser',
array('scan'=>Zend_Translate::LOCALE_DIRECTORY));
 $translate->setLocale('browser');
 Zend_Registry::set('Zend_Translate', $translate); }

If I don't use $translate->setLocale('browser'); it seems to display
the values of the last language file loaded.

A couple of things to note:

1) My language files are stored like so:

/languages
 -->en
   -->lang.en
 -->de
   -->lang.de
 -->fr
   -->lang.fr

2) If I set my browser to e.g. Cambodian(km) I will only see
messageIds in my view. How do I get this to default or downgrade to
English. In 1.0.4 using the addTranslation it use to downgrade through
the available languages sent by the browser i.e. if I had km -> es ->
en in my list it would display English.

3) If I cache the language files using:

   public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
   $frontendOptions = array('lifetime' => 7200);
   $backendOptions = array('cache_dir' =>
Zend_Registry::get('config')->general->sessionSavePath);
   $cache = Zend_Cache::factory('Page', 'File', $frontendOptions,
$backendOptions);
   Zend_Translate::setCache($cache);

   $options = array('scan' => Zend_Translate::LOCALE_DIRECTORY);

   $translate = new Zend_Translate('csv', 'languages', null,
$options);

   Zend_Registry::set('Zend_Translate', $translate);
   }

Once the cache has expired I will always get the last language loaded
displayed until I refresh again i.e. it is not picking up the browser
locale.

Many thanks,

- Robert


__
__ This email has been scanned for all known viruses by the
MessageLabs Email Security Service and the Macro 4 plc internal virus
protection system.
__
__




This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 plc internal virus protection system.



__

Re: [fw-general] Zend_Locale and browser detection question (ZF 1.5)

2008-03-22 Thread Thomas Weidner

Robert,

once again...

*) If you are using a auto locale you should not set it again afterwards.
Eigther you are doing like described in the manual using 'auto' and you need 
not to set the language afterwards OR you are using no language at all at 
creation and set if after initialization.


Using both like in your code is unnecesary and can lead to misbehaviour 
especially when you use two different automatted locales like in your code.


*) You set the locale to 'en' and then you do not want to have it set to 
'en' ???

What do you want ???

*) You are composing the locale yourself which does not work the way you did 
it. Have you read the manual about Zend_Locale before you used it ??

Why are you converting the object to an string and then cut it ??
See getLanguage / getRegion / isLocale / getBrowser

You should debug your code to see what your browser really returns...
Firefox for example returns always all locales with 100% but in the order 
you entered them.
So the question is what your browser returns, what languages are registered, 
and and and...

We can not just expect without having details.
Please inform yourself about basic ways of debugging. This will really help 
you.


Without any information it's just like driving blind on the roadway. ;-)

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

- Original Message - 
From: "Robert Castley" <[EMAIL PROTECTED]>
To: "Robert Castley" <[EMAIL PROTECTED]>; "Thomas Weidner" 
<[EMAIL PROTECTED]>

Sent: Saturday, March 22, 2008 11:40 PM
Subject: RE: [fw-general] Zend_Locale and browser detection question (ZF 
1.5)




Hi Thomas,

I know I am a pain, but I have already tried everything and it still 
doesn't
work as advertised.  I must be missing something but I can't figure it 
out.


I have now modified my code as follows, so my question now is, is this OK?

   public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
   $frontendOptions = array('lifetime' => 7200);
   $backendOptions = array('cache_dir' =>
Zend_Registry::get('config')->general->sessionSavePath);
   $cache = Zend_Cache::factory('Page', 'File', $frontendOptions,
$backendOptions);
   Zend_Translate::setCache($cache);

   $locale = new Zend_Locale();

   $options = array('scan' => Zend_Translate::LOCALE_DIRECTORY);

   $translate = new Zend_Translate('csv', 'languages', 'auto',
$options);

   if (!array_key_exists(substr($locale->__toString(), 0, 2),
$translate->getList())) {
   Zend_Registry::get('logger')->info('Locale ' . $locale . 'not
found resetting to English');
   $translate->setLocale('en');
   } else {
   $translate->setLocale('browser');
   }

   Zend_Registry::set('Zend_Translate', $translate);
   }

This seems to set the locale to English if, for example I choose Catalan
which is not a translated language in my app.

Thanks for being patient with me :-)

- Robert

-Original Message-
From: Thomas Weidner [mailto:[EMAIL PROTECTED]
Sent: 22 March 2008 22:27
To: Robert Castley; fw-general@lists.zend.com
Subject: Re: [fw-general] Zend_Locale and browser detection question (ZF
1.5)

Robert,

as I already said within the issue you opened you must use 'auto' when you
use directory scanning instead of 'browser'.
For 2) I gave you already the solution
And 3) can not work... you are using different options in your example 
code

1 and 3 because you set no language to use, so it uses always the last
found.

Please do not re-ask already answered questions ;-)

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

- Original Message -
From: "Robert Castley" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, March 22, 2008 11:14 PM
Subject: [fw-general] Zend_Locale and browser detection question (ZF 1.5)



I currently have:

public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
 $translate = new Zend_Translate('csv', 'languages', 'browser',
array('scan'=>Zend_Translate::LOCALE_DIRECTORY));
 $translate->setLocale('browser');
 Zend_Registry::set('Zend_Translate', $translate); }

If I don't use $translate->setLocale('browser'); it seems to display
the values of the last language file loaded.

A couple of things to note:

1) My language files are stored like so:

/languages
 -->en
   -->lang.en
 -->de
   -->lang.de
 -->fr
   -->lang.fr

2) If I set my browser to e.g. Cambodian(km) I will only see
messageIds in my view. How do I get this to default or downgrade to
English. In 1.0.4 using the addTranslation it use to downgrade through
the available languages sent by the browser i.e. if I had km -> es ->
en in my list it would display English.

3) If I cache the language files using:

   public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
   $frontendOptions = array('lifetime' => 7200);
   $backendOptions = array('cache_dir' =>
Zend_Registry::get('config')->general->sessionSavePath);
  

Re: [fw-general] How to get Filtered data from Zend_Input_Filter

2008-03-22 Thread dinoboff

>From the manual:
"Unknown fields are those that are not declared in any rule in the array of
validators, but appear in the input data. "

I think you need to add these field to validator array, even if there is no
validation needed. I don't if you need add some rules. If its needed you can
use the presence metacommand.

There is also getUnknown() method. But I don't know if the values will be
filtered or escaped.


mysticav wrote:
> 
> "Or should I use Zend_Input Directly "
> Sorry,  I mean Zend_Filter 
> 
> mysticav wrote:
>> 
>> Hi,
>> 
>> How can I get filtered data without using a validator, only the filter:
>> 
>> Example:
>> $validators = null;
>> $filters = array('StringTrim','StripTags');
>> $data = some data here.
>> 
>> $filter = new Zend_Filter_Input($filters, $validators,$data,$options);
>> 
>> // get filtered Data:
>> $filter->{field}
>> 
>> AS you can see, I didn't provide any validator.
>> 
>> Or should I use Zend_Input Directly ? 
>> 
>> Thanks.
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-Filtered-data-from-Zend_Input_Filter-tp16211128s16154p16228141.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Locale and browser detection question (ZF 1.5)

2008-03-22 Thread Thomas Weidner

Robert,

as I already said within the issue you opened you must use 'auto' when you 
use directory scanning instead of 'browser'.

For 2) I gave you already the solution
And 3) can not work... you are using different options in your example code 
1 and 3 because you set no language to use, so it uses always the last 
found.


Please do not re-ask already answered questions ;-)

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

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

To: 
Sent: Saturday, March 22, 2008 11:14 PM
Subject: [fw-general] Zend_Locale and browser detection question (ZF 1.5)



I currently have:

public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
 $translate = new Zend_Translate('csv', 'languages', 'browser',
array('scan'=>Zend_Translate::LOCALE_DIRECTORY));
 $translate->setLocale('browser');
 Zend_Registry::set('Zend_Translate', $translate);
}

If I don't use $translate->setLocale('browser'); it seems to display the
values of the last language file loaded.

A couple of things to note:

1) My language files are stored like so:

/languages
 -->en
   -->lang.en
 -->de
   -->lang.de
 -->fr
   -->lang.fr

2) If I set my browser to e.g. Cambodian(km) I will only see messageIds in
my view. How do I get this to default or downgrade to English. In 1.0.4
using the addTranslation it use to downgrade through the available 
languages
sent by the browser i.e. if I had km -> es -> en in my list it would 
display

English.

3) If I cache the language files using:

   public function preDispatch(Zend_Controller_Request_Abstract $request)
   {
   $frontendOptions = array('lifetime' => 7200);
   $backendOptions = array('cache_dir' =>
Zend_Registry::get('config')->general->sessionSavePath);
   $cache = Zend_Cache::factory('Page', 'File', $frontendOptions,
$backendOptions);
   Zend_Translate::setCache($cache);

   $options = array('scan' => Zend_Translate::LOCALE_DIRECTORY);

   $translate = new Zend_Translate('csv', 'languages', null, 
$options);


   Zend_Registry::set('Zend_Translate', $translate);
   }

Once the cache has expired I will always get the last language loaded
displayed until I refresh again i.e. it is not picking up the browser
locale.

Many thanks,

- Robert



This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.
 




[fw-general] Zend_Locale and browser detection question (ZF 1.5)

2008-03-22 Thread Robert Castley
I currently have:

public function preDispatch(Zend_Controller_Request_Abstract $request)
{
  $translate = new Zend_Translate('csv', 'languages', 'browser',
array('scan'=>Zend_Translate::LOCALE_DIRECTORY));
  $translate->setLocale('browser');
  Zend_Registry::set('Zend_Translate', $translate);
}

If I don't use $translate->setLocale('browser'); it seems to display the
values of the last language file loaded.

A couple of things to note:

1) My language files are stored like so:

/languages
  -->en
-->lang.en
  -->de
-->lang.de
  -->fr
-->lang.fr

2) If I set my browser to e.g. Cambodian(km) I will only see messageIds in
my view. How do I get this to default or downgrade to English. In 1.0.4
using the addTranslation it use to downgrade through the available languages
sent by the browser i.e. if I had km -> es -> en in my list it would display
English.

3) If I cache the language files using:

public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$frontendOptions = array('lifetime' => 7200);
$backendOptions = array('cache_dir' =>
Zend_Registry::get('config')->general->sessionSavePath);
$cache = Zend_Cache::factory('Page', 'File', $frontendOptions,
$backendOptions);
Zend_Translate::setCache($cache);

$options = array('scan' => Zend_Translate::LOCALE_DIRECTORY);

$translate = new Zend_Translate('csv', 'languages', null, $options);

Zend_Registry::set('Zend_Translate', $translate);
}

Once the cache has expired I will always get the last language loaded
displayed until I refresh again i.e. it is not picking up the browser
locale.

Many thanks,

- Robert



This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.


[fw-general] Typo: ‘vist’

2008-03-22 Thread Joó Ádám
'For additional information on Zend Technology training courses vist
Zend Training.' @ http://framework.zend.com/support/training/


[fw-general] Missing link

2008-03-22 Thread Joó Ádám
'a link to quick start goes here' @ http://framework.zend.com/support/training/


Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread till
On Sat, Mar 22, 2008 at 5:36 PM, photo312 <[EMAIL PROTECTED]> wrote:
>
>
>  Thank you all for your replies. May I ask why someone said that hacking this
>  in PHP is not a good idea?

Hey,

should have elaborated.

I called this a hack because I see a webapp in a layered model. Which
means that (if we forget about tcp/ip for a second and simplify this
all the way) the first layer is your httpd (e.g. Apache) and then PHP.
Redirecting can be done in PHP, no questions asked, but (IMHO) it is
by no means the best fit. It's more the poor man's approach to
redirecting.

As others mentioned before you should either redirect completely in
the  or look into mod_rewrite if you need to be more
selective about which urls need SSL and which don't. It's (IMHO) more
flexible and generally a redirect has less to do with PHP since it's
pure http. mod_rewrite allows you to match URLs (e.g. /user/login) and
check the protocol/port (RewriteCond %{SERVER_PORT}!443$) and redirect
based on that. Since most people have mod_rewrite nowadays I see no
reason to do this in PHP.

But that's just my opinion. Of course you could also redirect with
JavaScript. ;-)

Cheers,
Till


Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread Michael B Allen
On 3/22/08, Isaak Malik <[EMAIL PROTECTED]> wrote:
> Actually this has nothing to do with hacking, using PHP to redirect to SSL
> URLs is a very good way to do it.
>
> If you want to force SSL for a few pages only PHP is the best way to do it
> as the code can be modified easily, if your whole website requires SSL the
> Apache configuration would be the recommended way to do this.

If you want the whole site to use HTTPS then mod_rewrite is the best method.

To selectively protect pages, such as a login form or administrative
screens, using a redirect within PHP is the best method.

A standard post-router plugin that enforces HTTPS for selected paths
would be nice. If the target path is designated to be HTTPS only and
HTTPS is not in effect, the client is redirected to the same URL with
the https:// protocol. If the target path is not designated to be
HTTPS only and HTTPS is in effect, the client is redirected to the
same URL with the http:// protocol. In all other cases, the plugin
would do nothing.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread Isaak Malik
Actually this has nothing to do with hacking, using PHP to redirect to SSL
URLs is a very good way to do it.

If you want to force SSL for a few pages only PHP is the best way to do it
as the code can be modified easily, if your whole website requires SSL the
Apache configuration would be the recommended way to do this.

On Sat, Mar 22, 2008 at 5:36 PM, photo312 <[EMAIL PROTECTED]> wrote:

>
>
> Thank you all for your replies. May I ask why someone said that hacking
> this
> in PHP is not a good idea?
> I have a "signup", "login" and "manage" pages/controllers that need to
> work
> under SSL, but other controllers over HTTP. I see no other way to
> implement
> this but to Hack this in PHP.  Why is this not good?
>
>
>
>
> Simon Mundy wrote:
> >
> > If it helps, here's a plugin I made to keep your controllers more tidy
> > (assuming you're using the Zend Framework MVC) and also retains the
> > current URI
> >
> > Just add this in your bootstrap:-
> >
> > $front = Zend_Controller_Front::getInstance();
> > ...stuff...
> > $front->registerPlugin(new MyApp_Controller_Plugin_Ssl(true));
> >
> >
> > ...and create this in your library structure for your app (assuming a
> > namespace of MyApp)
> >
> > class MyApp_Controller_Plugin_Ssl extends
> > Zend_Controller_Plugin_Abstract
> > {
> >  protected $_ssl;
> >
> >  public function __construct($enabled = true)
> >  {
> >  $this->_ssl = (BOOL) $enabled;
> >  }
> >
> >  public function preDispatch($action)
> >  {
> >  if ($this->_ssl)
> >  if (!isset($_SERVER['HTTPS']) ||
> > strtolower($_SERVER['HTTPS']) != 'on') {
> >  header('Location: https://' . $_SERVER['SERVER_NAME']
> >  . $_SERVER['REQUEST_URI']);
> >  exit;
> >  }
> >  }
> >  return $action;
> >  }
> > }
> >
> > HTH!
> >
> >> The SSL forcing can easily be created with the following code:
> >>
> >>  >> if ( !isset($_SERVER['HTTPS']) ) header('Location:
> >> https://www.yourdomain.com' )
> >> ;
> >> ?>
> >>
> >> If you include this code at the beginning of your page this will
> >> force a SSL connection for that page.
> >>
> >> On Sat, Mar 22, 2008 at 6:44 AM, photo312 <[EMAIL PROTECTED]> wrote:
> >>
> >> You are correct. What I meant is - is there any functionality to force
> >> "https" over "http"  or make only certain models or actions work
> >> only over
> >> SSL connections?
> >>
> >>
> >>
> >> Karl Katzke wrote:
> >> >
> >> > SSL is a function of your web *server*, such as apache or IIS, not
> >> of Zend
> >> > Framework.
> >> >
> >> > On Sat, Mar 22, 2008 at 12:29 AM, photo312 <[EMAIL PROTECTED]>
> >> wrote:
> >> >
> >> >>
> >> >> I would like to implement SSL with Zend Framework. Is there some
> >> built in
> >> >> code to handle this properly?
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216607.html
> >> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216688.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> >> --
> >> Isaak Malik
> >> Web Developer
> >> [EMAIL PROTECTED]
> >
> > --
> >
> > 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
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16224266.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Isaak Malik
Web Developer
[EMAIL PROTECTED]


Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread photo312


Thank you all for your replies. May I ask why someone said that hacking this
in PHP is not a good idea? 
I have a "signup", "login" and "manage" pages/controllers that need to work
under SSL, but other controllers over HTTP. I see no other way to implement
this but to Hack this in PHP.  Why is this not good?




Simon Mundy wrote:
> 
> If it helps, here's a plugin I made to keep your controllers more tidy  
> (assuming you're using the Zend Framework MVC) and also retains the  
> current URI
> 
> Just add this in your bootstrap:-
> 
> $front = Zend_Controller_Front::getInstance();
> ...stuff...
> $front->registerPlugin(new MyApp_Controller_Plugin_Ssl(true));
> 
> 
> ...and create this in your library structure for your app (assuming a  
> namespace of MyApp)
> 
> class MyApp_Controller_Plugin_Ssl extends  
> Zend_Controller_Plugin_Abstract
> {
>  protected $_ssl;
> 
>  public function __construct($enabled = true)
>  {
>  $this->_ssl = (BOOL) $enabled;
>  }
> 
>  public function preDispatch($action)
>  {
>  if ($this->_ssl)
>  if (!isset($_SERVER['HTTPS']) ||  
> strtolower($_SERVER['HTTPS']) != 'on') {
>  header('Location: https://' . $_SERVER['SERVER_NAME']
>  . $_SERVER['REQUEST_URI']);
>  exit;
>  }
>  }
>  return $action;
>  }
> }
> 
> HTH!
> 
>> The SSL forcing can easily be created with the following code:
>>
>> > if ( !isset($_SERVER['HTTPS']) ) header('Location:
>> https://www.yourdomain.com') 
>> ;
>> ?>
>>
>> If you include this code at the beginning of your page this will  
>> force a SSL connection for that page.
>>
>> On Sat, Mar 22, 2008 at 6:44 AM, photo312 <[EMAIL PROTECTED]> wrote:
>>
>> You are correct. What I meant is - is there any functionality to force
>> "https" over "http"  or make only certain models or actions work  
>> only over
>> SSL connections?
>>
>>
>>
>> Karl Katzke wrote:
>> >
>> > SSL is a function of your web *server*, such as apache or IIS, not  
>> of Zend
>> > Framework.
>> >
>> > On Sat, Mar 22, 2008 at 12:29 AM, photo312 <[EMAIL PROTECTED]>  
>> wrote:
>> >
>> >>
>> >> I would like to implement SSL with Zend Framework. Is there some  
>> built in
>> >> code to handle this properly?
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216607.html
>> >> Sent from the Zend Framework mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216688.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
>>
>>
>> -- 
>> Isaak Malik
>> Web Developer
>> [EMAIL PROTECTED]
> 
> --
> 
> 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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16224266.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Should I resolve issues on the tracker? (I'm not the component maintainer)

2008-03-22 Thread Amr Mostafa
Hi all,

I want to help a bit on the issue tracker, and I wonder how far I should go.
I see that I've the permission to "resolve issues". Should I do that or
would be better to only comment on the issue and leave the actual resolving
to the component maintainer? Of course, I'm mainly talking about issues that
doesn't need a fix (i.e. Not an issue, can't reproduce, ...etc), because
otherwise the component maintainer will ultimately be needed to actually
commit the fix.

Best,
- Amr


Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread till
On Sat, Mar 22, 2008 at 2:55 PM, Bruno Friedmann <[EMAIL PROTECTED]> wrote:
> The other simple way if you have apache is telling the virtual host
>  
> servername machin
>
> redirect / https://machin
>  
>  "Et voilà !"
>  Every resquest on http is carefully redirected on https.

+1

Don't hack this in PHP. If you don't have access to the virtualhost,
do it with mod_rewrite.

Till


Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread Simon Mundy
If it helps, here's a plugin I made to keep your controllers more tidy  
(assuming you're using the Zend Framework MVC) and also retains the  
current URI


Just add this in your bootstrap:-

$front = Zend_Controller_Front::getInstance();
...stuff...
$front->registerPlugin(new MyApp_Controller_Plugin_Ssl(true));


...and create this in your library structure for your app (assuming a  
namespace of MyApp)


class MyApp_Controller_Plugin_Ssl extends  
Zend_Controller_Plugin_Abstract

{
protected $_ssl;

public function __construct($enabled = true)
{
$this->_ssl = (BOOL) $enabled;
}

public function preDispatch($action)
{
if ($this->_ssl)
if (!isset($_SERVER['HTTPS']) ||  
strtolower($_SERVER['HTTPS']) != 'on') {

header('Location: https://' . $_SERVER['SERVER_NAME']
. $_SERVER['REQUEST_URI']);
exit;
}
}
return $action;
}
}

HTH!


The SSL forcing can easily be created with the following code:

if ( !isset($_SERVER['HTTPS']) ) header('Location: https://www.yourdomain.com') 
;

?>

If you include this code at the beginning of your page this will  
force a SSL connection for that page.


On Sat, Mar 22, 2008 at 6:44 AM, photo312 <[EMAIL PROTECTED]> wrote:

You are correct. What I meant is - is there any functionality to force
"https" over "http"  or make only certain models or actions work  
only over

SSL connections?



Karl Katzke wrote:
>
> SSL is a function of your web *server*, such as apache or IIS, not  
of Zend

> Framework.
>
> On Sat, Mar 22, 2008 at 12:29 AM, photo312 <[EMAIL PROTECTED]>  
wrote:

>
>>
>> I would like to implement SSL with Zend Framework. Is there some  
built in

>> code to handle this properly?
>> --
>> View this message in context:
>> 
http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216607.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216688.html
Sent from the Zend Framework mailing list archive at Nabble.com.




--
Isaak Malik
Web Developer
[EMAIL PROTECTED]


--

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] Implementing SSL with Zend Framework

2008-03-22 Thread Bruno Friedmann
The other simple way if you have apache is telling the virtual host

servername machin

redirect / https://machin

"Et voilà !"
Every resquest on http is carefully redirected on https.


Isaak Malik wrote:
> The SSL forcing can easily be created with the following code:
> 
>  if ( !isset($_SERVER['HTTPS']) ) header('Location:
> https://www.yourdomain.com');
> ?>
> 
> If you include this code at the beginning of your page this will force a SSL
> connection for that page.
> 
> On Sat, Mar 22, 2008 at 6:44 AM, photo312 <[EMAIL PROTECTED]> wrote:
> 
>> You are correct. What I meant is - is there any functionality to force
>> "https" over "http"  or make only certain models or actions work only over
>> SSL connections?
>>
>>
>>
>> Karl Katzke wrote:
>>> SSL is a function of your web *server*, such as apache or IIS, not of
>> Zend
>>> Framework.
>>>
>>> On Sat, Mar 22, 2008 at 12:29 AM, photo312 <[EMAIL PROTECTED]> wrote:
>>>
 I would like to implement SSL with Zend Framework. Is there some built
>> in
 code to handle this properly?
 --
 View this message in context:

>> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216607.html
 Sent from the Zend Framework mailing list archive at Nabble.com.


>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216688.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 


-- 

 Bruno Friedmann  [EMAIL PROTECTED]

Ioda-Net Sàrl   - www.ioda-net.ch
  2830 Vellerat - Switzerland

  Tél : ++41 32 435 7171
  Fax : ++41 32 435 7172
  gsm : ++41 78 802 6760

C'est Facile et Cool d'Évoluer en ligne : www.cfcel.com



Re: [fw-general] Implementing SSL with Zend Framework

2008-03-22 Thread Isaak Malik
The SSL forcing can easily be created with the following code:

https://www.yourdomain.com');
?>

If you include this code at the beginning of your page this will force a SSL
connection for that page.

On Sat, Mar 22, 2008 at 6:44 AM, photo312 <[EMAIL PROTECTED]> wrote:

>
> You are correct. What I meant is - is there any functionality to force
> "https" over "http"  or make only certain models or actions work only over
> SSL connections?
>
>
>
> Karl Katzke wrote:
> >
> > SSL is a function of your web *server*, such as apache or IIS, not of
> Zend
> > Framework.
> >
> > On Sat, Mar 22, 2008 at 12:29 AM, photo312 <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> I would like to implement SSL with Zend Framework. Is there some built
> in
> >> code to handle this properly?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216607.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216688.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Isaak Malik
Web Developer
[EMAIL PROTECTED]


Re: [fw-general] Website fonts size too large?

2008-03-22 Thread Vincent
On 3/22/08, Amr Mostafa <[EMAIL PROTECTED]> wrote:
>
> Thanks Wil, I would say that throughout the whole site, reducing the fonts
> size made it a better (usual) experience for me. (usual as when compared to
> other websites I'm browsing).


I have to say that, even on my 1280x1024 screen, the doc fonts look much,
much better when decreased in size one step.

Cheers,
> - Amr




-- 
Vincent