Re: [PHP] what is the point of prepare?

2007-10-29 Thread Per Jessen
- by preparing sql statements, you save on the parsing and the network traffic. Unless you're doing lots of database transactions per second, I doubt if you'll notice it. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] moving over to php 5

2007-10-29 Thread Per Jessen
of the year so hosts will be forced to make the upgrade at some point. What will force them to do so? Lack of support is unlikely to have any effect. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] moving over to php 5

2007-10-29 Thread Per Jessen
or the differences in price are absolutely minor. I don't see a reason to stay with one that only supports php4. Nobody suggested that you do - especially if you need PHP5. If however you don't have a specific requirement for PHP5, why would you move? /Per Jessen, Zürich -- PHP General Mailing

Re: [PHP] moving over to php 5

2007-10-30 Thread Per Jessen
Larry Garfield wrote: On Monday 29 October 2007, Per Jessen wrote: Cristian Vrabie wrote: Hmm 117,223 hosts with php4 only support. Did you actually checked how many have php5 support? Many more. There are 178.112 hosters that have PHP5 support. I checked. Where and how did you check

Re: [PHP] moving over to php 5

2007-10-30 Thread Per Jessen
something being more standard and more secure, then he'll change. If you want to force someone to change, you remove the interface (after having marked it deprecated for a while). /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] PHP installation

2007-10-30 Thread Per Jessen
Richard Heyes wrote: The following is in config.log: configure:20028: checking whether libxml build works configure:20055: gcc -o conftest -g -O2 conftest.c -lresolv -lm -ldl -lnsl -lxml2 -lz -lm 15 /usr/bin/ld: cannot find -lz Looks like you need to install libz. /Per

Re: [PHP] moving over to php 5

2007-10-30 Thread Per Jessen
Larry Garfield wrote: The sooner you convince new PHP programmers to do things in a naturally more secure way, the fewer bugs they will accidentally introduce later. And how do you go about convincing them? That's still the key question. /Per Jessen, Zürich -- PHP General Mailing List

Re: [PHP] PHP installation

2007-10-30 Thread Per Jessen
is in the right place, but check your symlinks. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail function doesn't work

2007-11-05 Thread Per Jessen
Alberto García Gómez wrote: What could happen that my mail function isn't working. I check twice my php.ini conf and it's fine. I test sendmail manually and it's OK. I also try to send mails with sendmail stoped and started and nothing happen Does your mail-server otherwise work? /Per

Re: [PHP] Memory Allocation Error

2007-11-06 Thread Per Jessen
upgraded to PHP 5. Any ideas? If you need to keep a 120Mb file in core at any point in time, you'll need the memory. Either adjust the memory-limit, or change your code to process the file in chunks/lines/bytes. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net

Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread Per Jessen
if the uncompressed data is more than the optional parameter length. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
script, then append '' to detach when you start it. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php 4.4.7 configure and sablotron version issue

2007-11-06 Thread Per Jessen
to migrate anyway. We did. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Chinese input character count

2007-11-06 Thread Per Jessen
with a sequence of #; I could then count the numbers of # and had the amount of Chinese characters. What do you mean by type in a form directly ? I also use UTF8, and when I store data from a form, they are in UTF8 in my database. /Per Jessen, Zürich -- PHP General Mailing List (http

Re: [PHP] Performance of PHP

2007-11-06 Thread Per Jessen
Merlin wrote: Hi there, I am doing some image cropping of about 40.000 files with php. If you're worried about performance, maybe why not use mogrify from ImageMagick? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
Jim Lucas wrote: This method will work until you log out, when you log out all your background processes are killed. man nohup. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Allowed path in VHosts

2007-11-06 Thread Per Jessen
Alberto García Gómez wrote: Is there some directive that configure a vistual host to only see inside a path eg.: /var/www/users/user1 An apache virtual host will normally not look outside its DocumentRoot, but you can allow it do so. /Per Jessen, Zürich -- PHP General Mailing List (http

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
would tend to agree with you, but PHP has been made to do a lot of things it was never really designed for. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
Robert Cummings wrote: On Tue, 2007-11-06 at 19:33 +0100, Per Jessen wrote: Jason Pruim wrote: Actually, what you are looking for is an eggdrop bot which is written in TCL. PHP in my humble opinion was not designed to handle something like that as it requires realtime processing

Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread Per Jessen
in one format by Python that cannot be uncompressed by PHP because it expects another format? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] gzuncompress() Not Working.

2007-11-07 Thread Per Jessen
dig a little deeper. I would positively hate having that kind of crud in my production code. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Per Jessen
Brad wrote: In the code, I can see where to widen the table. One would think that php would fill the dead space if the is nothing blocking it. But it is not. Like Jochem already said, your question is probably best asked on an html mailing list. It's not really a PHP issue. /Per Jessen

Re: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Per Jessen
a bit, then perhaps ask the question again. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] gzuncompress() Not Working.

2007-11-07 Thread Per Jessen
would have thought they both used the same zlib. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] html parsing

2007-11-08 Thread Per Jessen
to parse it in php myself OR convince the apache server to parse it for me. Absolutely. Why are you parsing it yourself anyway - what value are you adding? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Image manipulation on the fly

2007-11-08 Thread Per Jessen
-intensive stuff in an interpreted language - it'll never be efficient unless you write it in C or similar. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP editor

2007-11-11 Thread Per Jessen
Frank Lopes wrote: Being very new to PHP (empahsis on VERY...), I wonder what most of you use to develop in PHP? Personally I use vi or kate. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Creating ZIP-File with password

2007-11-12 Thread Per Jessen
and the '-P' option. However, the zip password mechanism does not really provide much in terms of protection - if you really need the encryption, I would look elsewhere. (PGP, X509). /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] CLI spinner processing

2007-11-14 Thread Per Jessen
some three billion per second. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Segfault strangeness

2007-11-14 Thread Per Jessen
changed on this system? Thanks for any input that anyone may have as this one is stumping me at the moment. The only possibility that I can even remotely think of is that Ubuntu started bundling AppArmour and that is playing a role. You've changed the system completely? /Per Jessen, Zürich

Re: [PHP] Segfault strangeness

2007-11-14 Thread Per Jessen
back whatever updates you've ap0plied to PHP? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] CLI spinner processing

2007-11-15 Thread Per Jessen
really seriously about performance and optimization :-) Still, your thinking is good. (nice domain name btw. :) ) Thanks - it's not mine though, belongs to the IEEE. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I need help handling form posting

2007-11-15 Thread Per Jessen
Jon Westcot wrote: Is there a way that I can intercept the click of the Upload button, have it update a field (probably a hidden one) with a date/time stamp, and then have that value included in the $_POSTed values? Sure, javascript is the answer. /Per Jessen, Zürich -- PHP

Re: [PHP] I need help handling form posting

2007-11-15 Thread Per Jessen
Per Jessen wrote: Jon Westcot wrote: Is there a way that I can intercept the click of the Upload button, have it update a field (probably a hidden one) with a date/time stamp, and then have that value included in the $_POSTed values? Sure, javascript is the answer. pseudocode

Re: [PHP] I need help handling form posting

2007-11-15 Thread Per Jessen
from the local machine is probably the best choice. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How does the PHP website colorize the code snippets?

