[fw-general] Digital sign PDF

2010-01-12 Thread Andreas Kraftl
Hello,

has anybody an idea, how to add a digital signature to an PDF file?

It must be an X.509 certificate.

Thanks
Andreas
-- 
Kraftl EDV - Dienstleistungen
Linux, Linuxschulungen, Webprogrammierung
Autofabrikstraße 16/6
1230 Wien



Re: [fw-general] Digital sign PDF

2010-01-12 Thread Daniel Latter
Im am doing this at the moment and was going to use an image from a scanned
in signature, is this no good?


Thanks
Dan



2010/1/12 Andreas Kraftl andreas.kra...@kraftl.at

 Hello,

 has anybody an idea, how to add a digital signature to an PDF file?

 It must be an X.509 certificate.

 Thanks
 Andreas
 --
 Kraftl EDV - Dienstleistungen
 Linux, Linuxschulungen, Webprogrammierung
 Autofabrikstraße 16/6
 1230 Wien




[fw-general] Server URL absence in the URL view helper

2010-01-12 Thread Diego Potapczuk
Hi,

When i use the $this-url() in the view, it don´t include the server url, is
this the correct behavior?


Example:
?php echo $this-url(array('module' = 'admin',
'controller' = 'info',
'action' = 'show',
'id' = $this-var['id']),
'default', true);
?
// /admin/info/show/id/4 (what i get)

// /http://www.server.com/admin/info/show/id/4 (what i would like to get)


Thanks

::: Diego Potapczuk


Re: [fw-general] Server URL absence in the URL view helper

2010-01-12 Thread Daniel Latter

Yes, This is intended behaviour.


On 12 Jan 2010, at 17:29, Diego Potapczuk potapc...@gmail.com wrote:


Hi,

When i use the $this-url() in the view, it don´t include the server 
 url, is this the correct behavior?



Example:
?php echo $this-url(array('module' = 'admin',
'controller' =  
'info',

'action' = 'show',
'id' = $this-var 
['id']),

'default', true);
?
// /admin/info/show/id/4 (what i get)

// /http://www.server.com/admin/info/show/id/4 (what i would like to  
get)



Thanks

::: Diego Potapczuk




Re: [fw-general] Server URL absence in the URL view helper

2010-01-12 Thread scs
You can use/add $this-serverUrl(); to print the
http://www.server.com; part of the url.

scs


 On 12 Jan 2010, at 17:29, Diego Potapczuk potapc...@gmail.com wrote:

 Hi,

 When i use the $this-url() in the view, it don´t include the server url, is
 this the correct behavior?


 Example:
 ?php echo $this-url(array('module' = 'admin',
                                             'controller' = 'info',
                                             'action' = 'show',
                                             'id' = $this-var['id']),
     'default', true);
 ?
 // /admin/info/show/id/4 (what i get)

 // /http://www.server.com/admin/info/show/id/4 (what i would like to get)


 Thanks

 ::: Diego Potapczuk



[fw-general] catching exception of db connection error

2010-01-12 Thread scs
Hello,
How can I catch the exception and print an error message to visitiors
when there is a database connection error?
DB connection params are defined in the application.ini. and db
resource is initiated in bootstrap file.

something like this? :

//function initDatabase () {
try {
$this-bootstrap('db');
$db = $this-getResource('db');
Zend_Registry::set('db', $db);

} catch (Exception $e) {
echo 'db error '.$e-getMessage();
exit; // I have to put exit here in order to prevent other init
functions running?
}

Also,
I have to put exit(); in catch part in order to prevent the following
init functions run. Is this the correct way?

Thanks
scs


Re: [fw-general] catching exception of db connection error

2010-01-12 Thread Jurian Sluiman
I have this piece of code for my custom db resource, extending the zend db 
resource:

 $db = parent::init();
 try {
 $this-_connection = $db-getConnection();
 } catch (Exception $e) {
 $this-getBootstrap()-bootstrap('log');
 Zend_Registry::get('log')-crit('Database connection not responding');
 }
 return $db;

Now you're using the zend db resource functionality and test for a valid db 
connection. The log (already registered in the registry) is used to generate 
some output.
Regards, Jurian

-- 
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com

