php-general Digest 10 Dec 2007 10:53:26 -0000 Issue 5173

2007-12-10 Thread php-general-digest-help
php-general Digest 10 Dec 2007 10:53:26 - Issue 5173 Topics (messages 265593 through 265599): Re: build a multi chat server with php 265593 by: Børge Holen Re: proc_open fclose streams.. 265594 by: Chris Shipping Address on Paypal 265595 by: Javed Chauhan

[PHP] Mysqli support - test or complain?

2007-12-10 Thread Dave M G
PHP List, Based on what seemed to be good advice to switch to using mysqli for interacting with a MySQL database, I built a content management system that uses mysqli for all it's calls. It works great on a lot of my servers. However, I just discovered that one web hosting service I use

[PHP] LoadXML trouble

2007-12-10 Thread Dani Castaños
Hi list! I have a problem with DOMDocument loadXML method. I used Windows to develop my applications, and nothing happens on it when i do something like $xml = new DOMDocument(); $xml-loadXML( $request ); Obviously, request is not empty... But when I have upload this code to production

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Per Jessen
Dave M G wrote: One is based on the assumption that mysqli is as likely not to be available as it is to be installed. In this case I should write my scripts to test whether it exists and then use either mysqli or straight mysql commands as appropriate. If this is the way to go, what do I do

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Richard Heyes
One is based on the assumption that mysqli is as likely not to be available as it is to be installed. In this case I should write my scripts to test whether it exists and then use either mysqli or straight mysql commands as appropriate. If this is the way to go, what do I do to test for the