2007-11-15 Thread Per Jessen
) or a single (escaped double qoute, i.e. syntax error)? The syntax colouring shouldn't change the code, only the colours. BTW, your site doesn't react well to navigation by keyboard. I picked Code, then Snippets, then tried Alt-CursorLeft. /Per Jessen, Zürich -- PHP General Mailing List (http

RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Per Jessen
; $headers .= Content-Type: text/html; charset=iso-8859-1.$eol; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n; You have a MIME boundary where it doesn't belong. MIME boundaries are for the body, not the header. /Per Jessen

Re: [PHP] Semi-newbie Question .... streams ...

2007-11-15 Thread Per Jessen
here print $txt; ? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Per Jessen
; $headers .= Content-Transfer-Encoding: 8bit.$eol; $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n; mail($email, $subject, $body, $headers); /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Cannot send a hyperlink (resent)

2007-11-15 Thread Per Jessen
; $headers .= Content-Transfer-Encoding: 8bit.$eol; $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n; mail($email, $subject, $body, $headers); /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How does the PHP website colorize the code snippets?

2007-11-15 Thread Per Jessen
Daevid Vincent wrote: I want to put a code snippet section on my site and want to colorize them like the user comments on any PHP site page. http://www.php.net/manual/en/language.operators.arithmetic.php What's the easiest way to do that? php -s yourcode.php /Per Jessen, Zürich -- PHP

Re: [PHP] Converting user input for XML-validation

2007-11-16 Thread Per Jessen
Ralph Kutschera wrote: Is there a standard function in PHP to convert any string for usage with XML? In the example the string should become lt; thats a bracket. You could just use CDATA in XML, but otherwise you might want to look at html_entities(). /Per Jessen, Zürich -- PHP General

Re: [PHP] Semi-newbie Question .... streams ...

2007-11-16 Thread Per Jessen
will do fine. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CURL efficiency?

2007-11-16 Thread Per Jessen
. through /backend/ - I'm not sure how well that would fit into your current setup, though. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Cannot send a hyperlink (resent)

2007-11-16 Thread Per Jessen
the added value? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cannot send a hyperlink (resent)

2007-11-16 Thread Per Jessen
. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] bank query and curl

2007-11-18 Thread Per Jessen
. Could it be that I try to use if a customer has paid? WHY would that be wrong? That would be perfectly alright - in fact, my bank offers a transaction list for download for just that purpose. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

RE: [PHP] two small issues with php mail

2007-11-19 Thread Per Jessen
:. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Yes, here we go again! (was: two small issues with php mail)

2007-11-20 Thread Per Jessen
to learn some netiquette. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: FW: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
Brad wrote: Thought it was a support forum! Support usually does not mean piss off. Brad, another reading suggestion for you: http://www.catb.org/~esr/faqs/smart-questions.html /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
Jim Lucas wrote: remember, he is wanting to setup SMTP auth. So he will not be using PHP's mail() function. He needs to talk directly to the SMTP server. Uh, I guess I must've missed that bit. Seems a tad complicated for sending an email ... /Per Jessen, Zürich -- PHP General Mailing

RE: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
just send your email twice: mail( to-addr, subject, message, headers); mail( bcc-addr, subject, message, headers); /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
Andrés Robinet wrote: It can't be that hard to send out a list of emails with CC / Bcc headers!!! You wouldn't have thought so, but ... /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
the email-text and pipe it to sendmail -oi. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
Brad wrote: Where should the bcc go if not the header? In PHP the mail() function does indeed appear to support a bcc: header, but I'm assuming it will be removed before the email is passed to sendmail. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] two small issues with php mail

2007-11-20 Thread Per Jessen
Stut wrote: Børge Holen wrote: OMG the top posting on this freakin' issue is a headache Whereas removing all of the previous message is like a sensual massage. Pure stress-relief. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] getenv ... i think

2007-11-22 Thread Per Jessen
Steven Macintyre wrote: If i take OUT the getenv if then, it works ... so i know that is where the problem is. I didnt bother with reading all your code, but maybe you should use $_SERVER['REMOTE_HOST'] instead of the getenv() call ? /Per Jessen, Zürich -- PHP General Mailing List (http

Re: [PHP] Code Critique Please :)

2007-11-22 Thread Per Jessen
? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing XML with DTD

2007-11-22 Thread Per Jessen
possible. You don't actually need to DTD to parse it, but it does help with the syntax-check of the contents. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP RFC # 0001 --- List Etiquette

2007-11-28 Thread Per Jessen
[EMAIL PROTECTED] wrote: Wouldn't this be solved if the email is simply an answer to the thread instead of a new, separate email? Yes it would. Any other suggestion (to fix the same) will most likely fail when the user cannot even work out how to reply properly. IMHO. /Per Jessen, Zürich

RE: RE: [PHP] PHP RFC # 0001 --- List Etiquette [SOLVED]

