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

2010-07-27 Thread Tommy Pham
-Original Message- From: Sharat Ojha [mailto:ojhasha...@gmail.com] Sent: Monday, July 26, 2010 9:43 PM To: php-general@lists.php.net Subject: [PHP] Requires help: Unable to install ssh2 module in PHP. Hi all, We are trying to use SFTP connection to remote host in our

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

2010-07-27 Thread Tommy Pham
-Original Message- From: Tommy Pham [mailto:tommy...@gmail.com] Sent: Monday, July 26, 2010 11:08 PM To: 'php-general@lists.php.net' Subject: RE: [PHP] Requires help: Unable to install ssh2 module in PHP. -Original Message- From: Sharat Ojha [mailto:ojhasha...@gmail.com]

[PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Jordan Jovanov
Hello Everybody I start to write PHP script and all veritable a defined without some rules. I want to ask to you somebody know how is correct do different some variable. Like from next three variable who is correct: $firstname $FirstName $firstName $first_name etc. I know that from this

Re: [PHP] Video lessons

2010-07-27 Thread Jordan Jovanov
On 24/07/2010 02:14, David Hutto wrote: On Fri, Jul 23, 2010 at 8:13 PM, David Huttosmokefl...@gmail.com wrote: On Fri, Jul 23, 2010 at 2:35 PM, Dan Josephdmjos...@gmail.com wrote: On Thu, Jul 22, 2010 at 10:04 AM, Jordan Jovanovjovanovj...@gmail.comwrote: Im thing that I'm little layse,

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: I know there are a number of possible ways of doing this, but I was just wondering if there is an accepted way of doing so which is better than others, performance wise. An idiom, if you like. If you only need to find if a string contains

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 10:10 +0200, Jordan Jovanov wrote: Hello Everybody I start to write PHP script and all veritable a defined without some rules. I want to ask to you somebody know how is correct do different some variable. Like from next three variable who is correct: $firstname

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Peter Lind
On 27 July 2010 11:27, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: I know there are a number of possible ways of doing this, but I was just wondering if there is an accepted way of doing so which is better than others, performance wise. An

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread viraj
$firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj On Tue, Jul 27, 2010 at 3:02 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On

[PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
hello, I have some problems with storing files in db and retriving them, so probably I'm doing something wrong :-) Here is the case: I have on one of the pages request to generate some PDF files and store them in database. So, I use FPDF to create files, and that's working perfect. Then my system

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 11:35 +0200, Peter Lind wrote: On 27 July 2010 11:27, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: I know there are a number of possible ways of doing this, but I was just wondering if there is an accepted way of

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Pete Ford
On 27/07/10 10:42, viraj wrote: $firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj I like to use $firstName, and function firstName(),

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Peter Lind
On 27 July 2010 11:46, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-07-27 at 11:35 +0200, Peter Lind wrote: On 27 July 2010 11:27, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: I know there are a number of possible ways

[PHP] Text editor

2010-07-27 Thread Jordan Jovanov
Hello All I need me to add form for comment to one web site, but i want to use some taxt edtior. Simething similar of this editor http://www.seekcodes.com/text-editor.php , but i can not find the code. Do you somebody know some simple text editor with buttons for bold italic etc. Thanks a

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Nilesh Govindarajan
Have you checked the headers? Its mostly a mime time issue I feel. What do you see in Content-Type? It should be application/pdf (or application/x-pdf, unsure) for PDF files. -- Regards, Nilesh Govindarajan Facebook: http://www.facebook.com/nilesh.gr Twitter: http://twitter.com/nileshgr Website:

Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Andre Polykanine
Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } As for functions and class methods, there are lots of people who name them like this: function the_greatest_function_in_the_world () { ... } Maybe it's readable and great, but I have a

Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread viraj
yes andre, and in addition.. i have found the 'underscore' becomes a handy delimiter character in certain cases. it's really helpful in auto-loading and in calling user functions and in magic calls. so, this is another reason to avoid 'underscore' in variable names. code looks prettier and clean.

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, r); $pdfContent = array( 'file' = base64_encode(fread($fp, filesize(INVOICE_PATH.date('Y-m-d').DS.$pdfName))),

Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Peter Lind
On 27 July 2010 13:04, viraj kali...@gmail.com wrote: so, this is another reason to avoid 'underscore' in variable names. code looks prettier and clean. That's all in the eye of the viewer: underscores are much prettier to me in variables. That's all just a roundabout way of saying it's

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Peter Lind
2010/7/27 Dušan Novaković ndu...@gmail.com: Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, r); $pdfContent             = array(                                        'file'  =       base64_encode(fread($fp,

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
Hello Peter, I can't use files from filesystem. Let's say that they are not on the some mashine where is application that has to show files :-) So it has to be in exact order as I wrote :-( 2010/7/27 Peter Lind peter.e.l...@gmail.com: 2010/7/27 Dušan Novaković ndu...@gmail.com: Hello, so

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Peter Lind
2010/7/27 Dušan Novaković ndu...@gmail.com: Hello Peter, I can't use files from filesystem. Let's say that they are not on the some mashine where is application that has to show files :-) So it has to be in exact order as I wrote :-( That normally doesn't stop people (mounting filesystems

RE: [PHP] Text editor

2010-07-27 Thread Jon Haworth
Hi Jordan, Do you somebody know some simple text editor with buttons for bold italic etc. TinyMCE is worth a look: http://tinymce.moxiecode.com/ HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Text editor

2010-07-27 Thread Dušan Novaković
You can use TinyMCE. It's really easy to integrate in system. Check on official website. Dusan On Tue, Jul 27, 2010 at 12:10 PM, Jordan Jovanov jovanovj...@gmail.com wrote: Hello All I need me to add form for comment to one web site, but i want to use some taxt edtior. Simething similar of

Re: [PHP] Text editor

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 13:49 +0200, Dušan Novaković wrote: You can use TinyMCE. It's really easy to integrate in system. Check on official website. Dusan On Tue, Jul 27, 2010 at 12:10 PM, Jordan Jovanov jovanovj...@gmail.com wrote: Hello All I need me to add form for comment to one

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Nilesh Govindarajan
2010/7/27 Dušan Novaković ndu...@gmail.com: Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, r); $pdfContent             = array(                                        'file'  =       base64_encode(fread($fp,

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Peter Lind
2010/7/27 Nilesh Govindarajan li...@itech7.com: 2010/7/27 Dušan Novaković ndu...@gmail.com: Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, r); $pdfContent             = array(                                        'file'  

[PHP] socket multithreading problem

2010-07-27 Thread Ümit CAN
without waiting each other ? __ ESET Smart Security Akıllı Güvenlik tarafından sağlanan bilgiler, virüs imza veritabanı sürümü: 5316 (20100727) __ İleti ESET Smart Security Akıllı Güvenlik tarafından denetlendi. http://www.nod32.com.tr

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Richard Quadling
2010/7/27 Dušan Novaković ndu...@gmail.com: hello, I have some problems with storing files in db and retriving them, so probably I'm doing something wrong :-) Here is the case: I have on one of the pages request to generate some PDF files and store them in database. So, I use FPDF to create

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Pete Ford
On 27/07/10 14:16, Peter Lind wrote: 2010/7/27 Nilesh Govindarajanli...@itech7.com: 2010/7/27 Dušan Novakovićndu...@gmail.com: Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, r); $pdfContent = array(

Re: [PHP] Text editor

2010-07-27 Thread Jordan Jovanov
On 27/07/2010 13:53, Ashley Sheridan wrote: On Tue, 2010-07-27 at 13:49 +0200, Dušan Novaković wrote: You can use TinyMCE. It's really easy to integrate in system. Check on official website. Dusan On Tue, Jul 27, 2010 at 12:10 PM, Jordan Jovanovjovanovj...@gmail.com wrote: Hello All I

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
I don't think that it will help :-( I've tried to set different headers but still I end up with some strange response, like: %PDF-1.3 3 0 obj /Type /Page /Parent 1 0 R /Resources 2 0 R /Contents 4 0 R endobj 4 0 obj /Filter /FlateDecode /Length 1214 stream So, if we try to look into this

Re: [PHP] php array in different OS

2010-07-27 Thread jose javier parra sanchez
you are probably getting a memory limit error, check your php.ini 2010/7/21 fyang fy...@ipp.ac.cn: Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: ?php $n= 5; for($i=0;$i$n;$i++) {

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Richard Quadling
2010/7/27 Dušan Novaković ndu...@gmail.com: I don't think that it will help :-( I've tried to set different headers but still I end up with some strange response, like: %PDF-1.3 3 0 obj /Type /Page /Parent 1 0 R /Resources 2 0 R /Contents 4 0 R endobj 4 0 obj /Filter /FlateDecode

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Nilesh Govindarajan
Dude! I found the bug probably, you're using fopen() in 'r' mode which is meant to read ASCII text. Since PDF is a binary file (probably?), you should use binary mode. Try with mode = 'rb' in fopen(). -- Regards, Nilesh Govindarajan Facebook: http://www.facebook.com/nilesh.gr Twitter:

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread tedd
At 3:12 PM +0530 7/27/10, viraj wrote: $firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj I like using $first_name. I don't have any

Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread tedd
At 1:38 PM +0300 7/27/10, Andre Polykanine wrote: Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } In some languages (I can't remember if it is Java, or Javascript, or both) the first letter should be lowercase, such as:

Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Joshua Kehn
Tedd- Java has classes listed with an Uppercase. It could be JS you're thinking of but I'm not sure. Functions (except constructors) and variables have the lowerUpperCamelCase notation. Regards, -Josh On Jul 27, 2010, at 12:55 PM, tedd wrote: At 1:38 PM +0300 7/27/10, Andre Polykanine

RE: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Bob McConnell
From: tedd At 1:38 PM +0300 7/27/10, Andre Polykanine wrote: Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } In some languages (I can't remember if it is Java, or Javascript, or both) the first letter should be lowercase, such as:

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Jordan
On 7/27/2010 12:38 PM, Andre Polykanine wrote: Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } As for functions and class methods, there are lots of people who name them like this: function the_greatest_function_in_the_world () { ...

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Micky Hulse
Some style guides you might find interesting (the Code Igniter style guide might be the most relevant to this discussion): Django: Coding style http://tinyurl.com/bn8jv8 ExpressionEngine: General Style and Syntax http://tinyurl.com/dfh7fa Flex: SDK coding conventions and best practices

[PHP] File Manager with acl

2010-07-27 Thread Ricardo Martinez
Hi! i want ask to the list, if anyone knows a FIle Manager with ACL, written in PHP and MySQL. thanks! -- Ricardo ___ IT Architect website: http://www.rjmc.es

Re: [PHP] Signing (hand-written signature) pdf document

2010-07-27 Thread Bastien Koert
We use a signature pad and dll from m2sys for something similar to this. It captures the signature, then creates a hash of the signature to store in the db. The only mobile app that I know that uses it is Square which is a mobile payment system. On 7/25/10, Tommy Pham tommy...@gmail.com wrote: