[PHP] Fork and zombies

2009-03-16 Thread Waynn Lue
I periodically run a script that makes a call against a remote API, which takes some time to return. In an attempt to increase thoroughput, I decided to investigate using pnctl_fork to spawn off multiple processes to make the call, since the slowest part is the network part of it (and waiting for

Re: [PHP] Re: GeoIP?

2009-03-16 Thread Per Jessen
Michelle Konzack wrote: > Hello Per, > > Am 2009-03-15 15:12:47, schrieb Per Jessen: >> The easiest is to use a DNS service - this is the best one I know: >> http://countries.nerd.dk/ > > This is cool... > I'm glad you like it - it really is cool. /Per -- Per Jessen, Zürich (4.1°C) -- P

Re: [PHP] Fork and zombies

2009-03-16 Thread Per Jessen
Waynn Lue wrote: > I periodically run a script that makes a call against a remote API, > which > takes some time to return. In an attempt to increase thoroughput, I > decided to investigate using pnctl_fork to spawn off multiple > processes to make the call, since the slowest part is the network

Re: [PHP] Re: GeoIP?

2009-03-16 Thread Louie Miranda
Thanks for this! -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines On Mon, Mar 16, 2009 at 3:48 PM, Per Jessen wrote: > Michelle Konzack wrote: > > > Hello Per, > > > > Am 2009-03-15 15:12:47, sch

Re: [PHP] Fork and zombies

2009-03-16 Thread Waynn Lue
> > Waynn Lue wrote: > > > I periodically run a script that makes a call against a remote API, > > which > > takes some time to return. In an attempt to increase thoroughput, I > > decided to investigate using pnctl_fork to spawn off multiple > > processes to make the call, since the slowest part

[PHP] How to catch fatal errors

2009-03-16 Thread Tanoor Dieng
Hello every body, I'm currently working on a very high traffic web sites. I often get a fatal error in production about memory "Allowed memory size of ... exhausted". Unfortunately, I can not reproduce this fatal error in developpement environment. The main reason for that is that I don't know t

Re: [PHP] Fork and zombies

2009-03-16 Thread Per Jessen
Waynn Lue wrote: >> > While this works, it unfortunately leaves behind a zombie process >> > every single time. >> >> You need to call pcntl_wait() or pcntl_waitpid(). >> > > Right, but if I do that, then the parent has to wait until the child > completes before it exits. No it doesn't - just

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
Jim Lucas wrote: > PJ wrote: >> haliphax wrote: >>> On Fri, Mar 13, 2009 at 1:24 PM, PJ wrote: Jim Lucas wrote: > PJ wrote: >> am resending as this was erroneously ccd to mysql. sorry! >> >> Ashley Sheridan wrote: >>> On Thu, 2009-02-26 at 11:27 -0500, PJ wrote: J

Re: [PHP] How to catch fatal errors

2009-03-16 Thread Jochem Maas
Tanoor Dieng schreef: > Hello every body, > I'm currently working on a very high traffic web sites. > I often get a fatal error in production about memory "Allowed memory size > of ... exhausted". > > Unfortunately, I can not reproduce this fatal error in developpement > environment. > The main r

Re: [PHP] Problem with passing and Area in a $_POST

2009-03-16 Thread tedd
At 1:30 PM -0700 3/15/09, Richard Kurth wrote: tedd wrote: At 8:56 AM -0700 3/15/09, Richard Kurth wrote: This is the form that is being sent as a post and the fieldorder[] is the part that is not sending properly. But it has worked for about a year in the script. It just stopped working. and

[PHP] pdf_new() uncalled Function

2009-03-16 Thread Alice Wei
Hi, I use Linux, and I had installed PHP using yum install php. I am trying to use the pdf_new function to create pdfs from existing text files, but I get this error PHP Fatal error: Call to undefined function pdf_new() I have noticed that when I run the phpinfo() command, I cannot

Re: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Bastien Koert
On Mon, Mar 16, 2009 at 10:06 AM, Alice Wei wrote: > > Hi, > > I use Linux, and I had installed PHP using yum install php. I am trying to > use the pdf_new function to create pdfs from existing text files, but I get > this error > >PHP Fatal error: Call to undefined function pdf_new() > > I

Re: [PHP] How to catch fatal errors

2009-03-16 Thread 9el
On Mon, Mar 16, 2009 at 3:51 PM, Tanoor Dieng wrote: > Hello every body, > I'm currently working on a very high traffic web sites. > I often get a fatal error in production about memory "Allowed memory size > of ... exhausted". > > Unfortunately, I can not reproduce this fatal error in developpe

[PHP] Re: pdf_new() uncalled Function

2009-03-16 Thread Shawn McKenzie
Alice Wei wrote: > Hi, > > I use Linux, and I had installed PHP using yum install php. I am trying to > use the pdf_new function to create pdfs from existing text files, but I get > this error > > PHP Fatal error: Call to undefined function pdf_new() > > I have noticed that when I ru

RE: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Alice Wei
On Mon, Mar 16, 2009 at 10:06 AM, Alice Wei wrote: Hi, I use Linux, and I had installed PHP using yum install php. I am trying to use the pdf_new function to create pdfs from existing text files, but I get this error PHP Fatal error: Call to undefined function pdf_new() I hav

Re: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Bastien Koert
On Mon, Mar 16, 2009 at 11:32 AM, Alice Wei wrote: > > On Mon, Mar 16, 2009 at 10:06 AM, Alice Wei wrote: > > > > Hi, > > > > I use Linux, and I had installed PHP using yum install php. I am trying to > use the pdf_new function to create pdfs from existing text files, but I get > this error > >

RE: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Alice Wei
Date: Mon, 16 Mar 2009 11:41:35 -0400 Subject: Re: [PHP] pdf_new() uncalled Function From: phps...@gmail.com To: aj...@alumni.iu.edu CC: php-general@lists.php.net On Mon, Mar 16, 2009 at 11:32 AM, Alice Wei wrote: On Mon, Mar 16, 2009 at 10:06 AM, Alice Wei wrote: Hi, I us

Re: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Paul M Foster
On Mon, Mar 16, 2009 at 10:06:32AM -0400, Alice Wei wrote: > > Hi, > > I use Linux, and I had installed PHP using yum install php. I am trying to > use the pdf_new function to create pdfs from existing text files, but I get > this error > > PHP Fatal error: Call to undefined function

[PHP] A couple of questions

2009-03-16 Thread Payne
Guys, I had a page working on my opensuse 11.0 32bit, had to upgrade to 11.1 64bit. I have two strange issues. The first my code is being display when I call the page, I looked at the logs and I don't see any errors that explain why this happen. I looked at my php.ini and I don't see anythin

Re: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Bastien Koert
[snip] > > > [/snip] > another option is FPDF from www.fpdf.org another class > > the classes are nice since they don't generally require the module to be > installed. > > If you are on Linux, another option might be FOP... > http://xmlgraphics.apache.org/fop/ > > I checked out the first link you

Re: [PHP] Re: GeoIP?

2009-03-16 Thread zerof
Nitsan Bin-Nun escreveu: Hi Michelle, Try to use sqlite instead of any other database. It will be better I guess. Regards, Nitsan On Sun, Mar 15, 2009 at 9:08 PM, zerof .> wrote: Please, avoid to reply our messages with entire heads. I don't like to see my email along these. zerof

Re: [PHP] A couple of questions

2009-03-16 Thread Stuart
2009/3/16 Payne > I had a page working on my opensuse 11.0 32bit, had to upgrade to 11.1 > 64bit. I have two strange issues. > > The first my code is being display when I call the page, I looked at the > logs and I don't see any errors that explain why this happen. I looked at my > php.ini and I

Re: [PHP] A couple of questions

2009-03-16 Thread Nick Cooper
2009/3/16 Stuart > 2009/3/16 Payne > > > I had a page working on my opensuse 11.0 32bit, had to upgrade to 11.1 > > 64bit. I have two strange issues. > > > > The first my code is being display when I call the page, I looked at the > > logs and I don't see any errors that explain why this happen.

Re: [PHP] A couple of questions

2009-03-16 Thread Payne
Nick Cooper wrote: 2009/3/16 Stuart mailto:stut...@gmail.com>> 2009/3/16 Payne mailto:pa...@magidesign.com>> > I had a page working on my opensuse 11.0 32bit, had to upgrade to 11.1 > 64bit. I have two strange issues. > > The first my code is being display when I call

Re: [PHP] A couple of questions

2009-03-16 Thread Stuart
2009/3/16 Payne > Nick Cooper wrote: > >> >> >> 2009/3/16 Stuart mailto:stut...@gmail.com>> >> >>2009/3/16 Payne mailto:pa...@magidesign.com>> >> >> >>> I had a page working on my opensuse 11.0 32bit, had to upgrade >>to 11.1 >>> 64bit. I have two strange issues. >>> >>> T

RE: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Alice Wei
[/snip] another option is FPDF from www.fpdf.org another class the classes are nice since they don't generally require the module to be installed. If you are on Linux, another option might be FOP... http://xmlgraphics.apache.org/fop/ I checked out the first link you provided, and dow

Re: [PHP] pdf_new() uncalled Function

2009-03-16 Thread Bastien Koert
On Mon, Mar 16, 2009 at 1:48 PM, Alice Wei wrote: > [/snip] > another option is FPDF from www.fpdf.org another class > > the classes are nice since they don't generally require the module to be > installed. > > If you are on Linux, another option might be FOP... > http://xmlgraphics.apache.org/f

Re: [PHP] Re: GeoIP?

2009-03-16 Thread Daniel Brown
On Mon, Mar 16, 2009 at 12:01, zerof wrote: > > Please, avoid to reply our messages with entire heads. > I don't like to see my email along these. Then unsubscribe. Before subscribing and posting to any mailing list, you should read the rules and regulations of the list. Had you done so

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
PJ wrote: > Jim Lucas wrote: >> PJ wrote: >>> haliphax wrote: On Fri, Mar 13, 2009 at 1:24 PM, PJ wrote: > Jim Lucas wrote: >> PJ wrote: >>> am resending as this was erroneously ccd to mysql. sorry! >>> >>> Ashley Sheridan wrote: On Thu, 2009-02-26 at 11:27 -0500,

[PHP] strcmp() versus ==

2009-03-16 Thread Paul M Foster
I had never completely read over the rules with regard to comparisons in PHP, and was recently alarmed to find that $str1 == $str2 might not compare the way I thought they would. Is it common practice among PHP coders to use strcmp() instead of == in making string comparisons? Or am I missing/misre

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread Paul M Foster
On Mon, Mar 16, 2009 at 03:46:29PM -0500, PJ wrote: > >> $book_publisher = array(); > >> $SQL = "SELECT id, bookID, publisher_id FROM book_publisher"; > >> if ( ( $results = mysql_query($SQL, $db) ) !== false ) { > >> while ( $row = mysql_fetch_assoc($results) ) { > >> $book_publisher[$row['book

[PHP] Re: strcmp() versus ==

2009-03-16 Thread Shawn McKenzie
Paul M Foster wrote: > I had never completely read over the rules with regard to comparisons in > PHP, and was recently alarmed to find that $str1 == $str2 might not > compare the way I thought they would. Is it common practice among PHP > coders to use strcmp() instead of == in making string compa

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
Paul M Foster wrote: > On Mon, Mar 16, 2009 at 03:46:29PM -0500, PJ wrote: > > > > $book_publisher = array(); $SQL = "SELECT id, bookID, publisher_id FROM book_publisher"; if ( ( $results = mysql_query($SQL, $db) ) !== false ) { while ( $row = mysql_fetch_assoc($results) ) {

[PHP] Re: strcmp() versus ==

2009-03-16 Thread Shawn McKenzie
Shawn McKenzie wrote: > Paul M Foster wrote: >> I had never completely read over the rules with regard to comparisons in >> PHP, and was recently alarmed to find that $str1 == $str2 might not >> compare the way I thought they would. Is it common practice among PHP >> coders to use strcmp() instead

[PHP] Studying IF statements

2009-03-16 Thread Gary
Reading a book on php/mysql (Head First) and the following code is not working, athough I am pretty sure I have it as they say to. Trying to kill a sendmail script if I forget to enter a subject or text in body of email. I am getting the echo, but it is still sending the emails out. What am I

[PHP] Re: Summary Report With Details - Newbie Question

2009-03-16 Thread revDAVE
On 3/14/2009 5:13 PM, "Christian Wagner" wrote: > Hi, > I would select all items with a single select. >> SELECT name,model, condition (etc) FROM inventory > > Then i'll iterate through the resultset and store them in an array like this > > $items = array(); > while($row = next()) > { > //

[PHP] Re: Studying IF statements

2009-03-16 Thread Shawn McKenzie
Gary wrote: > Reading a book on php/mysql (Head First) and the following code is not > working, athough I am pretty sure I have it as they say to. Trying to kill a > sendmail script if I forget to enter a subject or text in body of email. I > am getting the echo, but it is still sending the ema

Re: [PHP] Summary Report With Details - Newbie Question

2009-03-16 Thread revDAVE
On 3/14/2009 9:31 PM, "Paul M Foster" wrote: > > I'm not an expert, but the way I normally do something like this is with > a join that would give name, model and condition on each row (so you > have a lot of duplicate fields which are the same for a series of > records). I make sure they're ord

[PHP] Re: Studying IF statements

2009-03-16 Thread Gary
Shawn Thanks for your reply. Some of what you are saying is a little ahead of my lessons, but let me address as best I can. The script worked fine in the previous lesson where I was to send emails from my DB, this lesson is to kill the email from being sent if empty. > On your very first line

[PHP] Re: [PHP-DB] SQL for counting comments - is this smart?

2009-03-16 Thread Martin Zvarík
Chris napsal(a): Martin Zvarík wrote: Is it smart to use all of this on one page? Or should I rather do one SQL and let PHP count it? $q = $DB->q("SELECT COUNT(*) FROM comments"); $int_total = $DB->frow($q); $q = $DB->q("SELECT COUNT(*) FROM comments WHERE approved IS NULL"); $int_waiting = $

[PHP] Re: Studying IF statements

2009-03-16 Thread Shawn McKenzie
Gary wrote: > Shawn > > Thanks for your reply. Some of what you are saying is a little ahead of my > lessons, but let me address as best I can. The script worked fine in the > previous lesson where I was to send emails from my DB, this lesson is to > kill the email from being sent if empty. >

[PHP] Re: Studying IF statements

2009-03-16 Thread Gary
That workedthats much for all your help.. Gary "Shawn McKenzie" wrote in message news:94.66.22219.71ffe...@pb1.pair.com... > Gary wrote: >> Shawn >> >> Thanks for your reply. Some of what you are saying is a little ahead of >> my >> lessons, but let me address as best I can. The script w

[PHP] Re: Studying IF statements

2009-03-16 Thread Shawn McKenzie
Shawn McKenzie wrote: > Gary wrote: >> Shawn >> >> Thanks for your reply. Some of what you are saying is a little ahead of my >> lessons, but let me address as best I can. The script worked fine in the >> previous lesson where I was to send emails from my DB, this lesson is to >> kill the email

Re: [PHP] Summary Report With Details - Newbie Question

2009-03-16 Thread Paul M Foster
On Mon, Mar 16, 2009 at 05:57:13PM -0700, revDAVE wrote: > On 3/14/2009 9:31 PM, "Paul M Foster" wrote: > > > > > I'm not an expert, but the way I normally do something like this is with > > a join that would give name, model and condition on each row (so you > > have a lot of duplicate fields w

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread Paul M Foster
On Mon, Mar 16, 2009 at 06:05:33PM -0500, PJ wrote: > Paul M Foster wrote: > Thanks Paul for the explanation. It really does help and iis much > appreciated. > > I must respond to your chastisement of me, because i believe you may not > be aware of the fact that most books on programming reall

Re: [PHP] Summary Report With Details - Newbie Question

2009-03-16 Thread revDAVE
On 3/16/2009 7:17 PM, "Paul M Foster" wrote: > Well, I was dubious about my answer, based on the idea that someone else > might have a better way. However, it appears not. > > So what I would do is probably, instead of echoing stuff immediately, > I'd just append it to a string until you're read

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

2009-03-16 Thread mike
http://www.redmine.org/ Looks pretty useful; I want one in PHP though. Anyone? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
Paul M Foster wrote: > On Mon, Mar 16, 2009 at 06:05:33PM -0500, PJ wrote: > >> Paul M Foster wrote: > > > >> Thanks Paul for the explanation. It really does help and iis much >> appreciated. >> >> I must respond to your chastisement of me, because i believe you may not >> be aware of the fact tha

Re: [PHP] Fork and zombies

2009-03-16 Thread Waynn Lue
> > >> > While this works, it unfortunately leaves behind a zombie process > >> > every single time. > >> > >> You need to call pcntl_wait() or pcntl_waitpid(). > >> > > > > Right, but if I do that, then the parent has to wait until the child > > completes before it exits. > > No it doesn't - just

Re: [PHP] Re: strcmp() versus ==

2009-03-16 Thread Alpár Török
2009/3/17 Shawn McKenzie : > Shawn McKenzie wrote: >> Paul M Foster wrote: >>> I had never completely read over the rules with regard to comparisons in >>> PHP, and was recently alarmed to find that $str1 == $str2 might not >>> compare the way I thought they would. Is it common practice among PHP >