2007-11-28 Thread Per Jessen
should be addressing. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP RFC # 0001 --- List Etiquette [SOLVED]

2007-11-28 Thread Per Jessen
I have absolutely no objection to using it, but there's nothing de-facto standard about it. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sprintf() oddness

2007-12-01 Thread Per Jessen
Christoph Boget wrote: Why does sprintf( '%.03f', 0.1525 ) return 0.152 while sprintf( '%.03f', 0.1575 ) return 0.158? I am using PHP 4.3.11 I see the same behaviour in 5.2.4 /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] sprintf() oddness

2007-12-01 Thread Per Jessen
Jochem Maas wrote: Per Jessen wrote: Christoph Boget wrote: Why does sprintf( '%.03f', 0.1525 ) return 0.152 while sprintf( '%.03f', 0.1575 ) return 0.158? most likely it's an artifact of the fact that the binary representations of those floating point values are not exact

Re: [PHP] howto get .tar.gz content's filenames

2007-12-04 Thread Per Jessen
users. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to create multipart e-mail bodies?

2007-12-07 Thread Per Jessen
Sándor Tamás (HostWare Kft.) wrote: But my mail client can't show any part of it. When I take a look at the source code, I can see that it recognise the boundaries, but somehow for some reason it doesn't show it. Does your email header also include this: MIME-Version: 1.0 /Per Jessen

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

2007-12-10 Thread Per Jessen
that's the currently preferred way of doing things, and therefore I should contact the web host and ask that they install it, or I find a different host. Which assumption should I be proceeding with? Find a provider/hoster that meets your requirements. You're the customer. /Per Jessen

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

2007-12-10 Thread Per Jessen
availability at startup, then store the status somewhere for your wrapper to query. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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] 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 (http

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

2007-12-11 Thread Per Jessen
Stut wrote: However, I'd expect a stat on that file will be more expensive than calling extension_loaded. Difficult to say, but a stat() is cheap, especially if the inode is cached already. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

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

2007-12-11 Thread Per Jessen
the most simple cases. /Per Jessen, Zürich -- 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-11 Thread Per Jessen
for work accept() process work done It wouldn't be too difficult to have threads dynamically started and stopped depending on the amount of work queued up. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-12-11 Thread Per Jessen
APIs is poor enough, using a session variable for keeping a status won't make it much worse. So what if the status is server-scope, yet kept in user-scope. In particular if the app already uses session storage. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net

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

2007-12-11 Thread Per Jessen
the load goes that high? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-12-11 Thread Per Jessen
Robert Cummings wrote: On Tue, 2007-12-11 at 18:14 +0100, Per Jessen wrote: I have been trying hard not to join this thread, but ... apart from the principle, what's _really_ so poor about it? Having to write application code that needs to work with two different APIs is poor enough, using

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

2007-12-12 Thread Per Jessen
obvious what's happening. Which doesn't mean it's also easy to fix, but it could give you a clue. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-12-12 Thread Per Jessen
hoster accordingly. Well if you write unit tests, having the unit tests applied to one or the other is the same amount of work since it just requires a switch to change between mysql and mysqli. Regardless of how you do it, it's twice the amount of work to run a test twice. /Per Jessen

Re: [PHP] how to Harmonic Mean manual

2007-12-14 Thread Per Jessen
LKSunny wrote: i know it can make simple function, if have Statistics knowledge... I don't think you need to know much about statistics - AFAIK, the harmonic mean of a group of numbers is simply the reciprocal of the 'normal' mean: harmonic_mean(3,4,5,6) = 1/mean(3,4,5,6) /Per Jessen

Re: [PHP] how to Harmonic Mean manual

2007-12-14 Thread Per Jessen
Per Jessen wrote: I don't think you need to know much about statistics - AFAIK, the harmonic mean of a group of numbers is simply the reciprocal of the 'normal' mean: harmonic_mean(3,4,5,6) = 1/mean(3,4,5,6) Ignore that. /Per Jessen, Zürich -- PHP General Mailing List (http

Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-16 Thread Per Jessen
, then the browser hangs, it should be something on the client-side, right? It _could_ be, but I doubt it. The browser/client might be hanging waiting for the server to finish. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PRG pattern - how to implement a load page using GET

2007-12-17 Thread Per Jessen
searches. Personally, I try to avoid the situation where you might get a double-POST if the user decides to do a reload/refresh. Which means processing the POST-request, but finish it off with a 303 redirect. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe

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

2007-12-20 Thread Per Jessen
René Fournier wrote: I'm really not sure what to try next. ps -aux shows MySQL as hogging the CPU, not PHP or Terminal: When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's doing. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Delete rows from database

2008-01-05 Thread Per Jessen
the form that is (presumably) submitted when the user hits Delete. In your processing you collect the row-ids or something else you can use in the whereclause : DELETE FROM table WHERE whereclause. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] client time zone?

