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 8
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 natur
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
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 r
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 itsel
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 an
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
> att
René Fournier wrote:
FWIW, here's the stripped-down skeleton of the server:
As always, constructive criticism is very welcome.
$master[] = $socket;
$read = $master;
$write = $master;
while (1) {
$read = $master;
$write = $master;
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 ??
he
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.
>
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
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
first, create "dealxml.php" with ansi charset :
ked
tickcenter
train
back
1197026188_ec76
KO
500
Internal Server Error
XML;
$xml = new DOMDocument();
//$xml->validateOnParse = true;
$xml->loadXML( $r );
$customer_id = $xml->getElementsByTagName( 'customerID' )->item( 0
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 w
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
> w
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 versio
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 i
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: http://www.php.net
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
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 <[E
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 conn
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 ma
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 se
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 l
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 c
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
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 incomi
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
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->db
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]
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 S
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 - http://www.swar
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 st
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.
[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
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'
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 (http
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
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 r
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 databa
[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 w
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
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 nu
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
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 Distribut
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
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 ca
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 reg
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 -0
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 cod
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
co
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 wit
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 you
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
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:
>
>
>
> 1197026188_ec76
> KO
> 500
> Internal Server Error
>
>
have you been testing this in the context of your application, or have you
also
I've checked $request previously and is not empty... it has something like:
1197026188_ec76
KO
500
Internal Server Error
The curious thing is that I've built this xml string with DOMDocument in
my request... Then I suppose my Linux system has DOM support,
Nathan Nobbe escribió:
On Dec
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 t
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 a
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
'.mysql_error()."\n");
} else {
$db_conn = mysql
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 );
>
> Obviou
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
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 mysqli,
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 avai
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 o
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 t
> -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 my
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 exi
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
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 mach
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 does
70 matches
Mail list logo