php-general Digest 15 May 2009 11:46:21 -0000 Issue 6122

2009-05-15 Thread php-general-digest-help
php-general Digest 15 May 2009 11:46:21 - Issue 6122 Topics (messages 292594 through 292609): PHP Email Setup problem 292594 by: Moses 292597 by: Shawn McKenzie Re: suggestion required 292595 by: Nathan Rixham 292609 by: Pravinc Re: Software to read/write

[PHP] Parse ini file problem

2009-05-15 Thread Thodoris
I am trying to parse an ini conf file using parse_ini_file but fails without returning something. I found this which is probably the reason: http://bugs.php.net/bug.php?id=44544 (the $ in the values) The problem is that this file has more than 7500 lines so it's kind of difficult to use

Re: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Peter Ford
Matt Graham wrote: Ashley Sheridan wrote: Paul M Foster wrote: On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote: One of the things the other company said was possible, and I'm not familiar with... if I understand correctly, is to create a CD with not just an Excel spreadsheet, but

Re: [PHP] php html integration

2009-05-15 Thread Robert Cummings
On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no

[PHP] RE: suggestion required

2009-05-15 Thread Pravinc
Hey thanks for your quick reply, Here is what i have done This is my flex code var issFront:ImageSnapshot = ImageSnapshot.captureImage(_model.productDesigner._boundingBox, dpi, new PNGEncoder(), false); var ba:ByteArray = issFront.data; ba.compress();

Re: [PHP] php html integration

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote: On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not

Re: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Paul M Foster
On Fri, May 15, 2009 at 10:21:22AM +0100, Peter Ford wrote: Matt Graham wrote: Ashley Sheridan wrote: Paul M Foster wrote: On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote: One of the things the other company said was possible, and I'm not familiar with... if I understand

Re: [PHP] php html integration

2009-05-15 Thread tedd
At 8:41 AM -0400 5/15/09, Robert Cummings wrote: On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote: On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please

[PHP] Re: php ssl connection timeout issue

2009-05-15 Thread Jerry Zhao
On Thu, May 14, 2009 at 5:17 PM, Nathan Rixham nrix...@gmail.com wrote: Jerry Zhao wrote: On Thu, May 14, 2009 at 5:05 PM, Nathan Rixham nrix...@gmail.com wrote: Jerry Zhao wrote: I tried different combination of ssl clients and servers, it all points to problems on the client side of

[PHP] textarea new line to mysql database

2009-05-15 Thread PHPScriptor
Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in the textarea it's saved to the db like this: database: first line second line when I edit the value in the form: first line second line when I output the value to html: first linesecond line (unless

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 07:03 -0700, PHPScriptor wrote: Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in the textarea it's saved to the db like this: database: first line second line when I edit the value in the form: first line second

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Stuart
2009/5/15 PHPScriptor cont...@phpscriptor.com: Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in the textarea it's saved to the db like this: database: first line second line when I edit the value in the form: first line second line when

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
Well, instead of storing the text from the textarea directly into the db, validate it and wrap it with br / tags (replace \n) and then store it. This way you needn't use nl2br every time you retrieve the text from db. -Sterex On Fri, May 15, 2009 at 7:42 PM, Stuart stut...@gmail.com wrote:

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread PHPScriptor
Mja, that's not my intention, in that case I also could use nl2br... Why does this problem exists? And why does it work with pre? Is this a PHP problem or more a HTML problem? Robert Cummings wrote: On Fri, 2009-05-15 at 07:03 -0700, PHPScriptor wrote: Hello, How do you guys handle

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread PHPScriptor
Well, the problem is that I have a lot of forms, a lot of data to output, and even then, I don't know always where I have a textarea or just a inputfield. But true, I could even set the nl2br on an input field, it wouldn't make a difference. But I just don't understand why this problem exists?

Re: [PHP]Cannot output the same data from text file in PHP