2008-01-06 Thread Per Jessen
so I can offset the servers clock value correctly? I think you'll need to use javascript. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] utf-8 in $_POST

2008-01-08 Thread Per Jessen
pretty certain I've had issues where the meta tags were fine, but the server overrode me settings in the header. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] global address collection

2008-01-08 Thread Per Jessen
non-standard and third-party tools your potential user may or may not have installed, goes a bit too far, IMO. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Browser cache setting

2008-01-11 Thread Per Jessen
Richard Heyes wrote: Hi, What's the default setting for caching in browsers? With IE is it Automatically as I think it is? And what about other browsers? Some equivalent? I'm pretty certain it's automatic in most. I think Firefox has a default 50Mb of cache-space. /Per Jessen, Zürich

Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Per Jessen
Manuel Lemos wrote: On Linux/Unix, mail() uses sendmail or equivalent programs. These programs use pipes to communicate, which are much faster than using SMTP TCP sockets. Uh, sendmail on unix typically just drops the email file into a directory for the mailer daemon to pick up from. /Per

Re: [PHP] SMTP vs mail()

2008-01-11 Thread Per Jessen
(which will subsequently do the remote delivery), is speed really important? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SMTP vs mail()

2008-01-12 Thread Per Jessen
(in order for some user-intercation to continue perhaps), I would would just detach the script and carry on. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: SMTP vs mail()

2008-01-12 Thread Per Jessen
. That is why under Linux/Unix there are Unix domain sockets which are basically pipes for inter-program communication. TCP connections are just fine for local connections. And on some platforms/setups they're even faster than Unix domain sockets. /Per Jessen, Zürich -- PHP General Mailing List (http

Re: [PHP] SMTP vs mail()

2008-01-12 Thread Per Jessen
to beat cases 6-7-8 by doing direct SMTP, but I doubt if it'll be worth your effort. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SMTP vs mail()

2008-01-12 Thread Per Jessen
- this was one call to mail(): mail(user1,user2,user3 ..,subject,text); /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SMTP vs mail()

2008-01-15 Thread Per Jessen
Richard Lynch wrote: If there's any way to re-configure the MTA to queue the messages for later sending, that would save you a lot of overhead on the PHP end... The MTA will always queue the messages - well, that is certainly the case for postfix. /Per Jessen, Zürich -- PHP General

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? A regular expression perhaps? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
with a simple javascript validation (using a regex) at entry time followed by a semantic check that the given day exists in the given month/year. Of course, if you'd rather not use javascript, you could validate the whole thing after POST. /Per Jessen, Zürich -- PHP General Mailing List (http

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
Daniel Brown wrote: By only doing JavaScript validation, Just in case - I wasn't suggesting only doing javascript validation. I think I said a simple javascript validation _followed_ (as in at POST-time) by a semantic check. For which checkdate() seems pretty optimal. /Per Jessen

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
clive wrote: Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? explode() and checkdate() perhaps? checkdate() sounds like just the thing. /Per

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
entered an invalid date); } so if the person enters 01-15-2008 its fine, but 1-15-2008 dies. Running three regexes is a bit much when one is enough: /^([0-9]{2})-([0-9]{2})-([0-9]{4})$/ /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

  1   2   3   4   5   6   7   8   9   10   >