Re: [PHP] Formatting

2011-01-25 Thread Jim Lucas
On 1/25/2011 9:05 PM, Ethan Rosenberg wrote: Dear list - I have a program with the following statement: $out = system('ls -l', $retval); The output is a string. How do I format the output to be in the Linux format, that is in columns. I cannot think of a way to use explode to do it. Advice and

Re: [PHP] Formatting

2011-01-25 Thread joris ros
Hi You can try something like this: > Ethan Rosenberg wrote: > >> Dear list - >> >> I have a program with the following statement: $out = system('ls -l', >> $retval); The output is a string. How do I format the output to be in >> the Linux format, that is in columns. I cannot think of a way to u

Re: [PHP] Formatting

2011-01-25 Thread Donovan Brooke
Ethan Rosenberg wrote: Dear list - I have a program with the following statement: $out = system('ls -l', $retval); The output is a string. How do I format the output to be in the Linux format, that is in columns. I cannot think of a way to use explode to do it. Advice and comments, please. Tha

[PHP] Formatting

2011-01-25 Thread Ethan Rosenberg
Dear list - I have a program with the following statement: $out = system('ls -l', $retval); The output is a string. How do I format the output to be in the Linux format, that is in columns. I cannot think of a way to use explode to do it. Advice and comments, please. Thanks Ethan MySQ

Re: [PHP] Installing PEAR

2011-01-25 Thread Ethan Rosenberg
At 01:44 PM 1/25/2011, Shawn McKenzie wrote: On 01/25/2011 11:25 AM, Nilesh Govindarajan wrote: > On 01/25/2011 10:32 PM, Ethan Rosenberg wrote: >> Dear List -- >> >> How do install PEAR on Linux? I installed lynx and as root, I ran the >> command lynx -source http://pear.php.net/go-pear | php.

Re: [PHP] String Encodings - loose guidelines

2011-01-25 Thread Marc Guay
> 1.) Saving strings to a database One thing I always forget to remember is to send tge "SET NAMES utf8" command to MySQL after making a connection. This will save you 1000 headaches if you're working with non-latin characters. I can't count the number of times I've thrown htmlentities, htmlspec

[PHP] String Encodings - loose guidelines

2011-01-25 Thread Donovan Brooke
Hello, I don't yet have a complete understanding of string encodings for the various environments they may need to pass through or be in. I have found bits and pieces within Larry's book, the online docs, and by googling... and my app seems to be working fine, but I don't yet feel confident on

Re: [PHP] Installing PEAR

2011-01-25 Thread Daniel Brown
On Tue, Jan 25, 2011 at 13:33, Ethan Rosenberg wrote: > > As far as I can tell, the PHP is installed directly on my computer.  Now > what? From the command line, type: which pear If it gives you a path, PEAR is installed, and you can use it as you desire. If it indicates that n

Re: [PHP] Installing PEAR

2011-01-25 Thread Ethan Rosenberg
At 12:25 PM 1/25/2011, Nilesh Govindarajan wrote: On 01/25/2011 10:32 PM, Ethan Rosenberg wrote: > Dear List -- > > How do install PEAR on Linux? I installed lynx and as root, I ran the > command lynx -source http://pear.php.net/go-pear | php. It seemed to > install, but the command pear did no

Re: [PHP] Installing PEAR

2011-01-25 Thread Ronny Tiebel
Am 25.01.2011 20:09, schrieb Daniel Brown: > On Tue, Jan 25, 2011 at 14:07, Ronny Tiebel wrote: >> oh, ok, sorry for that. >> ive missunderstood your post. >> >> but he wrote that he's using debian sid so its a possible solution for him. >> >> never mind >> >> just wanted to help > It is helpf

Re: [PHP] Installing PEAR

2011-01-25 Thread Daniel Brown
On Tue, Jan 25, 2011 at 14:07, Ronny Tiebel wrote: > oh, ok, sorry for that. > ive missunderstood your post. > > but he wrote that he's using debian sid so its a possible solution for him. > > never mind > > just wanted to help It is helpful, just correcting for the archives. Nothing against

Re: [PHP] Installing PEAR

2011-01-25 Thread Ronny Tiebel
Am 25.01.2011 20:01, schrieb Daniel Brown: > On Tue, Jan 25, 2011 at 13:54, Ronny Tiebel wrote: >> ubuntu (10.10) == debian sid, so there are no diferences on that > I didn't need an explanation of what equals what, I was correcting > your generalized statement that apt-get worked on Linux. C