2009-05-15 Thread tedd
At 4:45 PM -0400 5/14/09, Andrew Ballard wrote: On Thu, May 14, 2009 at 4:33 PM, Paul M Foster pa...@quillandmouse.com wrote: My stance is, if you're going to subscribe to an email list, learn how to unsubscribe, how to see if you've been inadvertantly unsubscribed, learn email

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread PHPScriptor
Yes, I thought about that. But then you have a problem when you're going to 'edit' that data back in a form. Then you get first linebr /second line in your textarea. Manoj Sterex wrote: Well, instead of storing the text from the textarea directly into the db, validate it and wrap it with br

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 19:48 +0530, Manoj Sterex wrote: Well, instead of storing the text from the textarea directly into the db, validate it and wrap it with br / tags (replace \n) and then store it. This way you needn't use nl2br every time you retrieve the text from db. Don't do that unless

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Paul M Foster
On Fri, May 15, 2009 at 07:03:49AM -0700, PHPScriptor wrote: Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in the textarea it's saved to the db like this: database: first line second line when I edit the value in the form: first line

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
Well, its not exactly a 'problem' at all. The textarea just does what its meant to do - accept raw text input and lets you process it via form action. This is neither a PHP or a HTML 'problem'. The reason you cannot see the line breaks when you echo the text on your browser is the fact that the

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
@Robert: True. I was assuming that the text was going to be final and not being edited again. @PHPScriptor: If you do have a lot of textareas to work around with, why don't you give TinyMCE a try. Thats the best option you have got. It replaces the textarea into more of a html compatible one and

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
TinyMCE: http://tinymce.moxiecode.com/ -Sterex On Fri, May 15, 2009 at 7:56 PM, Paul M Foster pa...@quillandmouse.comwrote: On Fri, May 15, 2009 at 07:03:49AM -0700, PHPScriptor wrote: Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in

Re: [PHP] php html integration

2009-05-15 Thread Bastien Koert
On Fri, May 15, 2009 at 9:38 AM, tedd tedd.sperl...@gmail.com wrote: At 8:41 AM -0400 5/15/09, Robert Cummings wrote: On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote: On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Stuart
2009/5/15 PHPScriptor cont...@phpscriptor.com: Well, the problem is that I have a lot of forms, a lot of data to output, and even then, I don't know always where I have a textarea or just a inputfield. But true, I could even set the nl2br on an input field, it wouldn't make a difference. But

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread tedd
At 7:22 AM -0700 5/15/09, PHPScriptor wrote: Well, the problem is that I have a lot of forms, a lot of data to output, and even then, I don't know always where I have a textarea or just a inputfield. But true, I could even set the nl2br on an input field, it wouldn't make a difference. But I

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
@tedd: Its just another way of looking at the things. Putting HTML into the DB is not really wrong (perhaps in this context it is). If you do have HTML in the DB, you can directly echo it out and use CSS to style it accordingly. Just my 2 cents. :) -Sterex On Fri, May 15, 2009 at 8:24 PM, tedd

[PHP] Spawn-FCGI, PHP-FPM

2009-05-15 Thread APseudoUtopia
Hey, I'm looking into moving my site over to Nginx from apache. I've been reading up on how FastCGI works with PHP, and I've found two main solutions, either use spawn-fcgi or use php-fpm. However, it looks like there isn't any php-fpm code for the current stable version of PHP. Does anyone use

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 10:54 -0400, tedd wrote: At 7:22 AM -0700 5/15/09, PHPScriptor wrote: Well, the problem is that I have a lot of forms, a lot of data to output, and even then, I don't know always where I have a textarea or just a inputfield. But true, I could even set the nl2br on an

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Paul M Foster
On Fri, May 15, 2009 at 07:19:24AM -0700, PHPScriptor wrote: Mja, that's not my intention, in that case I also could use nl2br... Why does this problem exists? And why does it work with pre? Is this a PHP problem or more a HTML problem? HTML doesn't recognize newlines when it displays

Re: [PHP]Cannot output the same data from text file in PHP

