Re: [PHP] Re: Fork and zombies

2009-03-18 Thread Per Jessen
Waynn Lue wrote: > Whoops, I spoke too soon, I think the sleep(3) causes the child not to > exit before the parent. If instead I don't pass WNOHANG to the > waitpid command, it does error out. So it looks like your theory is > correct, and I still have that problem. I guess the only solution is

Re: [PHP] PHP Quiz

2009-03-18 Thread Ashley Sheridan
On Wed, 2009-03-18 at 10:57 +0530, satya narayan wrote: > Hello Friends, > > I have started a FREE site for quizzes for PHP. > > I need your kind help, if possible please visit the site and take some > quizzes, and then let me know your feedback. Should I add any thing > else in that site? > >

Re: [PHP] Calendar/Date

2009-03-18 Thread Robert Cummings
On Tue, 2009-03-17 at 20:52 -0700, Jason Todd Slack-Moehrle wrote: > Hi All, > > Does anyone have code and/or advice for how to get get the current > week (with a passed current day, say) and what then end date is at > Saturday. > > So take today: Tuesday March 17, 2009 > > I want to get: >

Re: [PHP] PHP Quiz

2009-03-18 Thread satya narayan
Hi ash, Thanks for your feedback first. Actually registration helps admin to track an user . Additionally if you are registered you can see your previous results for different Quizzes. That's what I thought It is good to have registration restriction. I think its a small cost to pay for an User if

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-18 Thread Michael A. Peters
Martin Zvarík wrote: Jan G.B. napsal(a): 2009/3/15 Martin Zvarík : "The browser will only execute script in source files from the white-listed domains and will disregard everything else, including embedded and inline scripts. " wtf, can't you just take care of the INPUT and type strip_tags($

RE: [PHP] Re: Multithreading in PHP

2009-03-18 Thread Andrea Giammarchi
If anybody interested, this is my "old" comet implementation in PHP: http://webreflection.blogspot.com/2008/04/phomet-changes-name-so-welcome-phico.html P.S. Hi Manuel, ages I do not read you ( ages I do not post my classes in phpclasses.org :-) ) > Date: Tue, 17 Mar 2009 17:43:03 -0300 > From:

Re: [PHP] Re: Fork and zombies

2009-03-18 Thread Waynn Lue
> > > Whoops, I spoke too soon, I think the sleep(3) causes the child not to > > exit before the parent. If instead I don't pass WNOHANG to the > > waitpid command, it does error out. So it looks like your theory is > > correct, and I still have that problem. I guess the only solution is > > to

[PHP] Built-in objec ts APC or serializat ion‏‏

2009-03-18 Thread Andrea Giammarchi
I think I had some problem with this ML ... so I try again to write down my question: I would like to know if there a generic extension/3rd parts/solution to save the state of a built-in PHP object. I perfectly know that __sleep and __wakeup or ... implements Serializable { ... } could allow me

Re: [PHP] "/home/{user}/directory"

2009-03-18 Thread Waynn Lue
bash also has $HOME, which maps to /home/USERNAME, just in case you wanted another way. :) On Tue, Mar 17, 2009 at 6:47 AM, George Larson wrote: > Thanks! > > On Tue, Mar 17, 2009 at 9:46 AM, Stuart wrote: > > > 2009/3/17 George Larson > > > > In my scripts, I usually define a boolean constant

Re: [PHP] PHP Quiz

2009-03-18 Thread Stuart
2009/3/18 satya narayan : > Hi ash, > Thanks for your feedback first. > Actually registration helps admin to track an user . Additionally if > you are registered you can see your previous results for different > Quizzes. That's what I thought It is good to have registration > restriction. I think i

Re: [PHP] Re: Fork and zombies

2009-03-18 Thread Waynn Lue
> > Yeah, that's what I ended up doing, and defining some global variables so > that I could re-use the previous functions I created, thanks for the help! > > One other question I had, is pcntl_waitpid necessary in this case? Passing > WNOHANG to it causes it to return immediately regardless of wh

Re: [PHP] PHP Quiz