RE: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Andrés Robinet
-Original Message- From: Per Jessen [mailto:[EMAIL PROTECTED] Dave M G wrote: One is based on the assumption that mysqli is as likely not to be available as it is to be installed. In this case I should write my scripts to test whether it exists and then use either mysqli or

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Dave M G
Richard, Per, Andres, Thank you for responding. If it were entirely my web site to dictate what to do with, I would just switch for a server that has mysqli available to me. However, in this one case, the web site is owned by a small, not very profitable group that has reasons to stay with

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Zoltán Németh
2007. 12. 10, hétfő keltezéssel 21.58-kor Dave M G ezt írta: Richard, Per, Andres, Thank you for responding. If it were entirely my web site to dictate what to do with, I would just switch for a server that has mysqli available to me. However, in this one case, the web site is owned by

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Per Jessen
Dave M G wrote: Richard said: Alter your program to support both - use mysqi if it's avilable, mysql if it's not. How exactly do I test for the presence of mysqli from within a script? Or are you saying I have two different versions of my script? I think you can test for the

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Richard Heyes
How exactly do I test for the presence of mysqli from within a script? IIRC there's a function called extension_loaded(). Or something similar. Or are you saying I have two different versions of my script? Not at all. Taking PEAR::DB for example, you could test for the existence of

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Per Jessen
Richard Heyes wrote: another. This is one of the reasons abstraction layers exist. Which brings us to alternative #3 - odbc. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] LoadXML trouble

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 4:48 AM, Dani Castaños [EMAIL PROTECTED] wrote: Hi list! I have a problem with DOMDocument loadXML method. I used Windows to develop my applications, and nothing happens on it when i do something like $xml = new DOMDocument(); $xml-loadXML( $request ); Obviously, request

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 3:16 AM, Dave M G [EMAIL PROTECTED] wrote: Which assumption should I be proceeding with? Rather than assume (because we all know what happens then), why not build for both scenarios? Here's an example of one way ? // inc/include_files.php # # Includes all files

Re: [PHP] Shipping Address on Paypal

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 1:56 AM, Chris [EMAIL PROTECTED] wrote: Javed Chauhan wrote: [snip!] So please help us to send the shipping address to the paypal so our merchant can see the shipping address in order detail page with other details. If any code please post it will be help to us and also to

Re: [PHP] build a multi chat server with php

2007-12-10 Thread Daniel Brown
On Dec 9, 2007 6:11 PM, Børge Holen [EMAIL PROTECTED] wrote: On Sunday 09 December 2007 23:46:44 Jochem Maas wrote: Nathan Rixham wrote: Anybody up for (or indeed see a need for) a multi threaded php daemonised jabber client? Looks like an interesting challenge! u know the old saying,

Re: [PHP] LoadXML trouble

2007-12-10 Thread Dani Castaños
I've checked $request previously and is not empty... it has something like: ?xml version=1.0? response ticketID1197026188_ec76/ticketID statusKO/status errCode500/errCode errMsgInternal Server Error/errMsg /response The curious thing is that I've built this xml string with DOMDocument in

Re: [PHP] LoadXML trouble

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 11:40 AM, Dani Castaños [EMAIL PROTECTED] wrote: I've checked $request previously and is not empty... it has something like: ?xml version=1.0? response ticketID1197026188_ec76/ticketID statusKO/status errCode500/errCode errMsgInternal Server Error/errMsg /response

Re: [PHP] LoadXML trouble

2007-12-10 Thread Dani Castaños
Yep, it works when i do saveXML, but not on loadXML step... The thing is... i'm trying to do something like this: $request = $_POST['xml']; $logger-debug( 'New ticket request' ); /** * Parse XML request to obtain values */ $xml = new DOMDocument(); //$xml-validateOnParse = true; $xml-loadXML(

Re: [PHP] LoadXML trouble

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 12:08 PM, Dani Castaños [EMAIL PROTECTED] wrote: Yep, it works when i do saveXML, but not on loadXML step... did the loadXML() method work in the test script i sent over in my last post? if it does then something else is going on when loadXML() is called in the context of your

[PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread AmirBehzad Eslami
Dear list, For some computer-based simulation, i need to generate random numbers that have a normal distribution. It seems that PHP's rand() and mt_rand() functions return uniformly distributed numbers which is not suitable for simulation purposes. Is there any way to generate random numbers

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Stephen Johnson
True randomization is only really possible in nature, so I am not sure you ever be completely happy with programming random numbers... But it may help you get better results if you include srand() in your randomization code. -- Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 2:37 PM, Stephen Johnson [EMAIL PROTECTED] wrote: True randomization is only really possible in nature, so I am not sure you ever be completely happy with programming random numbers... But it may help you get better results if you include srand() in your randomization code.

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Stephen Johnson
LOL.. Guess I need to keep up with the change log a little better... -- Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com continuing the struggle against bad code http://www.thumbnailresume.com -- From: Nathan Nobbe [EMAIL PROTECTED] Date: Mon, 10 Dec 2007 14:40:36 -0500

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread bruce
if you really want to.. you can hook various devices up to your serial/parallel port and take specific readings, and from there compute some really great random numbers.. i think white noise from frequency generators/scopes have been used by research functions... google is your friend in this

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 11:37 -0800, Stephen Johnson wrote: True randomization is only really possible in nature. Can you say for certain nature is truly random? Just because the seed may have occurred 13.7 billion years ago and we don't know what that initial state was and we couldn't possibly

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 2:28 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: Dear list, For some computer-based simulation, i need to generate random numbers that have a normal distribution. It seems that PHP's rand() and mt_rand() functions return uniformly distributed numbers which is not

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread bruce
stop... trying to make people think bad... bad!!! -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, December 10, 2007 11:47 AM To: Stephen Johnson Cc: AmirBehzad Eslami; PHP General list Subject: Re: [PHP] Generating Random Numbers with Normal

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Stephen Johnson
Wow... You clearly put a lot of thought into randomization... I am impressed..LOL Personally, most of my web applications do not have to factor 13.7 billion years of space drift in to the calculations, so php's rand function has been great for me... ;) -- Stephen Johnson c | eh The Lone Coder

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 2:28 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: For some computer-based simulation, i need to generate random numbers that have a normal distribution. [snip!] Unfortunately, because computers are logical, there's no such thing (at least as of yet) as a truly random

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 3:04 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Dec 10, 2007 2:28 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: For some computer-based simulation, i need to generate random numbers that have a normal distribution. [snip!] Unfortunately, because computers are

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Jay Blanchard
[snip] Can you say for certain nature is truly random? Just because the seed may have occurred 13.7 billion years ago and we don't know what that initial state was and we couldn't possibly calculate all the interactions since, doesn't mean that everything since hasn't been happening in accordance

[PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
Hello, I have a command-line PHP script--called Listener--that is designed to run indefinitely with a predictable CPU usage and memory footprint. In a nutshell, it's a multi-client socket server that waits for incoming connections, processes incoming data, stores results in a MySQL

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Jim Lucas
René Fournier wrote: Hello, I have a command-line PHP script--called Listener--that is designed to run indefinitely with a predictable CPU usage and memory footprint. In a nutshell, it's a multi-client socket server that waits for incoming connections, processes incoming data, stores

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 2:28 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: Dear list, For some computer-based simulation, i need to generate random numbers that have a normal distribution. It seems that PHP's rand() and mt_rand() functions return uniformly distributed numbers which is not suitable

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Per Jessen
bruce wrote: if you really want to.. you can hook various devices up to your serial/parallel port and take specific readings, and from there compute some really great random numbers.. That's pretty much what /dev/random does for you. /Per Jessen, Zürich -- PHP General Mailing List

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 14:22 -0600, Jay Blanchard wrote: [snip] Can you say for certain nature is truly random? Just because the seed may have occurred 13.7 billion years ago and we don't know what that initial state was and we couldn't possibly calculate all the interactions since, doesn't

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Jay Blanchard
[snip] Without order there cannot be randomness. But is the reverse true? [/snip] Yes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
Hi Jim, I have a server that listens like yours does. I get 80k - 85k connections a day to it. When I first started it, I was only getting about 3k of connections aday. Then I upped the listening pattern and it tanked. I noticed that all my mail/web/db connections just sat there.

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 5:29 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-12-10 at 14:22 -0600, Jay Blanchard wrote: [snip] Can you say for certain nature is truly random? Just because the seed may have occurred 13.7 billion years ago and we don't know what that initial state was

RE: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 16:32 -0600, Jay Blanchard wrote: [snip] Without order there cannot be randomness. But is the reverse true? [/snip] But disorder isn't necessarily random. Cheers, Rob. -- ... SwarmBuy.com -

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 5:39 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-12-10 at 16:32 -0600, Jay Blanchard wrote: [snip] Without order there cannot be randomness. But is the reverse true? [/snip] But disorder isn't necessarily random. Unless you get into Shannon entropy,

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 17:45 -0500, Daniel Brown wrote: On Dec 10, 2007 5:39 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-12-10 at 16:32 -0600, Jay Blanchard wrote: [snip] Without order there cannot be randomness. But is the reverse true? [/snip] But disorder

[PHP] Advice with some code

2007-12-10 Thread Steve Finkelstein
Hi all, I'm having a brain freeze with some simple code that I wrote and now trying to refactor. I have a block of code that looks like this: public function backup() { $fname = $this-dbName.sql.$this-zip; $this-cmd = mysqldump -Q -u $this-dbUser -p$this-dbPass

Re: [PHP] Advice with some code

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 18:25 -0500, Steve Finkelstein wrote: Hi all, I'm having a brain freeze with some simple code that I wrote and now trying to refactor. I have a block of code that looks like this: public function backup() { $fname = $this-dbName.sql.$this-zip;

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Tom Rogers
Hi, Tuesday, December 11, 2007, 6:42:18 AM, you wrote: RF Hello, RF I have a command-line PHP script--called Listener--that is designed RF to run indefinitely with a predictable CPU usage and memory RF footprint. In a nutshell, it's a multi-client socket server that RF waits for incoming

Re: [PHP] Advice with some code

2007-12-10 Thread Jochem Maas
Steve Finkelstein wrote: Hi all, I'm having a brain freeze with some simple code that I wrote and now trying to refactor. I have a block of code that looks like this: public function backup() public function backup($errors) { $fname = $this-dbName.sql.$this-zip;

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
On 10-Dec-07, at 4:42 PM, Tom Rogers wrote: Put a usleep(1000) in the listen while() loop and give the cpu a break. Good advice, but I've already been doing that. The thing is, when the script first starts up, the CPU rarely exceeds 30%, even when many clients (200+) are simultaneously

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Chris
Per Jessen wrote: Richard Heyes wrote: another. This is one of the reasons abstraction layers exist. Which brings us to alternative #3 - odbc. That's probably less likely to be available than mysqli. If you're targetting php5 then you could use pdo::mysql as well (and there's even the

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Jim Lucas
Tom Rogers wrote: Hi, Tuesday, December 11, 2007, 6:42:18 AM, you wrote: RF Hello, Put a usleep(1000) in the listen while() loop and give the cpu a break. This makes me think about asking if you have to short of a timeout on your receiving connection? What are you using to setup your

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Jochem Maas
Jim Lucas wrote: Tom Rogers wrote: Hi, ... Also, make sure you are not using an array that you are not re-initializing through each iteration of the loop. If the array keeps getting bigger, PHP might $*% on itself. Always re-initialize arrays to clean them up. even then he may still

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread René Fournier
On 10-Dec-07, at 5:20 PM, Jim Lucas wrote: Tom Rogers wrote: Hi, Tuesday, December 11, 2007, 6:42:18 AM, you wrote: RF Hello, Put a usleep(1000) in the listen while() loop and give the cpu a break. This makes me think about asking if you have to short of a timeout on your receiving

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Jochem Maas
Rob your sick ;-) this thread made me think about the Observer Effect - probably the randomness is just in your/my/his/her head :-P or we're all green men or something. Robert Cummings wrote: On Mon, 2007-12-10 at 17:45 -0500, Daniel Brown wrote: On Dec 10, 2007 5:39 PM, Robert Cummings

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Jochem Maas
Jochem Maas wrote: Jim Lucas wrote: Tom Rogers wrote: Hi, ... Also, make sure you are not using an array that you are not re-initializing through each iteration of the loop. If the array keeps getting bigger, PHP might $*% on itself. Always re-initialize arrays to clean them up.

[PHP] Heritage web solutions

2007-12-10 Thread Steve Finkelstein
Hi everyone, I was curious if anyone has had the opportunity to work with or for heritage web solutions? If so, would you be able to share your two cents with any experience with them? Thanks! - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Larry Garfield
On Monday 10 December 2007, Dave M G wrote: One is based on the assumption that mysqli is as likely not to be available as it is to be installed. In this case I should write my scripts to test whether it exists and then use either mysqli or straight mysql commands as appropriate. If this is

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Richard Lynch
On Mon, December 10, 2007 1:37 pm, Stephen Johnson wrote: ever be completely happy with programming random numbers... But it may help you get better results if you include srand() in your randomization code. srand and mt_srand have been no-ops (done internally once at startup) since version

Re: [PHP] Incorporating a PHP/MySQL based search

2007-12-10 Thread Richard Lynch
On Sat, December 8, 2007 4:36 pm, Steve Finkelstein wrote: One area I lack experience in is writting a solution to index/search on a site. Would anyone be kind enough and point me in the right direction as far as any books which discuss some simple solutions or articles/blogs on the web?

Re: [PHP] build a multi chat server with php

2007-12-10 Thread Richard Lynch
On Sat, December 8, 2007 2:59 am, abderrazzak nejeoui wrote: i want build a multi chat server based in php. Okay. 1- is that possible Yes. 2- if yes can you instruct me how to bigin Step 1: http://php.net/sockets BIG PICTURE: You MIGHT want to consider taking a well-supported MUD or

RE: [PHP] LoadXML trouble

2007-12-10 Thread ked
first, create dealxml.php with ansi charset : ?php $r = XML ?xml version=1.0? response customerIDked/customerID appNametickcenter/appName ticketTypetrain/ticketType ticketActionback/ticketAction ticketID1197026188_ec76/ticketID statusKO/status errCode500/errCode

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread Nathan Nobbe
On Dec 10, 2007 5:56 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-12-10 at 17:45 -0500, Daniel Brown wrote: On Dec 10, 2007 5:39 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-12-10 at 16:32 -0600, Jay Blanchard wrote: [snip] Without order there cannot be

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-10 Thread Dave M G
Zoltan, Per, Richard, Chris, Daniel, Larry, Thank you for responding. I have created a method in the class that handles my database connections that will first test on extension_loaded(mysqli) before connecting to the database. Then I store the result in a session variable for reference, so

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-10 Thread Robert Cummings
On Tue, 2007-12-11 at 13:02 +0900, Dave M G wrote: Zoltan, Per, Richard, Chris, Daniel, Larry, Thank you for responding. I have created a method in the class that handles my database connections that will first test on extension_loaded(mysqli) before connecting to the database. Then

[PHP] Help Sending Mail

2007-12-10 Thread Me2resh Lists
Dear All, i wrote this class below to send Mail. but when i use it. i get the sender No Body. and from the address of the server, not the From address that i specify. and the MIME Headers as text in the message itself. and the attachment is pasted as binary text also. can anyone help please ??

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Jim Lucas
René Fournier wrote: FWIW, here's the stripped-down skeleton of the server: As always, constructive criticism is very welcome. ?php $socket = stream_socket_server(tcp://127.0.0.1:9876, $errno, $errstr); if ($socket) { $master[] = $socket; $read = $master; $write = $master;

Re: [PHP] Help Sending Mail

2007-12-10 Thread Robert Cummings
On Tue, 2007-12-11 at 06:33 +0200, Me2resh Lists wrote: Dear All, i wrote this class below to send Mail. but when i use it. i get the sender No Body. and from the address of the server, not the From address that i specify. and the MIME Headers as text in the message itself. and the

Re: [PHP] Help Sending Mail

2007-12-10 Thread Jim Lucas
Me2resh Lists wrote: Dear All, i wrote this class below to send Mail. but when i use it. i get the sender No Body. and from the address of the server, not the From address that i specify. and the MIME Headers as text in the message itself. and the attachment is pasted as binary text also. can

Re: [PHP] Help Sending Mail

2007-12-10 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-12-11 at 06:33 +0200, Me2resh Lists wrote: Dear All, i wrote this class below to send Mail. but when i use it. i get the sender No Body. and from the address of the server, not the From address that i specify. and the MIME Headers as text in the message

Re[2]: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread Tom Rogers
Hi, Tuesday, December 11, 2007, 10:01:38 AM, you wrote: RF On 10-Dec-07, at 4:42 PM, Tom Rogers wrote: Put a usleep(1000) in the listen while() loop and give the cpu a break. RF Good advice, but I've already been doing that. The thing is, when the RF script first starts up, the CPU rarely

Re: [PHP] Help Sending Mail

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 21:05 -0800, Jim Lucas wrote: Robert Cummings wrote: On Tue, 2007-12-11 at 06:33 +0200, Me2resh Lists wrote: Dear All, i wrote this class below to send Mail. but when i use it. i get the sender No Body. and from the address of the server, not the From address that

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread M5
Thanks Jim. Several good points here that I will look into. I've already moved the include() bits into function calls. (That's simple thing I should have corrected long ago.) The socket areas though I'm less sure about how to adjust, since networking programming isn't something I grok

Re: Re[2]: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-10 Thread M5
Curiously, would you agree with this guy's comments concerning low- level PHP socket functions vs stream_socket_server() ? If you want a high speed socket server, use the low-level sockets instead (socket_create/bind/listen). The stream_socket_server version appears to have internal fixed