2009-05-15 Thread Andrew Ballard
On Fri, May 15, 2009 at 10:24 AM, tedd tedd.sperl...@gmail.com wrote: At 4:45 PM -0400 5/14/09, Andrew Ballard wrote: On Thu, May 14, 2009 at 4:33 PM, Paul M Foster pa...@quillandmouse.com wrote:   My stance is, if you're going to subscribe to an email list, learn how  to unsubscribe, how

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 11:29 -0400, Paul M Foster wrote: On Fri, May 15, 2009 at 07:19:24AM -0700, PHPScriptor wrote: Mja, that's not my intention, in that case I also could use nl2br... Why does this problem exists? And why does it work with pre? Is this a PHP problem or more a HTML

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread tedd
At 8:38 PM +0530 5/15/09, Manoj Sterex wrote: @tedd: Its just another way of looking at the things. Putting HTML into the DB is not really wrong (perhaps in this context it is). If you do have HTML in the DB, you can directly echo it out and use CSS to style it accordingly. Just my 2 cents.

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread tedd
At 11:29 AM -0400 5/15/09, Paul M Foster wrote: On Fri, May 15, 2009 at 07:19:24AM -0700, PHPScriptor wrote: Mja, that's not my intention, in that case I also could use nl2br... Why does this problem exists? And why does it work with pre? Is this a PHP problem or more a HTML problem?

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Michael A. Peters
PHPScriptor wrote: Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in the textarea it's saved to the db like this: database: first line second line when I edit the value in the form: first line second line when I output the value to html: first

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread tedd
At 11:19 AM -0400 5/15/09, Robert Cummings wrote: On Fri, 2009-05-15 at 10:54 -0400, tedd wrote: 4. Or, listen to me (who is somewhere between Rob/Stuart and Sterex) and use either the pre tag or the nlbr() function depending upon what you want to do with the output. Both solutions [1 and

Re: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Michael A. Peters
Paul M Foster wrote: On Fri, May 15, 2009 at 10:21:22AM +0100, Peter Ford wrote: Matt Graham wrote: But why write an Excel spreadsheet - why not save the data in something more portable like CSV that ExCel and read and write to once you are back at base? CSV doesn't export *formulas*,

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Michael A. Peters
tedd wrote: Also, one can generate validation errors using br / because there are three different varieties of the tag, namely br, br /, and br/ -- all of which can be used in different settings. I don't remember which doctypes go with which version (xhtml requires /), but I've run into

Re: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Bastien Koert
On Fri, May 15, 2009 at 12:35 PM, Michael A. Peters mpet...@mac.com wrote: Paul M Foster wrote: On Fri, May 15, 2009 at 10:21:22AM +0100, Peter Ford wrote: Matt Graham wrote: But why write an Excel spreadsheet - why not save the data in something more portable like CSV that ExCel and

[PHP] CSS tables

2009-05-15 Thread PJ
I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise. I've

Re: [PHP] CSS tables

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 13:25 -0400, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS

Re: [PHP] CSS tables

2009-05-15 Thread Ed Curtis
PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise.

RE: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Bob McConnell
From: Bastien Koert On Fri, May 15, 2009 at 12:35 PM, Michael A. Peters mpet...@mac.com wrote: Paul M Foster wrote: On Fri, May 15, 2009 at 10:21:22AM +0100, Peter Ford wrote: Matt Graham wrote: But why write an Excel spreadsheet - why not save the data in something more portable like

Re: [PHP] CSS tables

2009-05-15 Thread Tom Worster
On 5/15/09 1:25 PM, PJ af.gour...@videotron.ca wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Tom Worster
On 5/15/09 10:12 AM, Stuart stut...@gmail.com wrote: What's your problem with using nl2br? it's not multibyte safe. if you're using mb strings, e.g. for utf8 pages and forms, then use preg_replace (with the u modifier) instead of ml2br -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] CSS tables

2009-05-15 Thread tedd
At 1:25 PM -0400 5/15/09, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread tedd
At 2:10 PM -0400 5/15/09, Tom Worster wrote: On 5/15/09 10:12 AM, Stuart stut...@gmail.com wrote: What's your problem with using nl2br? it's not multibyte safe. if you're using mb strings, e.g. for utf8 pages and forms, then use preg_replace (with the u modifier) instead of ml2br Whoa --

Re: [PHP] CSS tables

2009-05-15 Thread tedd
At 2:06 PM -0400 5/15/09, Tom Worster wrote: for one thing, a table is a great way of representing relations (http://mathworld.wolfram.com/Relation.html). data tables are the canonical example but very often a form's structure is a relation, e.g. between labels and input fields, or between

[PHP] Re: CSS tables

2009-05-15 Thread Al
PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous

Re: [PHP] CSS tables

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 14:11 -0400, tedd wrote: At 1:25 PM -0400 5/15/09, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am

Re: [PHP] CSS tables

2009-05-15 Thread PJ
tedd wrote: At 1:25 PM -0400 5/15/09, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with

RE: [PHP] CSS tables

2009-05-15 Thread HallMarc Websites
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from ESET Smart Security, version of virus signature database 4080 (20090515) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http

Re: [PHP] CSS tables

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 14:59 -0400, PJ wrote: tedd wrote: At 1:25 PM -0400 5/15/09, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to

RE: [PHP] CSS tables

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 15:12 -0400, HallMarc Websites wrote: Um... sorry to jump in as a late arrival yet there you go What limitations? You could provide a layered layout using CSS and png graphic format. As for setting up columns check out float and clear and you're all set. TABLE, TR,

RE: [PHP] CSS tables

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 15:12 -0400, HallMarc Websites wrote: Um... sorry to jump in as a late arrival yet there you go What limitations? You could provide a layered layout using CSS and png graphic format. As for setting up columns check out float and clear and you're all set. TABLE, TR,

[PHP] read the last line in a file?

2009-05-15 Thread Tom Worster
imagine writing a script to run as a daemon reading data off the bottom of a log file that gets updated every few minutes and processing each new log line as they arrive. i could exec(tail $logfile, $lines, $status) every now and then. or poll the file mtime and run exec(tail $logfile, $lines,

Re: [PHP] CSS tables

2009-05-15 Thread PJ
Robert Cummings wrote: On Fri, 2009-05-15 at 14:59 -0400, PJ wrote: tedd wrote: At 1:25 PM -0400 5/15/09, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and

Re: [PHP] CSS tables

2009-05-15 Thread Nathan Rixham
tedd wrote: At 2:06 PM -0400 5/15/09, Tom Worster wrote: for one thing, a table is a great way of representing relations (http://mathworld.wolfram.com/Relation.html). data tables are the canonical example but very often a form's structure is a relation, e.g. between labels and input fields,

Re: [PHP] CSS tables

2009-05-15 Thread PJ
Robert Cummings wrote: On Fri, 2009-05-15 at 15:12 -0400, HallMarc Websites wrote: Um... sorry to jump in as a late arrival yet there you go What limitations? You could provide a layered layout using CSS and png graphic format. As for setting up columns check out float and clear and

Re: [PHP] CSS tables

2009-05-15 Thread PJ
Nathan Rixham wrote: tedd wrote: At 2:06 PM -0400 5/15/09, Tom Worster wrote: for one thing, a table is a great way of representing relations (http://mathworld.wolfram.com/Relation.html). data tables are the canonical example but very often a form's structure is a relation, e.g. between

[PHP] Re: read the last line in a file?

2009-05-15 Thread Nathan Rixham
Tom Worster wrote: imagine writing a script to run as a daemon reading data off the bottom of a log file that gets updated every few minutes and processing each new log line as they arrive. i could exec(tail $logfile, $lines, $status) every now and then. or poll the file mtime and run exec(tail

Re: [PHP] CSS tables

2009-05-15 Thread Michael A. Peters
PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise.

Re: [PHP] CSS tables

2009-05-15 Thread Michael A. Peters
tedd wrote: At 2:06 PM -0400 5/15/09, Tom Worster wrote: for one thing, a table is a great way of representing relations (http://mathworld.wolfram.com/Relation.html). data tables are the canonical example but very often a form's structure is a relation, e.g. between labels and input fields,

Re: [PHP] CSS tables

2009-05-15 Thread Michael A. Peters
Nathan Rixham wrote: tedd wrote: At 2:06 PM -0400 5/15/09, Tom Worster wrote: for one thing, a table is a great way of representing relations (http://mathworld.wolfram.com/Relation.html). data tables are the canonical example but very often a form's structure is a relation, e.g. between