php-general Digest 26 Jul 2010 16:39:34 -0000 Issue 6865

2010-07-26 Thread php-general-digest-help

php-general Digest 26 Jul 2010 16:39:34 - Issue 6865

Topics (messages 307138 through 307139):

Re: Signing (hand-written signature) pdf document
307138 by: Tommy Pham

Re: Does class length slow down performance
307139 by: David Harkness

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
 -Original Message-
 From: Aurimas L [mailto:alaci...@gmail.com]
 Sent: Sunday, July 25, 2010 9:45 AM
 To: php-gene...@lists.php.net
 Subject: Re: [PHP] Signing (hand-written signature) pdf document
 
 
 Hello,
 
 have You found a solution for handwriten signature on the document? I am
 also looking for such solution for one PHP application. :) By the way, the
 signature must be created on mobile touchscreen as application is for smart
 phones.
 
 Thank You,
 
 Aurimas
 
 
 Ashley Sheridan-3 wrote:
 
  On Tue, 2009-10-13 at 20:07 -0700, nashrul wrote:
 
  Hi...
  I'm thinking about a document management system that can put user
  signature on the created digital document. Here's the app-flow I can
  imagine ...
  My php application creates a pdf document.
  The pdf document is displayed to user.
  Using the digital pen, the user will put his/her signature on this
  document.
  or Using the touch screen, the user will put his/her signature.
  The pdf document with the user signature is saved to the db.
  Has anyone done this before ??
  Thanks
  --
  View this message in context:
  http://www.nabble.com/Signing-%28hand-written-signature%29-pdf-
 docume
  nt-tp25884660p25884660.html Sent from the PHP - General mailing list
  archive at Nabble.com.
 
 
 
 
  A signature in a document is just an image. I've seen plenty of Flash
  apps which allow a user to draw something which is then saved as an
  image. You could then use this image file and either re-create the PDF
  document (easiest) or attempt to edit it and add the image in.
 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 
 
 
 --
 View this message in context: http://old.nabble.com/Signing-%28hand-
 written-signature%29-pdf-document-tp25884660p29260834.html
 Sent from the PHP - General mailing list archive at Nabble.com.
 
 

Digital copy of signature is recipe for identity theft crisis :)  If you're 
doing ecommerce or related, you may want to look into PCI compliance...

Regards,
Tommy

---End Message---
---BeginMessage---
On Sat, Jul 24, 2010 at 5:57 AM, Nathan Rixham nrix...@gmail.com wrote:

 If you think about it, each class, function, method, line of code all gets
 interpreted in to opcodes and executed - so, no matter how you split it up,
 it's still going to produce roughly equivalent opcodes.


An exception to this is when you have a class that can be heavily
refactored. For example, say you have a data access class that operates on
books in the database (standard CRUD) and also generates XML and JSON views
of the books. If you refactor the class to extract the XML and JSON export
into separate classes--something that should be done for many other
reasons--you won't have to load and parse that code when you're not
exporting the data.

David
---End Message---


php-general Digest 27 Jul 2010 04:43:12 -0000 Issue 6866

2010-07-26 Thread php-general-digest-help

php-general Digest 27 Jul 2010 04:43:12 - Issue 6866

Topics (messages 307140 through 307141):

Re: Help with template file and email
307140 by: Carlos Sura

Requires help: Unable to install ssh2 module in PHP.
307141 by: Sharat Ojha

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---





Hello Joey,
No problem, I'm glad you got it working now.  
Any other question. Use php-list.

Regards,
Carlos Sura.


From: j.hendrick...@comcast.net
To: carlos_s...@hotmail.com
Subject: Re: [PHP] Help with template file and email
Date: Sat, 24 Jul 2010 08:29:03 -0500










Hi Carlos,
  I wanted to thank you for all your help!! In the 
function I had to use a foreach() to get the email. Then put the $_GET['email'] 
in when I called the function. Finally got it!

Thank you for your help!!
  
Joey.

  - Original Message - 
  From: 
  Carlos 
  Sura 
  To: j.hendrick...@comcast.net 
  Cc: php-gene...@lists.php.net 
  Sent: Tuesday, July 13, 2010 10:48 
  AM
  Subject: RE: [PHP] Help with template 
  file and email
  

Let me get this right...

$mymail // If you put an 
  email adress it works, right. You are calling variable $mymail... But, what 
  does contain that var? You are calling $mymail, there has to be a database, 
or 
  something of those 10 mails you said. -If i'm getting you the point right- If 
  not, my mistake.

Or you might use something like 
  this:

?php
// mail list
$to  = 'yourma...@example.com' . ', ';
$to 
  .= 'yourma...@example.com';