2009-03-18 Thread Dotan Cohen
Actually, I like the site. The pages take a long time to load, it seems like server load. You might want to move your images to Amazon S3 or something similar. There are many spelling errors. Go through the quizes. I like the way the quizzes are broken up into sets. Add more sets on a regular bas

Re: [PHP] PHP Quiz

2009-03-18 Thread satya narayan
Thank you very Much Dotan Cohen for visiting the Site. I will look into the "spelling errors" problem On 3/18/09, Dotan Cohen wrote: > Actually, I like the site. The pages take a long time to load, it > seems like server load. You might want to move your images to Amazon > S3 or something simi

Re: [PHP] Form to pdf

2009-03-18 Thread Gary
I sorry I was not more clear. I have a paper form which I have created into a PDF form with text fields. I would like to create an online form (html - PHP-MySQL) that people can fill in the text fields, having the information sent to me and the information then being inserted into the original

Re: [PHP] Multithreading in PHP

2009-03-18 Thread Alpár Török
2009/3/17 Manoj Singh : > Hi Alpar, > > Thanks for reply. > > Actually the form is submitted through ajax request and the validation is > checking on the server side. So if any error occurs on submission of form, > then we are displaying the errors to the user. And is there is no error, > then the

Re: [PHP] Re: Fork and zombies

2009-03-18 Thread Per Jessen
Waynn Lue wrote: >> >> Yeah, that's what I ended up doing, and defining some global >> variables so that I could re-use the previous functions I created, >> thanks for the help! >> >> One other question I had, is pcntl_waitpid necessary in this case? >> Passing WNOHANG to it causes it to return i

Re: [PHP] PHP Quiz

2009-03-18 Thread Dotan Cohen
> I need your kind help, if possible please visit the site and take some > quizzes, and then let me know your feedback. Should I add any thing > else in that site? > Regarding this question: "Which one is good to use, to send the output?" 1) The question is not well worded 2) The answer is a matte

Re: [PHP] preg_replace() question

2009-03-18 Thread Richard Heyes
> 1. What is the overhead on preg_replace? Minimal. If you're looking for all the speed you can get, you'd probably be better off with an str* function though if you can find one. You'd have to be seriously after speed gains though. > 2. Is there a better way to strip spaces and non alpha numeric

Re: [PHP] PHP Quiz

2009-03-18 Thread satya narayan
Thank you Stuart, I got your point I am going to Open all the quizzes for all. On 3/18/09, Stuart wrote: > 2009/3/18 satya narayan : >> Hi ash, >> Thanks for your feedback first. >> Actually registration helps admin to track an user . Additionally if >> you are registered you can see your previou

Re: [PHP] "/home/{user}/directory"

2009-03-18 Thread George Larson
My question was, as usual, inadequately formed. Realpath() was interesting but I was creating directories to store archived data. In my limited testing, it seemed that realpath returns a relative path. Other words, if you're already in home and you try (realpath("~")."\archive\") then you get on

Re: [PHP] assign associative array values to variables? SOLVED

