Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Robert Cummings
On Sat, 2007-08-11 at 02:10 +0200, Tijnema wrote: > On 8/11/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Fri, August 10, 2007 1:26 pm, Kevin Murphy wrote: > > > I doubt this, but is there any way to determine via PHP if a browser > > > was refreshed automatically via a META tag vs the person

RE: [PHP] magic quotes

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 8:23 am, Bastien Koert wrote: > you could use ini_set at the top of the script to turn the magic > quotes off... No, you could not. Lonngg before ini_set is called, PHP has *already* applied the Magic Quotes "feature" and munged your data. :-) -- Some people

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 1:24 am, Phil Curry wrote: $userValues = ' 1'; > line 102 echo ($userValues['afterDark']); // outputs 1 > > line 103 if ( $userValues['afterDark'] == 0 ) {// passes When using echo to display debug output ALWAYS surround the data with some ki

Re: [PHP] Re: string as file

2007-08-10 Thread Richard Lynch
Reading that, I think it's similar to this: http://php.net/stream I'm really not sure what the OP wants, though... On Thu, August 9, 2007 6:32 pm, Dan wrote: > Well, I have no idea what the Phython StringIO method does. Could > someone > explain in PHP terms maybe? Google gave me this explain

Re: [PHP] Segmentation fault on PHP CLI

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 8:43 am, Martin Marques wrote: > I have a script which I run from cron. I'm testing it directly from > the > console: > > /usr/bin/php -f /path/to/script.php > > The thing is: > > Script executes great, and everything it has to do gets done, but it > throughs a segmentatio

Re: [PHP] Exceptions

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 11:50 am, Peter Pan wrote: > I'm having an issue where throwing Exceptions are displaying a blank > page > even though the Exception is being caught in a try...catch statement. > This > is happening on our production server where warnings, errors, > exceptions, > etc. are not

Re: [PHP] Forwarding $_POST[]...

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 1:04 pm, Tony Di Croce wrote: > I keep wanting to do something, and either I dont know how to do it, > or I'm > doing something wrong and need to rethink things. > > Quite often, I have a form that submits to a php script via POST and > after > doing some processing (or more

Re: [PHP] preg_match_all to match tags

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 6:45 pm, Ólafur Waage wrote: > I know this isn't exactly a php related question but due to the > quality of answers ive seen lately ill give this a shot. (yes yes im > smoothing up the crowd before the question) > > I have a weblog system that i am creating, the trouble is th

RE: [PHP] get and post together

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 7:55 pm, Daevid Vincent wrote: > It has a size limit for one (maybe 1k chars?) The limit has been increased with each version of the HTTP spec, and implementors have always been encouraged to make the limit as high as practical. But they could not claim to be implementing t

Re: [PHP] permissions for include()

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 8:15 pm, jekillen wrote: > > On Aug 8, 2007, at 9:34 PM, Richard Lynch wrote: > >> On Wed, August 8, 2007 7:52 pm, jekillen wrote: >> Apache runs as the "User" setting in httpd.conf >> >> If that "User" can rwx the files, then PHP can rwx the files. >> >> If not, not. >> >> I

Re: [PHP] help with ming library

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 6:24 am, Diana wrote: > How do I install the ming library on windows?? > I copied the php_ming.dll that I had on another computer and enabled > this > line in php.ini extension=php_ming.dll > but I still get that error Call to undefined function Ming_setScale() There are se

Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Tijnema
On 8/11/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > On Fri, August 10, 2007 1:26 pm, Kevin Murphy wrote: > > I doubt this, but is there any way to determine via PHP if a browser > > was refreshed automatically via a META tag vs the person clicking the > > refresh button? > > You could embed some

Re: [PHP] Running a server process

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 6:26 am, Nathan Wallis wrote: > I have a windows application the performs a certain task that I need > it to > perform. I am in the process of developing my site and am really > interested > in the functionality of the site at the moment and haven't set about > putting > t

Re: [PHP] Import XLS file with UTF-8

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 8:04 am, Alain Roger wrote: > So now i know how to import the content of the CSV file to database, > however, before to import to database i do a simple test. > in fact, i display in my browser all content of my CSV file. > > unfortunately, not all characters are displayed c