If my 
  answer is wrong for you. Plrease reffer to: 
  http://docs.php.net/manual/en/function.mail.php -as Richard 
  said.-





 From: rquadl...@gmail.com
 
  Date: Tue, 13 Jul 2010 15:02:14 +0100
 To: 
  j.hendrick...@comcast.net
 CC: php-gene...@lists.php.net
 
  Subject: Re: [PHP] Help with template file and email
 
 On 13 
  July 2010 14:56, Joey Hendricks j.hendrick...@comcast.net 
  wrote:
  Hello,
   I have been working on a birtday 
  invite program. The form takes 10 names and 10 email addresses. I think the 
  problem is the $to variable in my function. I get this warning-Warning: 
mail() 
  [function.mail]: SMTP server response: 550 5.5.0 f domain name 
  required in.
  Could someone help me with this my email is 
  j.hendrick...@comcast.net Thank you so very much!
 
 
  ?php
 mail(' j.hendrick...@comcast.net', 'Test email', 'This is a 
  test email');
 ?
 
 and I get the following entry in 
  my PHP's mail.log ...
 
 mail() on [-:2]: To: 
  j.hendrick...@comcast.net -- Headers:
 
 Pretty simple 
  stuff.
 
 
  http://docs.php.net/manual/en/function.mail.php
 
 
  Regards,
 
 Richard.
 
 -- 
 PHP General 
  Mailing List (http://www.php.net/)
 To unsubscribe, visit: 
  http://www.php.net/unsub.php
 


  
  Get a new e-mail account with Hotmail - Free. Sign-up 
  now.
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us now---End Message---
---BeginMessage---
Hi all,



We are trying to use SFTP connection to remote host in our project. So for
that we are using SSH2 functions of PHP. But the script where we have used
those functions was throwing the following error:



*PHP Fatal error:  Call to undefined function ssh2_connect()  *

* *

By doing some work around we came to know that to remove this error we
mainly need 3 packages: OpenSSL, libssh2 and ssh2 modules.

Out of them OpenSSL module was present on the server. So we have installed
other two packages through procedure given on the link below :

http://hostechs.com/2008/07/installing-ssh2-for-php-shell-connections-how-to/
i.e.,



We have installed *“libssh2”* package using following set of commands :



[r...@box1 ~]wget
http://voxel.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.18.tar.gz
[r...@box1 ~]tar -zxvf libssh2-0.18.tar.gz
[r...@box1 ~]cd libssh2-0.18
[r...@box1 libssh2-0.18]# ./configure
[r...@box1 libssh2-0.18]# make
[r...@box1 libssh2-0.18]# make install



Then we have installed ssh2 module using following set of commands:

[r...@box1 ~]# wget http://pecl.php.net/get/ssh2-0.10.tgz
[r...@box1 ~]# tar -xzf ssh2-0.10.tgz
[r...@box1 ~]# cd ssh2-0.10
[r...@box1 ssh2-0.10]# phpize  ./configure --with-ssh2  make



Then we have copied ssh2.so from
*“/home/amitdesh/ssh2-0.10/modules”*location to
*/home/y/lib/php/20060613 *folder as this folder is mentioned as
*extension_dir
= /home/y/lib/php/20060613 in php.ini file.*

Also we have added the following line in php.ini file to add 

Re: [PHP] Re: Does class length slow down performance

2010-07-26 Thread David Harkness
On Sat, Jul 24, 2010 at 5:57 AM, Nathan Rixham nrix...@gmail.com wrote:

 If you think about it, each class, function, method, line of code all gets
 interpreted in to opcodes and executed - so, no matter how you split it up,
 it's still going to produce roughly equivalent opcodes.


An exception to this is when you have a class that can be heavily
refactored. For example, say you have a data access class that operates on
books in the database (standard CRUD) and also generates XML and JSON views
of the books. If you refactor the class to extract the XML and JSON export
into separate classes--something that should be done for many other
reasons--you won't have to load and parse that code when you're not
exporting the data.

David


RE: [PHP] Help with template file and email

2010-07-26 Thread Carlos Sura





Hello Joey,
No problem, I'm glad you got it working now.  
Any other question. Use php-list.

Regards,
Carlos Sura.


From: j.hendrick...@comcast.net
To: carlos_s...@hotmail.com
Subject: Re: [PHP] Help with template file and email
Date: Sat, 24 Jul 2010 08:29:03 -0500










Hi Carlos,
  I wanted to thank you for all your help!! In the 
function I had to use a foreach() to get the email. Then put the $_GET['email'] 
in when I called the function. Finally got it!

Thank you for your help!!
  
Joey.

  - Original Message - 
  From: 
  Carlos 
  Sura 
  To: j.hendrick...@comcast.net 
  Cc: php-general@lists.php.net 
  Sent: Tuesday, July 13, 2010 10:48 
  AM
  Subject: RE: [PHP] Help with template 
  file and email
  

Let me get this right...

$mymail // If you put an 
  email adress it works, right. You are calling variable $mymail... But, what 
  does contain that var? You are calling $mymail, there has to be a database, 
or 
  something of those 10 mails you said. -If i'm getting you the point right- If 
  not, my mistake.

Or you might use something like 
  this:

?php
// mail list
$to  = 'yourma...@example.com' . ', ';
$to 
  .= 'yourma...@example.com';


If my 
  answer is wrong for you. Plrease reffer to: 
  http://docs.php.net/manual/en/function.mail.php -as Richard 
  said.-





 From: rquadl...@gmail.com
 
  Date: Tue, 13 Jul 2010 15:02:14 +0100
 To: 
  j.hendrick...@comcast.net
 CC: php-general@lists.php.net
 
  Subject: Re: [PHP] Help with template file and email
 
 On 13 
  July 2010 14:56, Joey Hendricks j.hendrick...@comcast.net 
  wrote:
  Hello,
   I have been working on a birtday 
  invite program. The form takes 10 names and 10 email addresses. I think the 
  problem is the $to variable in my function. I get this warning-Warning: 
mail() 
  [function.mail]: SMTP server response: 550 5.5.0 f domain name 
  required in.
  Could someone help me with this my email is 
  j.hendrick...@comcast.net Thank you so very much!
 
 
  ?php
 mail(' j.hendrick...@comcast.net', 'Test email', 'This is a 
  test email');
 ?
 
 and I get the following entry in 
  my PHP's mail.log ...
 
 mail() on [-:2]: To: 
  j.hendrick...@comcast.net -- Headers:
 
 Pretty simple 
  stuff.
 
 
  http://docs.php.net/manual/en/function.mail.php
 
 
  Regards,
 
 Richard.
 
 -- 
 PHP General 
  Mailing List (http://www.php.net/)
 To unsubscribe, visit: 
  http://www.php.net/unsub.php
 


  
  Get a new e-mail account with Hotmail - Free. Sign-up 
  now.
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us now

[PHP] Requires help: Unable to install ssh2 module in PHP.

2010-07-26 Thread Sharat Ojha
Hi all,



We are trying to use SFTP connection to remote host in our project. So for
that we are using SSH2 functions of PHP. But the script where we have used
those functions was throwing the following error:



*PHP Fatal error:  Call to undefined function ssh2_connect()  *

* *

By doing some work around we came to know that to remove this error we
mainly need 3 packages: OpenSSL, libssh2 and ssh2 modules.

Out of them OpenSSL module was present on the server. So we have installed
other two packages through procedure given on the link below :

http://hostechs.com/2008/07/installing-ssh2-for-php-shell-connections-how-to/
i.e.,



We have installed *“libssh2”* package using following set of commands :



[r...@box1 ~]wget
http://voxel.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.18.tar.gz
[r...@box1 ~]tar -zxvf libssh2-0.18.tar.gz
[r...@box1 ~]cd libssh2-0.18
[r...@box1 libssh2-0.18]# ./configure
[r...@box1 libssh2-0.18]# make
[r...@box1 libssh2-0.18]# make install



Then we have installed ssh2 module using following set of commands:

[r...@box1 ~]# wget http://pecl.php.net/get/ssh2-0.10.tgz
[r...@box1 ~]# tar -xzf ssh2-0.10.tgz
[r...@box1 ~]# cd ssh2-0.10
[r...@box1 ssh2-0.10]# phpize  ./configure --with-ssh2  make



Then we have copied ssh2.so from
*“/home/amitdesh/ssh2-0.10/modules”*location to
*/home/y/lib/php/20060613 *folder as this folder is mentioned as
*extension_dir
= /home/y/lib/php/20060613 in php.ini file.*

Also we have added the following line in php.ini file to add the new ssh
extension:

*extension=ssh2.so*



But still by running our script we are getting the following error :



*PHP Warning:  PHP Startup: ssh2: Unable to initialize module*

*Module compiled with module API=20050922, debug=0, thread-safety=0*

*PHPcompiled with module API=20060613, debug=0, thread-safety=0*

*These options need to match*

* in Unknown on line 0*



Please let me know if anybody worked on SFTP in PHP and faced similar issue.




Thanks  Regards,

Sharat Ojha