2009-03-18 Thread PJ
dg wrote: > > On Mar 17, 2009, at 6:47 PM, PJ wrote: > >> The problem is that the $array returns another array (multidimensional >> and associative ?? ) > > > $array_branch_one = array("value_one" => "red", "value_two" => "blue"); > $array_branch_two = array("value_three" => "green", "value_four"

Re: [PHP] Built-in objects APC or serialization ‏‏

2009-03-18 Thread Jochem Maas
you shouldn't start a new thread by replying to an existing one. also, you've already asked this question. Andrea Giammarchi schreef: > I think I had some problem with this ML ... so I try again to write down my > question: ... this is not paid support, asking a question garantees neither an an

Re: [PHP] "/home/{user}/directory"

2009-03-18 Thread Steve Holmes
On Tue, Mar 17, 2009 at 9:51 AM, Thiago H. Pojda wrote: > On Tue, Mar 17, 2009 at 10:42 AM, George Larson > wrote: > > > In my scripts, I usually define a boolean constant DEBUG. True looks for > > local copies of includes and echoes queries as they're used. > > > > My question is: > > > > Is the

Re: [PHP] assign associative array values to variables?

2009-03-18 Thread Thodoris
I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points the way how to extract values from

Re: [PHP] php-general-sc.1237291233.npmhceaklghpccnefjed-born2victory=gmail....@lists.php.net

2009-03-18 Thread Daniel Brown
On Wed, Mar 18, 2009 at 00:07, Born2Win wrote: > > In case you didn't realize it already by seeing a stream of posts starting to arrive, you're subscribed now. ;-P You can change you preferences in the future by filling out the form at http://php.net/mailinglists -- daniel.br...@para

[PHP] PHP-CLI issue

2009-03-18 Thread Jesse.Hazen
Hi, I am working on building a PHP-CLI 'game' for converting binary/hex/decimal, to better your speed at converting between base number systems. I started on the game class, and created a little menu with user input for different game modes. If the user inputs invalid data, the script is suppos

Re: [PHP] Form to pdf

2009-03-18 Thread tedd
At 5:48 PM -0400 3/17/09, Gary wrote: Is it possible to create an online form, that when filled out the fields will can be placed in a pdf form? Gary: Sure, here's an example: http://webbytedd.com/bb/pdf/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earths

RE: [PHP] PHP-CLI issue

2009-03-18 Thread Jesse.Hazen
Rob, Thanks for the quick reply. I did try that before, but now my issue is that the if-else section does not recognize the data as being valid. So, I changed it to fgets(), and reran, this time using valid data. The initial problem is corrected (it only gives the error once), but now it does not

Re: [PHP] Form to pdf

2009-03-18 Thread Gary
I'm going to frame that and call my ma Can you direct me to how I can learn that? Thanks for your help. Gary "Sperling Institute of Technology Honoree" "tedd" wrote in message news:p06240805c5e6afc21...@[192.168.1.101]... > At 5:48 PM -0400 3/17/09, Gary wrote: >>Is it possible to create

RE: [PHP] PHP-CLI issue

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 07:10 -0700, jesse.ha...@arvatousa.com wrote: > Rob, > > Thanks for the quick reply. I did try that before, but now my issue is > that the if-else section does not recognize the data as being valid. So, > I changed it to fgets(), and reran, this time using valid data. The > i

RE: [PHP] PHP-CLI issue

2009-03-18 Thread Jesse.Hazen
Rob, Works like a charm! Much appreciated. Thanks, Jesse Hazen -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Wednesday, March 18, 2009 7:24 AM To: Hazen, Jesse, arvato digital services llc Cc: php-general@lists.php.net Subject: RE: [PHP] PHP-CLI is

[PHP] Smarty Tips and Techniques

2009-03-18 Thread Virgilio Quilario
Hi list, Just wanna share my collection of Smarty scripting tips and techniques. Smarty is a template engine for PHP that you can use to separate data and logic from web design. This way programmers can work on the php scripts and designers can work on the templates for the same web site. Here is

Re: [PHP] PHP-CLI issue

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 06:52 -0700, jesse.ha...@arvatousa.com wrote: > private function getSelection() { > > fwrite(STDOUT,"Mode: "); > > $input = strtoupper(fgetc(STDIN)); > > return $input; > > } Use fgets(

Re: [PHP] Form to pdf

2009-03-18 Thread George Larson
I'm going to print one to 'Fork and Zombies' and hang it in my office. I really mean that. On Wed, Mar 18, 2009 at 10:17 AM, Gary wrote: > I'm going to frame that and call my ma > > Can you direct me to how I can learn that? > > Thanks for your help. > > Gary > "Sperling Institute of Techno

Re: [PHP] preg_replace() question

2009-03-18 Thread Virgilio Quilario
> 1. What is the overhead on preg_replace? it really depends on your operation. when you think it can be done using str* functions then go for it as they are much faster than preg* functions. > 2. Is there a better way to strip spaces and non alpha numerical > characters from text strings? I susp

Re: [PHP] preg_replace() question

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 22:55 +0800, Virgilio Quilario wrote: > > 1. What is the overhead on preg_replace? > > it really depends on your operation. when you think it can be done > using str* functions then go for it as they are much faster than preg* > functions. > > > 2. Is there a better way to s

RE: [PHP] Smarty Tips and Techniques

2009-03-18 Thread Bob McConnell
That looks nice, but how do I get to the point where I can understand how to use it? I have also looked at the Smarty site , but their documents assume significant experience in building and using templates. Where can I find guidance or tutorials on how to do all of this,

Re: [PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread Jan G.B.
Mantis is a pain in the a*** (for non technical persons). We (we as in 'the IT department') are using mantis, but all other persons in the firm fail to do so. Not very useful. Most persons doesn't even get how the filters work. byebye 2009/3/17 Micah Gersten : > mike wrote: >> http://www.redmin

RE: [PHP] Calendar/Date

2009-03-18 Thread Bob McConnell
From: Paul M Foster > On Tue, Mar 17, 2009 at 08:52:11PM -0700, Jason Todd Slack-Moehrle wrote: > >> Hi All, >> >> Does anyone have code and/or advice for how to get get the current >> week (with a passed current day, say) and what then end date is at >> Saturday. >> >> So take today: Tuesday Marc

RE: [PHP] Calendar/Date

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 11:46 -0400, Bob McConnell wrote: > From: Paul M Foster > > On Tue, Mar 17, 2009 at 08:52:11PM -0700, Jason Todd Slack-Moehrle > wrote: > > > >> Hi All, > >> > >> Does anyone have code and/or advice for how to get get the current > >> week (with a passed current day, say) and

Re: [PHP] Calendar/Date

2009-03-18 Thread Paul M Foster
On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote: > From: Paul M Foster > > You also need to be aware that on 32 bit Unix and Linux systems the > behavior of mktime() on dates after Jan 18, 2038 is undefined. The 32 > bit counter overflows early on the 19th, so any value returned

RE: [PHP] Calendar/Date

2009-03-18 Thread Bob McConnell
From: Paul M Foster > On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote: >> >>> You also need to be aware that on 32 bit Unix and Linux systems the >> behavior of mktime() on dates after Jan 18, 2038 is undefined. The 32 >> bit counter overflows early on the 19th, so any value returned

[PHP] Re: [PHP-WIN] Can't seem to transfer a dynamically chosen parameter to next page

2009-03-18 Thread Stuart
Please keep the discussion on-list. 2009/3/18 Bill Mudry : > At 04:44 AM 3/18/2009, you wrote: > > 2009/3/18 Joao Gomes Madeira : >> Hey Stuart >> >> That's what I thought at first, but Bill mentioned the usage of a form >> only as an example, in reality he is not using it. He just wanted >> this.

Re: [PHP] Smarty Tips and Techniques

2009-03-18 Thread Thodoris
That looks nice, but how do I get to the point where I can understand how to use it? I have also looked at the Smarty site , but their documents assume significant experience in building and using templates. Where can I find guidance or tutorials on how to do all of thi

[PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread revDAVE
Using a repeating region of a query, I want to generate a 'form on the fly' So for each repeat - I have an extra form input Each input name = thisline So it will make names like: thisline1 thisline2 thisline3 Etc. For the form fields - $cnt = 1; Repeat.

Re: [PHP] Calendar/Date

2009-03-18 Thread Paul M Foster
On Wed, Mar 18, 2009 at 12:57:39PM -0400, Bob McConnell wrote: > From: Paul M Foster > > On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote: > >> > >>> You also need to be aware that on 32 bit Unix and Linux systems the > >> behavior of mktime() on dates after Jan 18, 2038 is undefined

RE: [PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread Bob McConnell
From: revDAVE > > Using a repeating region of a query, I want to generate a 'form on the fly' > > So for each repeat - I have an extra form input > > Each input name = thisline > > So it will make names like: > > thisline1 > thisline2 > thisline3 > Etc. > > For the form fields > > --

Re: [PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread mike
On Wed, Mar 18, 2009 at 8:30 AM, Jan G.B. wrote: > Mantis is a pain in the a*** (for non technical persons). +1 had some annoying bugs, too. it's only really a bug tracker last i checked anyhow. trac or redmine is more what would be beneficial. -- PHP General Mailing List (http://www.php.net

RE: [PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread Carlos Garcia
with this is a simple text : $this = 'thisline' . $cnt; echo $_POST[$this]; Carlos A. Garcia Hernandez > Date: Wed, 18 Mar 2009 12:12:54 -0700 > From: c...@hosting4days.com > To: php-general@lists.php.net > Subject: [PHP] Dynamic Form 'on The Fly' > > Using a repeating region of a

Re: [PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread Paul M Foster
On Wed, Mar 18, 2009 at 12:12:54PM -0700, revDAVE wrote: > Using a repeating region of a query, I want to generate a 'form on the fly' > > So for each repeat - I have an extra form input > > Each input name = thisline > > So it will make names like: > > thisline1 > thisline2 > thisline3 >

Re: [PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread Shawn McKenzie
Bob McConnell wrote: > From: revDAVE >> Using a repeating region of a query, I want to generate a 'form on the > fly' >> So for each repeat - I have an extra form input >> >> Each input name = thisline >> >> So it will make names like: >> >> thisline1 >> thisline2 >> thisline3 >> Etc. >> >> For

[PHP] "Default" field

2009-03-18 Thread Paul M Foster
Slightly OT, but here's the question. Normally when a form paints, the cursor isn't in any particular field. If you want to have the cursor show up in a particular field, how do you do that? I knew at one time and now can't find how it's done. Paul -- Paul M. Foster -- PHP General Mailing List

[PHP] Looking for a configurable Flash or PHP Live Chat Box or Shout Box With Rooms Optional

2009-03-18 Thread TS
Does anyone have a good link to something like this for reasonable price or free? Configurable meaning skinnable and sizeable? Something Ajaxy would be cool but it would need to save state like the facebook IM feature on their site. Thanks, T -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread Micah Gersten
mike wrote: > On Wed, Mar 18, 2009 at 8:30 AM, Jan G.B. wrote: >> Mantis is a pain in the a*** (for non technical persons). > > +1 > > had some annoying bugs, too. > > it's only really a bug tracker last i checked anyhow. > > trac or redmine is more what would be beneficial. OP asked for PHP.

Re: [PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread mike
On Wed, Mar 18, 2009 at 1:22 PM, Micah Gersten > OP asked for PHP.  Trac is python and Redmine is Ruby.  They've added > twitter support, VCS support, and wiki support lately and are working on > the major 1.2 upgrade now. i am the OP :) i know. i was just adding trac as another example. -- PHP

Re: [PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread Micah Gersten
mike wrote: > On Wed, Mar 18, 2009 at 1:22 PM, Micah Gersten > > >> OP asked for PHP. Trac is python and Redmine is Ruby. They've added >> twitter support, VCS support, and wiki support lately and are working on >> the major 1.2 upgrade now. > > i am the OP :) i know. i was just adding trac as

Re: [PHP] "Default" field

2009-03-18 Thread Bastien Koert
On Wed, Mar 18, 2009 at 4:18 PM, Paul M Foster wrote: > Slightly OT, but here's the question. Normally when a form paints, the > cursor isn't in any particular field. If you want to have the cursor > show up in a particular field, how do you do that? I knew at one time > and now can't find how it'

[PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread Shawn McKenzie
mike wrote: > http://www.redmine.org/ > > Looks pretty useful; I want one in PHP though. > > Anyone? Haven't used it, but it looks pretty cool. Guess it depends on what features you need. http://gforge.org/gf/project/gforge/frs/?action=FrsReleaseBrowse&frs_package_id=2 -- Thanks! -Shawn http

Re: [PHP] Calendar/Date

2009-03-18 Thread Hans Åhlin
Weeks in a year is 52 or 53 Days in a year is 365 and if a leap year 366 If ( (365 (Days Of a year) * (Years From 1940)) + (Number of leap years since 1940, (Years From 1940 / 4) (if its a Leap year -1)) + ((Days >From 01-01) + 1) % 7 = (0-6 where 0 = Monday) ) is less then 3 (Thursday) then it

[PHP] GSOC Idea, RPC Server

2009-03-18 Thread Cesar D. Rodas
Hello folk, Let me introduce myself, my name is Cesar Rodas, a young guy from Paraguay who wants to propose an idea for the GSoC2009. The purpose of this project is to implement a pure PHP client and server API for distributing PHP applications over clusters of back-end servers that are called b