Re: [PHP] multiple data to insert to database

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 8:36 am, Alain Roger wrote: > I would like to know what is the best way and fastest to insert into > PostgreSQL around 25.000 records (extracted from CSV file). > Should i use the standard pg_exec($dbconn, "insert into..."); for each > record ? 25.000 records is not THAT la

Re: [PHP] function -> action

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 9:40 am, Martin Alterisio wrote: > 2007/8/7, Richard Lynch <[EMAIL PROTECTED]>: >> >> On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: >> > I'm working on a project, where we distinguish between >> "functions" >> > and >> > "actions" in design, although in PHP both a

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 10:43 am, Robert Cummings wrote: > On Fri, 2007-08-10 at 11:40 -0400, Daniel Brown wrote: >> On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: >> > If PHP thinks something might be wrong it will tell you. Why on >> earth >> > would you want to ignore it? You think you're smarter t

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 10:18 am, Daniel Brown wrote: > So you're all going to tell me that you have E_NOTICE set to > report on your sites? Damn right I do! That's the FIRST thing I change on any new development site, anywhere, anytime. -- Some people have a "gift" link here. Know what I w

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 10:00 am, Daniel Brown wrote: > It's safe to ignore the `Undefined index` notices. That will just > appear if a variable is referenced without first being instantiated or > defined. No biggie, just put this at the head of your code: > > ini_set("error_reporting",E_ALL

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 9:43 am, Jason Pruim wrote: > I want to be able to sort that info so my sql query looks like: > "Select * from current order by '$order';" and $order is populated by > a GET when they click on a link: "Sort > by last name" Now... the whole PHP page is being included in > a

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 11:23 am, Tony Di Croce wrote: > I have to write some PHP backend code for a threaded message board. > The db > has a message table, and each message has a parent id. > > Does anyone have any advice for someone whos never done this in PHP? > > I'm currently thinking that I w

Re: [PHP] and newlines under windows

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 11:48 am, Faither wrote: > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > even explode are handling a "\n"-ewline. . . . > Is it even possible under windows? ^^ In Linux, the newline is "\n", but... Under Windows, the newline isn't "\n", it's "\r\n

Re: [PHP] Re: PHP on .NET DLR

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 12:12 pm, Sancar Saran wrote: > Once upon a time I try to ignite PHP community to develop some kind of > client > side php, which failed, because lack of interest (or because of > javascript). > In open source world everthing boosted from personal interest. Wez did a PHPScr

[PHP] Re: Forwarding $_POST[]...

2007-08-10 Thread Dan
I have a suspicion that this is something like. 1. User enters info 2. Checks if info is indeed valid |_ If not then ask the user for correct info 3. Done process the info Is this right? You can do this buy having PHP post to itself, it checks if the info is valid and if it isn't it renders

Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 1:26 pm, Kevin Murphy wrote: > I doubt this, but is there any way to determine via PHP if a browser > was refreshed automatically via a META tag vs the person clicking the > refresh button? You could embed something in the META tag's URL such as: http://example.com?from_me

Re: [PHP] Open Source Job Wanted system

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 1:54 pm, Joey wrote: > Has anybody had any experience with any open source Job posting > systems out > there? Check this out: http://jobcoin.com/ I haven't had a chance to install it and play with it yet, but it sure seems reasonable in its approach. -- Some people have a

RE: [PHP] Open Source Job Wanted system