On Tuesday 12 Jan 2010 19:22:39 scs wrote:
 Hello,
 How can I catch the exception and print an error message to visitiors
 when there is a database connection error?
 DB connection params are defined in the application.ini. and db
 resource is initiated in bootstrap file.
 
 something like this? :
 
 //function initDatabase () {
 try {
   $this-bootstrap('db');
   $db = $this-getResource('db');
   Zend_Registry::set('db', $db);
 
 } catch (Exception $e) {
   echo 'db error '.$e-getMessage();
   exit; // I have to put exit here in order to prevent other init
 functions running?
 }
 
 Also,
 I have to put exit(); in catch part in order to prevent the following
 init functions run. Is this the correct way?
 
 Thanks
 scs


Re: [fw-general] Doctrine Counter Behavior

2010-01-12 Thread bparise


monk.e.boy wrote:
 
 
 
 bparise wrote:
 
 
 For some reason I don't really like imposing this dependency on the Post
 side.  Maybe I should decouple it and create a Topic::savePost(Post) that
 takes care of this?
 
 
 
 BINGO! ;)
 

Maybe this question is part of a larger design pattern.  I really like the
idea of having all functionality encapsulated in 1 class, but then again I
don't want to have to repeat myself.

For instance...

Topic::savePost(Post)
Topic::deletePost(Post)
Post::changetTopic(Topic)
Topic::sendEmailNotifications()

Ideally, these could all be under 1 service class... this way the models
don't have anything defined in them other than the ORM stuff.

ForumService::changeTopic(Post $post, Topic $newTopic)
ForumService::savePost(Post $post)
ForumService::deletePost(Post $post)
ForumService::sendEmailNotifications(Topic $topic)

What are your thoughts about this?  I feel its a bit of redundancy since
most of these methods are only going to be called within 1 place anyways.


-- 
View this message in context: 
http://n4.nabble.com/Doctrine-Counter-Behavior-tp1010418p1012383.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] catching exception of db connection error

2010-01-12 Thread Hector Virgen
Another solution would be to update your error controller to test the
exception to see if it is a Zend_Db_Adapter_Exception. When the connection
can't be made, this exception is thrown, but there may be other times when
it is thrown (like a bad query).

The advantage, however, is that your DB connection will remain lazy-loaded,
so if you're using caching there may be times when you don't need to connect
to the DB at all.

--
Hector


On Tue, Jan 12, 2010 at 10:31 AM, Jurian Sluiman subscr...@juriansluiman.nl
 wrote:

 I have this piece of code for my custom db resource, extending the zend db
 resource:

  $db = parent::init();
  try {
  $this-_connection = $db-getConnection();
  } catch (Exception $e) {
  $this-getBootstrap()-bootstrap('log');
  Zend_Registry::get('log')-crit('Database connection not
 responding');
  }
  return $db;

 Now you're using the zend db resource functionality and test for a valid db
 connection. The log (already registered in the registry) is used to
 generate
 some output.
 Regards, Jurian

 --
 Jurian Sluiman
 CTO Soflomo V.O.F.
 http://soflomo.com

 On Tuesday 12 Jan 2010 19:22:39 scs wrote:
  Hello,
  How can I catch the exception and print an error message to visitiors
  when there is a database connection error?
  DB connection params are defined in the application.ini. and db
  resource is initiated in bootstrap file.
 
  something like this? :
 
  //function initDatabase () {
  try {
$this-bootstrap('db');
$db = $this-getResource('db');
Zend_Registry::set('db', $db);
 
  } catch (Exception $e) {
echo 'db error '.$e-getMessage();
exit; // I have to put exit here in order to prevent other init
  functions running?
  }
 
  Also,
  I have to put exit(); in catch part in order to prevent the following
  init functions run. Is this the correct way?
 
  Thanks
  scs



Re: [fw-general] Digital sign PDF

2010-01-12 Thread Maxence Delannoy
2010/1/12 Andreas Kraftl andreas.kra...@kraftl.at

 Hello,

 has anybody an idea, how to add a digital signature to an PDF file?

 It must be an X.509 certificate.

 Thanks
 Andreas
 --
 Kraftl EDV - Dienstleistungen
 Linux, Linuxschulungen, Webprogrammierung
 Autofabrikstraße 16/6
 1230 Wien


I want to do the same thing. I've found this :
http://portablesigner.sourceforge.net/ but I've not tried it yet. It's a
java program which can be called from the command line.