Re: [PHP] Installing PEAR

2011-01-25 Thread Daniel Brown
On Tue, Jan 25, 2011 at 13:54, Ronny Tiebel wrote: > > ubuntu (10.10) == debian sid, so there are no diferences on that I didn't need an explanation of what equals what, I was correcting your generalized statement that apt-get worked on Linux. Consider RH derivatives, SUSE, et al --- yes, I

Re: [PHP] Installing PEAR

2011-01-25 Thread a...@ashleysheridan.co.uk
(sorry for top post) As he mentioned using lynx ( and I'm assuming the OS rather than the browser here, as I'm not aware of the browser having those sorts of capabilities) then could it be that all the pear packages don't exist? Mostly, pear packages can just be copied into your app directories

Re: [PHP] Installing PEAR

2011-01-25 Thread Daniel Brown
On Tue, Jan 25, 2011 at 13:43, Ronny Tiebel wrote: > > erm, on linux you could just install it with apt/aptitude !? 's/linux/Ubuntu or Debian as root' -- Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Installing PEAR

2011-01-25 Thread Ronny Tiebel
Am 25.01.2011 18:25, schrieb Nilesh Govindarajan: > On 01/25/2011 10:32 PM, Ethan Rosenberg wrote: >> Dear List -- >> >> How do install PEAR on Linux? I installed lynx and as root, I ran the >> command lynx -source http://pear.php.net/go-pear | php. It seemed to >> install, but the command pear d

Re: [PHP] Installing PEAR

2011-01-25 Thread Shawn McKenzie
On 01/25/2011 11:25 AM, Nilesh Govindarajan wrote: > On 01/25/2011 10:32 PM, Ethan Rosenberg wrote: >> Dear List -- >> >> How do install PEAR on Linux? I installed lynx and as root, I ran the >> command lynx -source http://pear.php.net/go-pear | php. It seemed to >> install, but the command pear

Re: [PHP] Installing PEAR

2011-01-25 Thread Nilesh Govindarajan
On 01/25/2011 10:32 PM, Ethan Rosenberg wrote: > Dear List -- > > How do install PEAR on Linux? I installed lynx and as root, I ran the > command lynx -source http://pear.php.net/go-pear | php. It seemed to > install, but the command pear did not work. From the root directory I > ran the comman

[PHP] Installing PEAR

2011-01-25 Thread Ethan Rosenberg
Dear List -- How do install PEAR on Linux? I installed lynx and as root, I ran the command lynx -source http://pear.php.net/go-pear | php. It seemed to install, but the command pear did not work. From the root directory I ran the command find . -name pear. There was no file found. I also

Re: [PHP] [security] PHP has DoS vuln with large decimal points

2011-01-25 Thread Pierre Joye
hi, On Mon, Jan 17, 2011 at 5:21 AM, Tommy Pham wrote: > Thanks Dan.  I'll keep it in mind for the future.  For interested parties, > that's found in the official Windows 5.3.3 NTS VC9 build.  Works fine with > the current official 5.3.5 NTS VC9. 5.3.5 was released only to fix this exact bug :-

Re: [PHP] preg_replace question

2011-01-25 Thread Alex Nikitin
$internal_links=array(); I prefer to init arrays, it also avoids unnecessary notices, and sometimes weird results, but either one of those while loops should make the desired array while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { array_push($internal_links, array('phrase'=>$row['phrase'],

Re: [PHP] preg_replace question

2011-01-25 Thread Richard Quadling
On 25 January 2011 12:04, Merlin Morgenstern wrote: > Am 25.01.2011 12:31, schrieb Merlin Morgenstern: >> >> Am 24.01.2011 18:08, schrieb Alex Nikitin: >>> >>> If you declare your arrays, and set k to 0 first, put quotes around array >>> values and use the correct limit (you can default to -1), yo

Re: [PHP] preg_replace question

2011-01-25 Thread Merlin Morgenstern
Am 25.01.2011 12:31, schrieb Merlin Morgenstern: Am 24.01.2011 18:08, schrieb Alex Nikitin: If you declare your arrays, and set k to 0 first, put quotes around array values and use the correct limit (you can default to -1), you will get results, here is code and example (hopefully this helps you

Re: [PHP] preg_replace question

2011-01-25 Thread Merlin Morgenstern
Am 24.01.2011 18:08, schrieb Alex Nikitin: If you declare your arrays, and set k to 0 first, put quotes around array values and use the correct limit (you can default to -1), you will get results, here is code and example (hopefully this helps you) \\1'; $k++;