2007-08-10 Thread Joey
Hey Nathan, Actually what I was looking for was an application so that I could have a service like craiglist. Joey From: Nathan Nobbe [mailto:[EMAIL PROTECTED] Sent: Thursday, August 09, 2007 3:46 PM To: Joey Cc: PHP Subject: Re: [PHP] Open Source Job Wanted system craigslist is out

Re: [PHP] Code Igniter for 'novices' ?

2007-08-10 Thread Dan
Um yeah. The PHPpatterns.com site hasn't been updated for years. Plus I'm unable to find any actual content on anything there. I looked through the indexes but didn't find anything. ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] steve, though i havent used c

[PHP] Re: string as file

2007-08-10 Thread Dan
Well, I have no idea what the Phython StringIO method does. Could someone explain in PHP terms maybe? Google gave me this explaining stringIO http://docs.python.org/lib/module-StringIO.html . It didnt' make much sense still after reading it though. - Dan "Rick Pasotto" <[EMAIL PROTECTED]>

Re: [PHP] php 4.4.7 make install with pear causes zend freeing errors

2007-08-10 Thread John Mendenhall
> On 8/10/07, John Mendenhall <[EMAIL PROTECTED]> wrote: > > Per my previous message, I have recently upgraded from > > php 4.4.0, to php 4.4.7. My configure options are as > > follows: > > > > > > > I would like to know what I am doing wrong here. > > When I turn off pear, this does not happen.

[PHP] simplexml_load_file()

2007-08-10 Thread Panquekas
Hello, I'm doing an script which it'll "read" the xml values, but I have one problem doing that. On the xml there is a tag that has an hífen in the middle, so when I do "echo $xml->comment-id" it gives me an error. How can I make this work? Thanks in advantage.

Re: [PHP] Re: Thoughts about music library

2007-08-10 Thread Børge Holen
On Wednesday 08 August 2007 03:16, Richard Lynch wrote: > On Tue, August 7, 2007 3:20 am, Colin Guthrie wrote: > > Børge Holen wrote: > >> On Monday 06 August 2007 23:39, Colin Guthrie wrote: > >>> Børge Holen wrote: > I'm building an web interface for my music collection. > >>> > >>> I'd ha

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Børge Holen
On Friday 10 August 2007 18:29, Stephen wrote: > --- Tony Di Croce <[EMAIL PROTECTED]> wrote: > > I have to write some PHP backend code for a threaded > > message board. The db > > has a message table, and each message has a parent > > id. > > > > Does anyone have any advice for someone whos never

[PHP] phpinfo does not display openssl module

2007-08-10 Thread Alain Roger
Hi i've reinstalled the complete server and i use apache module to load openSSL. However, if i uncomment in PHP.INI the extension=php_openssl.dll, it still does not appear on screen when i use phpinfo() function. i've tried also to uncomment some other extension and they also are not displayed du

Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Tijnema
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Kevin Murphy wrote: > > I doubt this, but is there any way to determine via PHP if a browser was > > refreshed automatically via a META tag vs the person clicking the > > refresh button? > > Add a GET variable to the URL you put in the meta tag to tell

Re: [PHP] php 4.4.7 make install with pear causes zend freeing errors

2007-08-10 Thread Tijnema
On 8/10/07, John Mendenhall <[EMAIL PROTECTED]> wrote: > I sent this to the php-install list. However, with > no response, I knew there would be more eyes looking > at it here. Hopefully, someone can send me a pointer > on how to resolve this issue. It might be the root of > other problems I am

Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Richard Davey
Hi Kevin, Friday, August 10, 2007, 7:26:30 PM, you wrote: > I doubt this, but is there any way to determine via PHP if a browser > was refreshed automatically via a META tag vs the person clicking the > refresh button? You could dynamically generate the meta tag, so it refreshes to your page w

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 19:49 +0200, Tijnema wrote: > On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > I always forget about file_get_contents() because its counterpart > > file_put_contents() for some ungodly reason didn't appear until PHP 5. > > Forget PHP4 and life becomes a lot eas

Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Tijnema
On 8/10/07, Kevin Murphy <[EMAIL PROTECTED]> wrote: > I doubt this, but is there any way to determine via PHP if a browser > was refreshed automatically via a META tag vs the person clicking the > refresh button? > > -- > Kevin Murphy Normally not, unless you add an extra GET item to the META tag,

Re: [PHP] manual vs. meta refresh

2007-08-10 Thread Stut
Kevin Murphy wrote: I doubt this, but is there any way to determine via PHP if a browser was refreshed automatically via a META tag vs the person clicking the refresh button? Add a GET variable to the URL you put in the meta tag to tell you it came from the meta tag. P.S. Please note that m

[PHP] manual vs. meta refresh

2007-08-10 Thread Kevin Murphy
I doubt this, but is there any way to determine via PHP if a browser was refreshed automatically via a META tag vs the person clicking the refresh button? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-

[PHP] php 4.4.7 make install with pear causes zend freeing errors

2007-08-10 Thread John Mendenhall
I sent this to the php-install list. However, with no response, I knew there would be more eyes looking at it here. Hopefully, someone can send me a pointer on how to resolve this issue. It might be the root of other problems I am having. Per my previous message, I have recently upgraded from p

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 19:21 +0200, Tijnema wrote: > On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: > > > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > > > I get an email from each > > > > server containing the contents of the

[PHP] php 4.4.7 configure run causes syntax errors

2007-08-10 Thread John Mendenhall
I sent this to the php-install list. However, with no response, I knew there would be more eyes looking at it here. Hopefully, someone can send me a pointer on how to resolve this issue, if it is one. I recently upgraded our php from 4.4.0 to 4.4.7. When I run configure from the command line wit

Re: [PHP] Running a server process

2007-08-10 Thread Tijnema
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Tijnema wrote: > > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > >> Tijnema wrote: > >>> On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Tijnema wrote: > > On 8/10/07, Richard Heyes <[EMAIL PROTECTED]> wrote: > >>> That is it works with just

Re: [PHP] Running a server process

2007-08-10 Thread Stut
Tijnema wrote: On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: On 8/10/07, Richard Heyes <[EMAIL PROTECTED]> wrote: That is it works with just me using the site. I am wondering how this would effect performance if say 500

Re: [PHP] Running a server process

2007-08-10 Thread Tijnema
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Tijnema wrote: > > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > >> Tijnema wrote: > >>> On 8/10/07, Richard Heyes <[EMAIL PROTECTED]> wrote: > > That is it works with just me using the site. I am wondering how this > > would > > effect pe

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Tijnema
On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-10 at 19:21 +0200, Tijnema wrote: > > On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: > > > > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > > > > I get

Re: [PHP] Running a server process

2007-08-10 Thread Stut
Tijnema wrote: On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: On 8/10/07, Richard Heyes <[EMAIL PROTECTED]> wrote: That is it works with just me using the site. I am wondering how this would effect performance if say 500 people were executing this php function around the same time

Re: [PHP] Running a server process

2007-08-10 Thread Tijnema
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Tijnema wrote: > > On 8/10/07, Richard Heyes <[EMAIL PROTECTED]> wrote: > >>> That is it works with just me using the site. I am wondering how this > >>> would > >>> effect performance if say 500 people were executing this php function > >>> around >

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Tijnema
On 8/10/07, Daniel Brown <[EMAIL PROTECTED]> wrote: > On 8/10/07, Faither <[EMAIL PROTECTED]> wrote: > > Hey there! > > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > > even explode are handling a "\n"-ewline. > > > > I have a text string from a form and am trying to replac

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Tijnema
On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: > > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > > I get an email from each > > > server containing the contents of the error log from the previous day > > > and my first task eac

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 17:53 +0100, Richard Davey wrote: > Hi Faither, > > Friday, August 10, 2007, 5:16:09 PM, you wrote: > > > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > > even explode are handling a "\n"-ewline. > > > I have a text string from a form and am trying

[PHP] Re: PHP on .NET DLR

2007-08-10 Thread Sancar Saran
Hello there, Once upon a time I try to ignite PHP community to develop some kind of client side php, which failed, because lack of interest (or because of javascript). In open source world everthing boosted from personal interest. > Hi, > > Thanks for chipping in. Silverlight is not a fad, be

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Tijnema
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Faither wrote: > > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > > even explode are handling a "\n"-ewline. > > > > I have a text string from a form and am trying to replace the "\n" or > > chr(10) or however you might call the

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Faither
Stut wrote: Faither wrote: I'm kind of lost with how str_replace , preg_replace, ereg_replace or even explode are handling a "\n"-ewline. I have a text string from a form and am trying to replace the "\n" or chr(10) or however you might call the newline with a simple html break tag. If I u

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Richard Davey
Hi Faither, Friday, August 10, 2007, 5:16:09 PM, you wrote: > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > even explode are handling a "\n"-ewline. > I have a text string from a form and am trying to replace the "\n" or > chr(10) or however you might call the newline

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Daniel Brown
On 8/10/07, Faither <[EMAIL PROTECTED]> wrote: > Hey there! > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > even explode are handling a "\n"-ewline. > > I have a text string from a form and am trying to replace the "\n" or > chr(10) or however you might call the newline wi

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 18:14 +0200, Faither wrote: > Hey there! > I'm kind of lost with how str_replace , preg_replace, ereg_replace or > even explode are handling a "\n"-ewline. > > I have a text string from a form and am trying to replace the "\n" or > chr(10) or however you might call the newl

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-10 at 17:39 +0100, Stut wrote: > > Robert Cummings wrote: > > > On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: > > >> On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > >>> I get an email from each > > >>> server con

[PHP] and newlines under windows

2007-08-10 Thread Faither
Hey there! I'm kind of lost with how str_replace , preg_replace, ereg_replace or even explode are handling a "\n"-ewline. I have a text string from a form and am trying to replace the "\n" or chr(10) or however you might call the newline with a simple html break tag. If I use the replacing f

Re: [PHP] Getting a 'newline' out of a string

2007-08-10 Thread Stut
Faither wrote: I'm kind of lost with how str_replace , preg_replace, ereg_replace or even explode are handling a "\n"-ewline. I have a text string from a form and am trying to replace the "\n" or chr(10) or however you might call the newline with a simple html break tag. If I use the replaci

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Michael Preslar
Here's what I use to watch my apache logs.. Looks for php errors, notices, and warnings, seg faults, etc.. Grabs the stats for the prior hour and spits them to stdout.. Pipe that to mutt or sendmail and youve got an hourly cron.. Check the command line options for other good stuff.. Only catch: Thi

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 17:39 +0100, Stut wrote: > Robert Cummings wrote: > > On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: > >> On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > >>> I get an email from each > >>> server containing the contents of the error log from the previous day > >>> a

[PHP] Getting a 'newline' out of a string

2007-08-10 Thread Faither
Hey there! I'm kind of lost with how str_replace , preg_replace, ereg_replace or even explode are handling a "\n"-ewline. I have a text string from a form and am trying to replace the "\n" or chr(10) or however you might call the newline with a simple html break tag. If I use the replacing f

[PHP] Getting a 'newline' out of a string

2007-08-10 Thread Faither
Hey there! I'm kind of lost with how str_replace , preg_replace, ereg_replace or even explode are handling a "\n"-ewline. I have a text string from a form and am trying to replace the "\n" or chr(10) or however you might call the newline with a simple html break tag. If I use the replacing f

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Richard Davey
Hi Tony, Friday, August 10, 2007, 5:23:28 PM, you wrote: > I have to write some PHP backend code for a threaded message board. > The db has a message table, and each message has a parent id. > Does anyone have any advice for someone whos never done this in PHP? > I'm currently thinking that I w

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Stut
Robert Cummings wrote: On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: I get an email from each server containing the contents of the error log from the previous day and my first task each day is to go through that and track down any issue

Re[2]: [PHP] Friday morning brain farts....

2007-08-10 Thread Richard Davey
Hi Stut, Friday, August 10, 2007, 4:44:14 PM, you wrote: > On my production servers error_reporting is set to E_ALL, > display_errors is off and log_errors is on. I get an email from each > server containing the contents of the error log from the previous > day and my first task each day is to go

Re: [PHP] string as file

2007-08-10 Thread Jim Lucas
Rick Pasotto wrote: On Thu, Aug 09, 2007 at 02:39:51PM -0700, Jim Lucas wrote: Rick Pasotto wrote: Does php have a facility similar to python's stringIO? What I'm wanting to do is similar to a mail merge. IOW, I know I can create an include file like: $out = << template.php This is two diffe

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Stephen
--- Tony Di Croce <[EMAIL PROTECTED]> wrote: > I have to write some PHP backend code for a threaded > message board. The db > has a message table, and each message has a parent > id. > > Does anyone have any advice for someone whos never > done this in PHP? You are reinventing the wheel here. Wh

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 11:48 -0400, Daniel Brown wrote: > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > I get an email from each > > server containing the contents of the error log from the previous day > > and my first task each day is to go through that and track down any > > issues that us

[PHP] Recursion and threaded message boards...

2007-08-10 Thread Tony Di Croce
I have to write some PHP backend code for a threaded message board. The db has a message table, and each message has a parent id. Does anyone have any advice for someone whos never done this in PHP? I'm currently thinking that I write function that takes a db row as an argument, and initially, it

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > I get an email from each > server containing the contents of the error log from the previous day > and my first task each day is to go through that and track down any > issues that usage has highlighted. That's actually a good point there that

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-10 at 11:40 -0400, Daniel Brown wrote: > > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > > If PHP thinks something might be wrong it will tell you. Why on earth > > > would you want to ignore it? You think you're smarter tha

Re: [PHP] string as file

2007-08-10 Thread Stut
Robert Cummings wrote: On Fri, 2007-08-10 at 16:28 +0100, Stut wrote: Rick Pasotto wrote: On Fri, Aug 10, 2007 at 02:19:29PM +0100, Stut wrote: Rick Pasotto wrote: On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: On 8/9/07, Rick Pasotto <[EMAIL PROTECTED]> wrote: Does php have a

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Stut
Daniel Brown wrote: On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: If PHP thinks something might be wrong it will tell you. Why on earth would you want to ignore it? You think you're smarter than PHP? Really? Okay, Stut, let's not make Friday the official "Flame Dan Brown" holiday this week.

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 11:40 -0400, Daniel Brown wrote: > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > If PHP thinks something might be wrong it will tell you. Why on earth > > would you want to ignore it? You think you're smarter than PHP? Really? > > Okay, Stut, let's not make Friday the o

Re: [PHP] string as file

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 16:28 +0100, Stut wrote: > Rick Pasotto wrote: > > On Fri, Aug 10, 2007 at 02:19:29PM +0100, Stut wrote: > >> Rick Pasotto wrote: > >>> On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: > On 8/9/07, Rick Pasotto <[EMAIL PROTECTED]> wrote: > > Does php have

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > If PHP thinks something might be wrong it will tell you. Why on earth > would you want to ignore it? You think you're smarter than PHP? Really? Okay, Stut, let's not make Friday the official "Flame Dan Brown" holiday this week. I vote that it shou

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 11:28 -0400, Daniel Brown wrote: > On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > I never disable E_NOTICE or even E_STRICT. > > I'm humbled in the presence of greatness. Nothing great about it. It's work as usual. When you're developing the code you see any

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Stut
Daniel Brown wrote: On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: I never disable E_NOTICE or even E_STRICT. I'm humbled in the presence of greatness. I do my best to ensure that there are no notices or warnings, but I still disable E_NOTICE in general, because I know that it

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Stut
Daniel Brown wrote: On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: Bad Dan *slap*. Ignoring notices may be detrimental to your health and/or well-being. Better to initialise it with a default if it has not been set in the request. if (!isset($_GET['order'])) $_GET['order'] = 'Last'; Ouch!

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > I never disable E_NOTICE or even E_STRICT. I'm humbled in the presence of greatness. I do my best to ensure that there are no notices or warnings, but I still disable E_NOTICE in general, because I know that it's not going to end th

Re: [PHP] string as file

2007-08-10 Thread Stut
Rick Pasotto wrote: On Fri, Aug 10, 2007 at 02:19:29PM +0100, Stut wrote: Rick Pasotto wrote: On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: On 8/9/07, Rick Pasotto <[EMAIL PROTECTED]> wrote: Does php have a facility similar to python's stringIO? What I'm wanting to do is simil

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 11:18 -0400, Daniel Brown wrote: > On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > > Bad Dan *slap*. Ignoring notices may be detrimental to your health > > and/or well-being. Better to initialise it with a default if it has not > > been set in the request. > > > > if (!isset($_G

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 10:43 -0400, Jason Pruim wrote: > Hi All :) > > Hope you're not getting sick of my questions as of late, but I keep > getting closer and closer and thank you all who have helped me in the > past! "The only reason I can see this far is I am standing on the > shoulders of

Re[2]: [PHP] Friday morning brain farts....

2007-08-10 Thread Richard Davey
Hi Robert, Friday, August 10, 2007, 4:13:02 PM, you wrote: > On Fri, 2007-08-10 at 11:00 -0400, Daniel Brown wrote: >> >> Remember to clean that input before you sit down at the table, there, >> boy! >> >> It's safe to ignore the `Undefined index` notices. That will just >> appear if a

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Stut <[EMAIL PROTECTED]> wrote: > Bad Dan *slap*. Ignoring notices may be detrimental to your health > and/or well-being. Better to initialise it with a default if it has not > been set in the request. > > if (!isset($_GET['order'])) $_GET['order'] = 'Last'; Ouch! So you're al

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Stut
Daniel Brown wrote: On 8/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Hi All :) Hope you're not getting sick of my questions as of late, but I keep getting closer and closer and thank you all who have helped me in the past! "The only reason I can see this far is I am standing on the shoulders

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-10 at 11:00 -0400, Daniel Brown wrote: > > > > Remember to clean that input before you sit down at the table, there, > > boy! > > > > It's safe to ignore the `Undefined index` notices. That will just > > appear if a

Re: [PHP] string as file

2007-08-10 Thread Rick Pasotto
On Fri, Aug 10, 2007 at 02:19:29PM +0100, Stut wrote: > Rick Pasotto wrote: >> On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: >>> On 8/9/07, Rick Pasotto <[EMAIL PROTECTED]> wrote: Does php have a facility similar to python's stringIO? What I'm wanting to do is similar

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 11:00 -0400, Daniel Brown wrote: > > Remember to clean that input before you sit down at the table, there, boy! > > It's safe to ignore the `Undefined index` notices. That will just > appear if a variable is referenced without first being instantiated or > defined.

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Daniel Brown
On 8/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > Hi All :) > > Hope you're not getting sick of my questions as of late, but I keep > getting closer and closer and thank you all who have helped me in the > past! "The only reason I can see this far is I am standing on the > shoulders of giants" d

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Paul Novitski
At 8/10/2007 07:43 AM, Jason Pruim wrote: I want to be able to sort that info so my sql query looks like: "Select * from current order by '$order';" and $order is populated by a GET when they click on a link: "Sort by last name" Now... the whole PHP page is being included in a .shtml page to act

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Borokov Smith
if (isset($_GET['order'] && in_array($_GET['order'], array('Last', 'First', ...))) { $requestedOrder = $_GET['order']; } else { $requestedOrder = ; } Mind the in_array() call. Always sanitize user input. greetz, boro Jason Pruim schreef: Hi All :) Hope you're not getting sick of my questi

[PHP] Friday morning brain farts....

2007-08-10 Thread Jason Pruim
Hi All :) Hope you're not getting sick of my questions as of late, but I keep getting closer and closer and thank you all who have helped me in the past! "The only reason I can see this far is I am standing on the shoulders of giants" don't know who said that but I like it :) Anyway... On

Re: [PHP] function -> action

2007-08-10 Thread Martin Alterisio
2007/8/7, Richard Lynch <[EMAIL PROTECTED]>: > > On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: > > I'm working on a project, where we distinguish between "functions" > > and > > "actions" in design, although in PHP both are implemented as > > functions. > > Is there a chance that PHP can

[PHP] multiple data to insert to database

2007-08-10 Thread Alain Roger
Hi, I would like to know what is the best way and fastest to insert into PostgreSQL around 25.000 records (extracted from CSV file). Should i use the standard pg_exec($dbconn, "insert into..."); for each record ? thanks a lot, -- Alain Windows XP SP2 Postgre

Re: [PHP] Running a server process

2007-08-10 Thread Stut
Tijnema wrote: On 8/10/07, Richard Heyes <[EMAIL PROTECTED]> wrote: That is it works with just me using the site. I am wondering how this would effect performance if say 500 people were executing this php function around the same time and the processing overlapped. Is there anyway to make an e

  1   2   >