[PHP] Re: Complex MySQL query for lowest price

2013-01-31 Thread Jim Giner
On 1/31/2013 2:21 PM, Angela Barone wrote: Hello, I have a formula that says, if 'specialprice' is not empty and it is lower than 'unitprice', use 'specialprice', otherwise use 'unitprice': ?php $result = mysql_query(SELECT LEAST(unitprice,ifnull(specialprice,'')) AS used_price

[PHP] Re: Strip emails from a document

2013-01-26 Thread Tim Streater
On 26 Jan 2013 at 16:24, Tedd Sperling t...@sperling.com wrote: I thought I had a function to strip emails from a document, but I can't find it. So, before I start writing a common script, do any of you have a simple script to do this? I have a function that will take a comma separated

[PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread Daniel Brown
On Fri, Jan 18, 2013 at 10:33 AM, KISE wowk...@gmail.com wrote: Paul Dragoonis, Actually it wont work i did tried it before, if the dir end with / it will list the directories inside the path you gave it and if it doesn't have any directories it will return false since there is no directories

Re: [PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread tamouse mailing lists
On Fri, Jan 18, 2013 at 9:43 AM, Daniel Brown danbr...@php.net wrote: On Fri, Jan 18, 2013 at 10:33 AM, KISE wowk...@gmail.com wrote: Paul Dragoonis, Actually it wont work i did tried it before, if the dir end with / it will list the directories inside the path you gave it and if it doesn't

Re: [PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread tamouse mailing lists
On Fri, Jan 18, 2013 at 9:26 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Jan 18, 2013 at 9:43 AM, Daniel Brown danbr...@php.net wrote: On Fri, Jan 18, 2013 at 10:33 AM, KISE wowk...@gmail.com wrote: Paul Dragoonis, Actually it wont work i did tried it before, if the dir

[PHP] Re: [ANNOUNCE] PHP 5.4.11 and PHP 5.3.21 released!

2013-01-17 Thread Johannes Schlüter
On Thu, 2013-01-17 at 08:28 -0800, S. Morris Rose wrote: Thanks. Sorry to have to ask, but is it possibly a typo to recommend 5.3.20 for those still on the 5.3 series? That's a recommendation that's hard to reconcile with the fact that 5.3.21 has bug fixes, at least without a little

[PHP] Re: Stripping accents from characters as they pass through a stream and then written to file

2013-01-14 Thread Marc Guay
And the answer is that it's a locale issue... http://stackoverflow.com/questions/7931853/why-does-phps-iconv-need-setlocale -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Configuration Issue (Error 310 ERR_TOO_MANY_REDIRECTS)

2013-01-09 Thread Jan Ehrhardt
Ken Kixmoeller in php.general (Wed, 9 Jan 2013 14:25:33 -0600): I have searched for 2 days trying to find references for this. I see a lot of PHP-driven applications having the same problem (mostly blogs), but no under the hood fixes. It might be a rewrite rule that rewrites to the original URL.

[PHP] Re: Boolean type forced on string assignment inside if statement

2013-01-02 Thread Tim Streater
On 02 Jan 2013 at 16:05, Stephen stephe...@rogers.com wrote: On 13-01-02 10:53 AM, Marc Guay wrote: Hi folks, if ($a = foo $b = bar){ echo $a.br /.$b; } Returns: 1 bar I expect: foo bar Is this documented? takes precedence over =

[PHP] Re: [PHP-DB] Re: [PHP] Shopping Cart Discount System

2012-12-31 Thread Karl DeSaulniers
On Dec 31, 2012, at 3:36 AM, Ashley Sheridan wrote: Karl DeSaulniers k...@designdrumm.com wrote: Hello Everyone, Hope all are well. Quick and hopefully painless question. Is there any examples on how to build a discount system into your shopping cart out there that anyone knows of? I am

[PHP] Re: FilesystemIterator issue with smb/cifs mounts

2012-12-28 Thread Kris Spencer
On 12/28/2012 9:32 AM, Kris Spencer wrote: I am writing a simple file system iterator which seems to work fine on local filesystems but methods such as FilesystemIterator::isDir and isFile fail to properly evaluate if the directory are smb/cifs mounted. Does anyone know a workaround or

[PHP] Re: Nested loopa

2012-12-26 Thread Jim Giner
While I fully understand the purpose of the do...while construct, I just never get used to seeing it used. (in other langs I had to deal with a 'repeat...until construct and dis-liked that also). I pretty much know if I'm going to have to deal with a run at least once when I'm coding and

[PHP] Re: Nested loopa

2012-12-25 Thread Jim Giner
On 12/25/2012 7:21 PM, Ken Arck wrote: So I cannot do nested do loops in php? ?php $a = 0 ; $b = 0 ; do { echo $a\n ; do { echo $b\n ; $b++ }while($b =10) ; $a++; }while($a = 20) ; ? Why do you say that? -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Tim Streater
On 22 Dec 2012 at 16:50, Tedd Sperling t...@sperling.com wrote: On Dec 21, 2012, at 8:06 PM, Jim Giner jim.gi...@albanyhandball.com wrote: That actually makes sense tho. Afterall, a string is truly only one memory allocation whereas array elements are basically multiple vars having the same

[PHP] Re: Strange string stuff -- maybe everything is ending...

2012-12-21 Thread Jim Giner
On 12/21/2012 4:38 PM, Tedd Sperling wrote: Hi gang; I just ran into something I have never had a problem with before. Here's the code: --- start of code $topic = ''; while($row = mysql_fetch_array($result)) // pulling stuff from a database {

[PHP] Re: form validation

2012-12-20 Thread Jim Giner
On 12/20/2012 10:27 AM, David Mehler wrote: Hello, I just read the Php5 changelog. Legacy features specifically magic quotes were removed, does that mean that any system running php 5.4 or newer does not need to use either addslashes() or stripslashes() when dealing with form input? Thanks.

Re: [PHP] Re: form validation

2012-12-20 Thread Daniel Brown
On Thu, Dec 20, 2012 at 10:34 AM, Jim Giner jim.gi...@albanyhandball.com wrote: If you are using mysql for a db, then you should already be using mysql_real_escape_string in place of addslashes. Actually, you should start moving toward MySQLi, as mysql_*() is deprecated. -- /Daniel P.

Re: [PHP] Re: form validation

2012-12-20 Thread Jonathan Sundquist
On Thu, Dec 20, 2012 at 9:34 AM, Jim Giner jim.gi...@albanyhandball.comwrote: If you are using mysql for a db, then you should already be using mysql_real_escape_string in place of addslashes. You should not be using mysql_real_escape_string going forward as it will be deprecated in php

Re: [PHP] Re: form validation

2012-12-20 Thread Jim Giner
On 12/20/2012 10:36 AM, Daniel Brown wrote: On Thu, Dec 20, 2012 at 10:34 AM, Jim Giner jim.gi...@albanyhandball.com wrote: If you are using mysql for a db, then you should already be using mysql_real_escape_string in place of addslashes. Actually, you should start moving toward MySQLi,

[PHP] Re: preg_replace question

2012-12-12 Thread Maciek Sokolewicz
On 12-12-2012 17:11, Curtis Maurand wrote: I have several poisoned .js files on a server. I can use find to recursively find them and then use preg_replace to replace the string. However the string is filled with single quotes, semi-colons and a lot of other special characters. Will

Re: [PHP] Re: preg_replace question

2012-12-12 Thread Ashley Sheridan
Maciek Sokolewicz maciek.sokolew...@gmail.com wrote: On 12-12-2012 17:11, Curtis Maurand wrote: I have several poisoned .js files on a server. I can use find to recursively find them and then use preg_replace to replace the string. However the string is filled with single quotes,

[PHP] Re: preg_replace question

2012-12-12 Thread Curtis Maurand
On 12/12/2012 12:00 PM, Maciek Sokolewicz wrote: On 12-12-2012 17:11, Curtis Maurand wrote: I have several poisoned .js files on a server. I can use find to recursively find them and then use preg_replace to replace the string. However the string is filled with single quotes, semi-colons and a

[PHP] Re: preg_replace question

2012-12-12 Thread Maciek Sokolewicz
On 12-12-2012 21:10, Curtis Maurand wrote: On 12/12/2012 12:00 PM, Maciek Sokolewicz wrote: On 12-12-2012 17:11, Curtis Maurand wrote: I have several poisoned .js files on a server. I can use find to recursively find them and then use preg_replace to replace the string. However the string is

Re: [PHP] Re: preg_replace question

2012-12-12 Thread Curtis Maurand
On 12/12/2012 3:47 PM, Maciek Sokolewicz wrote: On 12-12-2012 21:10, Curtis Maurand wrote: On 12/12/2012 12:00 PM, Maciek Sokolewicz wrote: On 12-12-2012 17:11, Curtis Maurand wrote: I have several poisoned .js files on a server. I can use find to recursively find them and then use

Re: [PHP] Re: shared memory on php servers?

2012-12-05 Thread tamouse mailing lists
On Tue, Dec 4, 2012 at 7:02 AM, Alessandro Pellizzari a...@amiran.it wrote: Il Tue, 04 Dec 2012 11:49:22 +0100, rene7705 ha scritto: I'm wondering, what's the fastest way to put a large and deep array() structure in shared memory on a PHP server? Using MongoDB. :) +++ -- PHP General

Re: [PHP] Re: shared memory on php servers?

2012-12-04 Thread Sebastian Krebs
Hi, Why don't you use a database? Seems more appropiate here. At least SQLite should fit ;) Regards, Sebastian 2012/12/4 rene7705 rene7...@gmail.com I would also like to hear any thoughts on how to efficiently add, delete and edit data in this large and deep array structure from multiple

Re: [PHP] Re: shared memory on php servers?

2012-12-04 Thread Stuart Dallas
On 4 Dec 2012, at 10:51, rene7705 rene7...@gmail.com wrote: I would also like to hear any thoughts on how to efficiently add, delete and edit data in this large and deep array structure from multiple sessions at nearly the same time.. On Tue, Dec 4, 2012 at 11:49 AM, rene7705

Re: [PHP] Re: shared memory on php servers?

2012-12-04 Thread Sebastian Krebs
2012/12/4 Stuart Dallas stu...@3ft9.com On 4 Dec 2012, at 10:51, rene7705 rene7...@gmail.com wrote: I would also like to hear any thoughts on how to efficiently add, delete and edit data in this large and deep array structure from multiple sessions at nearly the same time.. On Tue,

[PHP] Re: shared memory on php servers?

2012-12-04 Thread Alessandro Pellizzari
Il Tue, 04 Dec 2012 11:49:22 +0100, rene7705 ha scritto: I'm wondering, what's the fastest way to put a large and deep array() structure in shared memory on a PHP server? Using MongoDB. :) Bye. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: PDO question

2012-11-28 Thread Jim Giner
On 11/28/2012 3:58 PM, ad...@buskirkgraphics.com wrote: Guys, I am not quiet sure what is happening but every time i try to connect to a remote host it refers back to localhost. $pdo = new PDO('mysql:host=171.16.23.44;dbname=test', 'user','password'); ERROR: Access denied for user

Re: [PHP] Re: PDO question

2012-11-28 Thread ad...@buskirkgraphics.com
On November 28, 2012 at 4:11 PM Jim Giner jim.gi...@albanyhandball.com wrote: On 11/28/2012 3:58 PM, ad...@buskirkgraphics.com wrote: Guys, I am not quiet sure what is happening but every time i try to connect to a remote host it refers back to localhost. $pdo = new

Re: [PHP] Re: PDO question

2012-11-28 Thread Jim Giner
On 11/28/2012 4:18 PM, ad...@buskirkgraphics.com wrote: On November 28, 2012 at 4:11 PM Jim Giner jim.gi...@albanyhandball.com wrote: On 11/28/2012 3:58 PM, ad...@buskirkgraphics.com wrote: Guys, I am not quiet sure what is happening but every time i try to connect to a remote host it refers

Re: [PHP] Re: PDO question

2012-11-28 Thread ad...@buskirkgraphics.com
On November 28, 2012 at 4:11 PM Jim Giner jim.gi...@albanyhandball.com wrote: On 11/28/2012 3:58 PM, ad...@buskirkgraphics.com wrote: Guys, I am not quiet sure what is happening but every time i try to connect to a remote host it refers back to localhost. $pdo = new

Re: [PHP] Re: PDO question

2012-11-28 Thread Jim Giner
On 11/28/2012 4:22 PM, ad...@buskirkgraphics.com wrote: On November 28, 2012 at 4:11 PM Jim Giner jim.gi...@albanyhandball.com wrote: On 11/28/2012 3:58 PM, ad...@buskirkgraphics.com wrote: Guys, I am not quiet sure what is happening but every time i try to connect to a remote host it refers

[PHP] Re: PDO mysql Connection issue

2012-11-28 Thread David Robley
ad...@buskirkgraphics.com wrote: I am having a PDO mysql connection issue I cant explain. On server server1.mydomain.com I have a test script ?php $pdo = new PDO('mysql:host=171.16.23.44;dbname=test', 'user','password'); ? 171.16.23.44 is by an A record called server2.mydoamin.com they

[PHP] Re: globbed includes?

2012-11-20 Thread Shawn McKenzie
On 11/18/2012 02:29 PM, tamouse mailing lists wrote: There are certain times I'd like to include all files in a given directory (such as configuration stuff that is split out by type, a la apache conf.d). Anyone have something handy that implements that? Just for fun:

[PHP] Re: Variables with - in their name

2012-11-19 Thread Alessandro Pellizzari
Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto: echo select name=\distributor- . $row['promo_code_prefix'] . - . $row['promo_code_suffix'] . \ style=\text-align: center;\\r\n; It could be wrote: ?php echo $distributor-42-2; You MUST disable register_globals in your php.ini

[PHP] Re: Variables with - in their name

2012-11-19 Thread Maciek Sokolewicz
On 19-11-2012 10:49, Alessandro Pellizzari wrote: Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto: echo select name=\distributor- . $row['promo_code_prefix'] . - . $row['promo_code_suffix'] . \ style=\text-align: center;\\r\n; It could be wrote: ?php echo $distributor-42-2;

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Jim Giner
On 11/16/2012 8:33 PM, Iñigo Medina wrote: On Fri, 16 Nov 2012, Jim Giner wrote: On 11/16/2012 12:38 PM, Tim Streater wrote: On 16 Nov 2012 at 12:10, Omar Muhsin mrfroa...@gmail.com wrote: Hello, I was just wondering after writting the code in version 2 here below, it turns out in testing

[PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Tim Streater
On 18 Nov 2012 at 14:44, Jim Giner jim.gi...@albanyhandball.com wrote: 2. Using Switch {ALWAYS FIRST CASE!!!} //$boxes = 1; //switch ($count) { //case ($count 14): //$boxes = 3; //break; //case ($count 7 $count =

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Stuart Dallas
On 19 Nov 2012, at 19:35, Tim Streater t...@clothears.org.uk wrote: On 18 Nov 2012 at 14:44, Jim Giner jim.gi...@albanyhandball.com wrote: 2. Using Switch {ALWAYS FIRST CASE!!!} //$boxes = 1; //switch ($count) { //case ($count 14): //$boxes

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Sebastian Krebs
2012/11/19 Tim Streater t...@clothears.org.uk On 18 Nov 2012 at 14:44, Jim Giner jim.gi...@albanyhandball.com wrote: 2. Using Switch {ALWAYS FIRST CASE!!!} //$boxes = 1; //switch ($count) { //case ($count 14): //$boxes = 3; //

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Andrew Ballard
On Sat, Nov 17, 2012 at 4:13 PM, Sebastian Krebs krebs@gmail.com wrote: 2012/11/17 Andrew Ballard aball...@gmail.com On Nov 16, 2012 10:24 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs krebs@gmail.com wrote: Beside

[PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Tim Streater
On 17 Nov 2012 at 01:33, Iñigo Medina imed...@grosshat.com wrote: On Fri, 16 Nov 2012, Jim Giner wrote: Maybe I'm way out of touch, but when I look at php.net for the syntax of the switch statement I see: switch($var){ case (value): (do something) case (other

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Stuart Dallas
On 17 Nov 2012, at 10:53, Tim Streater t...@clothears.org.uk wrote: On 17 Nov 2012 at 01:33, Iñigo Medina imed...@grosshat.com wrote: On Fri, 16 Nov 2012, Jim Giner wrote: Maybe I'm way out of touch, but when I look at php.net for the syntax of the switch statement I see: switch($var){

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Andrew Ballard
On Nov 16, 2012 10:24 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs krebs@gmail.com wrote: Beside this it can be rewritten as switch ((int) (($count-1) / 7) { case 0: // 1-7 case 1: // 8 - 14 default: // above 15

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Sebastian Krebs
2012/11/17 Tim Streater t...@clothears.org.uk On 17 Nov 2012 at 01:33, Iñigo Medina imed...@grosshat.com wrote: On Fri, 16 Nov 2012, Jim Giner wrote: Maybe I'm way out of touch, but when I look at php.net for the syntax of the switch statement I see: switch($var){ case (value):

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Sebastian Krebs
2012/11/17 Andrew Ballard aball...@gmail.com On Nov 16, 2012 10:24 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs krebs@gmail.com wrote: Beside this it can be rewritten as switch ((int) (($count-1) / 7) { case 0:

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread tamouse mailing lists
On Sat, Nov 17, 2012 at 3:13 PM, Sebastian Krebs krebs@gmail.com wrote: 2012/11/17 Andrew Ballard aball...@gmail.com On Nov 16, 2012 10:24 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: Just a tad obscure for someone coming along later Without knowing the intent of the

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread tamouse mailing lists
On Sat, Nov 17, 2012 at 2:59 PM, Sebastian Krebs krebs@gmail.com wrote: (Beside: Was the principle of least surprise not a ruby-thing? ;)) No, but the Ruby (and Rails) world takes concepts like this and really runs with them. Principle of Least Astonishment has been around for quite some

[PHP] Re: Switch - Case Statement Questions

2012-11-16 Thread Tim Streater
On 16 Nov 2012 at 12:10, Omar Muhsin mrfroa...@gmail.com wrote: Hello, I was just wondering after writting the code in version 2 here below, it turns out in testing that it actually PHP is not validating the expressions instead always I get the first case. 1.Using nested if statement {THE

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-16 Thread Sebastian Krebs
2012/11/16 Tim Streater t...@clothears.org.uk On 16 Nov 2012 at 12:10, Omar Muhsin mrfroa...@gmail.com wrote: Hello, I was just wondering after writting the code in version 2 here below, it turns out in testing that it actually PHP is not validating the expressions instead always I

[PHP] Re: Switch - Case Statement Questions

2012-11-16 Thread Jim Giner
On 11/16/2012 12:38 PM, Tim Streater wrote: On 16 Nov 2012 at 12:10, Omar Muhsin mrfroa...@gmail.com wrote: Hello, I was just wondering after writting the code in version 2 here below, it turns out in testing that it actually PHP is not validating the expressions instead always I get the

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-16 Thread Iñigo Medina
On Fri, 16 Nov 2012, Jim Giner wrote: On 11/16/2012 12:38 PM, Tim Streater wrote: On 16 Nov 2012 at 12:10, Omar Muhsin mrfroa...@gmail.com wrote: Hello, I was just wondering after writting the code in version 2 here below, it turns out in testing that it actually PHP is not validating the

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-16 Thread tamouse mailing lists
On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs krebs@gmail.com wrote: Beside this it can be rewritten as switch ((int) (($count-1) / 7) { case 0: // 1-7 case 1: // 8 - 14 default: // above 15 } Nice code refactoring :) Just a tad obscure for someone coming along later,

[PHP] Re: Date comparison going wrong, wrong, wrong

2012-11-11 Thread Jim Giner
On 11/11/2012 1:30 PM, Terry Ally (Gmail) wrote: Hi all, I am having a problem with comparing time. I am using the following: $todaydate = date(D, M jS, Y g:i:s a); $showenddate = date(D, M jS, Y g:i:s a, strtotime($showsRecord['end_date'])); if ($todaydate $showenddate): echo The date

[PHP] Re: Date comparison going wrong, wrong, wrong

2012-11-11 Thread Jim Giner
BTW - this is the code I used to test out your process: ? $dt_format = D, M jS, Y g:i:s a; $todaydate = date($dt_format); $showenddate = strtotime(11/18/12 16:00:00); if ($todaydate $showenddate) echo The date of the show has not yet arrived; else echo The show has ended; -- PHP

[PHP] Re: Date comparison going wrong, wrong, wrong

2012-11-11 Thread Maciek Sokolewicz
On 11-11-2012 22:47, Jim Giner wrote: Besides the minor fact that the code has syntax errors, the problem with it is your if is backwrads. The facts are: today is less than end date, so your if should show The show has ended since you are asking if today IS GREATER than the end date. BTW -

[PHP] Re: The require and include

2012-11-10 Thread Maciek Sokolewicz
On 10-11-2012 17:38, andrej arshinow wrote: I knew that before the function require a faster because All files are included before run the script. Now is this? And how to use it? I don't understand your question, could you please try to elaborate? Are you asking whether include is faster

Re: [PHP] Re: Multithreading for OOP PHP

2012-11-03 Thread Joe Watkins
On 31/10/2012 13:46, Alex Nikitin wrote: Hey guys (and/or gals), I have heard this question entirely too many times, I think at some point Rasmus just stopped responding to it. The real reason that PHP is not threaded has nothing to do with PHP internal or extension thread safety, the reason is

Re: [PHP] Re: Multithreading for OOP PHP

2012-11-03 Thread Alex Nikitin
Threading doesn't increase complexity? Spoken truly like somebody who has not had to actually write, test and debug proper, high performance threaded code. Please tell me how threading doesn't increase complexity of any data structure? I may agree if you talk about php running in cli, but then the

Re: [PHP] Re: Multithreading for OOP PHP

2012-11-03 Thread Dotan Cohen
As far as php side goes, it's a problem of design of the apps. Just because people decided to go through hoops to use the threaded model doesn't mean that it is any faster than writing to the same thing in event driven model, event driven way is sometimes much faster than threads. I'm on

[PHP] Re: Creating an Advanced Form

2012-11-02 Thread Matt Graham
Jonathan Davies jonny1dav...@btinternet.com wrote: I am attempting to create an advanced form with 9 different search fields. I am [concatenating a bunch of bits together] so I don't have to [create] over 300,000 IF statements. mysql_fetch_assoc(): supplied argument is not a valid MySQL

[PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Alessandro Pellizzari
Il Wed, 31 Oct 2012 11:57:11 +0100, ma...@behnke.biz ha scritto: But it if PHP would be threadsafe, you would be able to run the Apache in a much faster and less memory using way. There once was a configure option in PHP to compile it threadsafe, but they dropped it for a reason. Because PHP

[PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Alessandro Pellizzari
Il Wed, 31 Oct 2012 11:50:00 +0100, ma...@behnke.biz ha scritto: The drawback of forking is the memory overhead. With every fork you take the same amount of memory which is not the case if you could use real threads. No, it is not. Forking in Linux uses COW (copy-on-write), so a

Re: [PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Alex Nikitin
Hey guys (and/or gals), I have heard this question entirely too many times, I think at some point Rasmus just stopped responding to it. The real reason that PHP is not threaded has nothing to do with PHP internal or extension thread safety, the reason is more to the extent that it doesn't make

Re: [PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Tommy Pham
On Wed, Oct 31, 2012 at 6:46 AM, Alex Nikitin niks...@gmail.com wrote: Hey guys (and/or gals), I have heard this question entirely too many times, I think at some point Rasmus just stopped responding to it. The real reason that PHP is not threaded has nothing to do with PHP internal or

Re: [PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Alex Nikitin
That's all understood but there are times when that one request from the visitor requires many sub-requests like connection to DB and making SOAP calls. I would say it's more than just there are times, that's how a typical script lives, it imports libraries, queries the database, and talks

Re: [PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Tommy Pham
On Wed, Oct 31, 2012 at 9:27 AM, Alex Nikitin niks...@gmail.com wrote: That's all understood but there are times when that one request from the visitor requires many sub-requests like connection to DB and making SOAP calls. I would say it's more than just there are times, that's how a

Re: [PHP] Re: Multithreading for OOP PHP

2012-10-31 Thread Alex Nikitin
You do all that in the context of a single PHP instance and linear code, calling curl_multi handles its own threading, you just get back results, you dont have to store it anywhere outside PHP memory space, and you can configure timeouts and all that stuff, or you can regulate it yourself. The

[PHP] Re: list of places to learn programming online

2012-10-30 Thread tamouse mailing lists
Fascinating. This kicked off the spam blocker On Tue, Oct 30, 2012 at 7:38 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: This just hit my inbox from another source. I haven't had any time to vet the list, but here is the link to the post: thenextweb DOT

[PHP] Re: confirm subscribe to php-general@lists.php.net

2012-10-29 Thread Ivo Engelhardt
-- Ivo Engelhardt engelha...@fastmail.fm Am Di, 30. Okt 2012, um 6:25, schrieb php-general-h...@lists.php.net: Hi! This is the ezmlm program. I'm managing the php-general@lists.php.net mailing list. I'm working for my owner, who can be reached at php-general-ow...@lists.php.net.

[PHP] Re: Recommendation request: Use Magento or build my own eCommerce?

2012-10-22 Thread Mark
On Mon, Oct 22, 2012 at 4:06 PM, Mark mark...@gmail.com wrote: Hi, I'm in a difficult situation here. I have a list of requirements for an eCommerce system (Magento) where i'm getting mixed opinions about what to do. Note: i do consider myself to be a quite experienced PHP programmer and

Re: [PHP] Re: Recommendation request: Use Magento or build my own eCommerce?

2012-10-22 Thread Mark
On Mon, Oct 22, 2012 at 4:51 PM, Marc Guay marc.g...@gmail.com wrote: Why not just use the entire OpenCart package? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Well, i was basing my choice of Magento on the internet opinion and

Re: [PHP] Re: User Timezone

2012-10-21 Thread Maciek Sokolewicz
On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response. Yes, for the US I plan on calculating by state, but this website is not geared to just the US. So I am looking for a solution that lets me also calculate by country/region. Was looking on google and found geoip, but not sure

Re: [PHP] Re: User Timezone

2012-10-21 Thread Karl DeSaulniers
On Oct 21, 2012, at 5:01 AM, Maciek Sokolewicz wrote: On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response. Yes, for the US I plan on calculating by state, but this website is not geared to just the US. So I am looking for a solution that lets me also calculate by

Re: [PHP] Re: User Timezone

2012-10-21 Thread Ashley Sheridan
Karl DeSaulniers k...@designdrumm.com wrote: On Oct 21, 2012, at 5:01 AM, Maciek Sokolewicz wrote: On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response. Yes, for the US I plan on calculating by state, but this website is not geared to just the US. So I am looking for a

Re: [PHP] Re: User Timezone

2012-10-21 Thread Samuel Lopes Grigolato
Sorry if it's to dumb or hacky solution, but can't you just create a Date with JavaScript and send it with your request in a hidden field? You could guess the timezone with this date and the server's one. I don't know what you're going to do with this info, just be aware that if the users clock

Re: [PHP] Re: User Timezone

2012-10-21 Thread Matijn Woudt
On Sun, Oct 21, 2012 at 12:01 PM, Maciek Sokolewicz maciek.sokolew...@gmail.com wrote: On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response. Yes, for the US I plan on calculating by state, but this website is not geared to just the US. So I am looking for a solution that lets

RES: [PHP] Re: User Timezone

2012-10-21 Thread Samuel Lopes Grigolato
DeSaulniers; php-general Assunto: Re: [PHP] Re: User Timezone On Sun, Oct 21, 2012 at 12:01 PM, Maciek Sokolewicz maciek.sokolew...@gmail.com wrote: On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response. Yes, for the US I plan on calculating by state, but this website

Re: [PHP] Re: User Timezone

2012-10-21 Thread tamouse mailing lists
On Sun, Oct 21, 2012 at 6:12 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Don't most browsers include this information in the HTTP headers? Not that i have seen. Quick test using nc: Firefox: tamara@caesar:~$ nc -l 3000 GET / HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (X11;

Re: [PHP] Re: User Timezone

2012-10-21 Thread tamouse mailing lists
On Sun, Oct 21, 2012 at 7:30 AM, Matijn Woudt tijn...@gmail.com wrote: On Sun, Oct 21, 2012 at 12:01 PM, Maciek Sokolewicz maciek.sokolew...@gmail.com wrote: On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response. Yes, for the US I plan on calculating by state, but this

Re: [PHP] Re: User Timezone

2012-10-21 Thread Matijn Woudt
On Sun, Oct 21, 2012 at 1:12 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Don't most browsers include this information in the HTTP headers? Nope, you're probably confused with servers that return their time and date. - Matijn -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Re: User Timezone

2012-10-21 Thread Karl DeSaulniers
On Oct 21, 2012, at 5:11 PM, tamouse mailing lists wrote: On Sun, Oct 21, 2012 at 7:30 AM, Matijn Woudt tijn...@gmail.com wrote: On Sun, Oct 21, 2012 at 12:01 PM, Maciek Sokolewicz maciek.sokolew...@gmail.com wrote: On 21-10-2012 01:11, Karl DeSaulniers wrote: Thanks for the response.

Re: [PHP] Re: User Timezone

2012-10-21 Thread tamouse mailing lists
On Sun, Oct 21, 2012 at 6:18 PM, Karl DeSaulniers k...@designdrumm.com wrote: On Oct 21, 2012, at 5:11 PM, tamouse mailing lists wrote: Using the standard labels in /usr/share/zoneinfo should be able to avoid having to keep track of who is and isn't in DST, *provided* you find a way to map the

[PHP] Re: User Timezone

2012-10-20 Thread Maciek Sokolewicz
On 20-10-2012 09:39, Karl DeSaulniers wrote: Hello all, Happy weekend. Hoping you can help me with an age old question. I am trying to get a users timezone for a purchase online. I know that php is not really able to get a timzone of a user because its a server side execution with the date

RES: [PHP] Re: User Timezone

2012-10-20 Thread Samuel Lopes Grigolato
nome de Maciek Sokolewicz Enviada em: sábado, 20 de outubro de 2012 09:24 Para: Karl DeSaulniers Cc: php-general Assunto: [PHP] Re: User Timezone On 20-10-2012 09:39, Karl DeSaulniers wrote: Hello all, Happy weekend. Hoping you can help me with an age old question. I am trying to get a users

[PHP] Re: User Timezone

2012-10-20 Thread Karl DeSaulniers
On Oct 20, 2012, at 7:23 AM, Maciek Sokolewicz wrote: On 20-10-2012 09:39, Karl DeSaulniers wrote: Hello all, Happy weekend. Hoping you can help me with an age old question. I am trying to get a users timezone for a purchase online. I know that php is not really able to get a timzone of a

Re: RES: [PHP] Re: User Timezone

2012-10-20 Thread Karl DeSaulniers
: Maciek Sokolewicz [mailto:tula...@gmail.com] Em nome de Maciek Sokolewicz Enviada em: sábado, 20 de outubro de 2012 09:24 Para: Karl DeSaulniers Cc: php-general Assunto: [PHP] Re: User Timezone On 20-10-2012 09:39, Karl DeSaulniers wrote: Hello all, Happy weekend. Hoping you can help me with an age old

Re: [PHP] Re: User Timezone

2012-10-20 Thread Matijn Woudt
On Sun, Oct 21, 2012 at 12:56 AM, Karl DeSaulniers k...@designdrumm.com wrote: On Oct 20, 2012, at 7:23 AM, Maciek Sokolewicz wrote: On 20-10-2012 09:39, Karl DeSaulniers wrote: Hello all, Happy weekend. Hoping you can help me with an age old question. I am trying to get a users timezone

Re: [PHP] Re: User Timezone

2012-10-20 Thread Karl DeSaulniers
On Oct 20, 2012, at 6:02 PM, Matijn Woudt wrote: On Sun, Oct 21, 2012 at 12:56 AM, Karl DeSaulniers k...@designdrumm.com wrote: On Oct 20, 2012, at 7:23 AM, Maciek Sokolewicz wrote: On 20-10-2012 09:39, Karl DeSaulniers wrote: Hello all, Happy weekend. Hoping you can help me with an age

[PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner
On 10/14/2012 1:10 AM, tamouse mailing lists wrote: This just dropped in my inbox the other day from Smashing #69: 2. PHP The Right Way If you are developing for the Web, the chances are high that you have to deal with PHP on a regular basis. However, once you've stumbled upon a problem that

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread tamouse mailing lists
On Sun, Oct 14, 2012 at 10:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/14/2012 1:10 AM, tamouse mailing lists wrote: This just dropped in my inbox the other day from Smashing #69: 2. PHP The Right Way If you are developing for the Web, the chances are high that you have to

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Daniel Brown
On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Sounds like a good idea, but as for me - if I was a newbie I'd have a problem with their very first instructions. It says right off the start to type in the following: php -5 localhost:8000 That should be a

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner
On 10/14/2012 12:06 PM, tamouse mailing lists wrote: On Sun, Oct 14, 2012 at 10:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/14/2012 1:10 AM, tamouse mailing lists wrote: This just dropped in my inbox the other day from Smashing #69: 2. PHP The Right Way If you are developing

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner
On 10/14/2012 12:12 PM, Daniel Brown wrote: On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Sounds like a good idea, but as for me - if I was a newbie I'd have a problem with their very first instructions. It says right off the start to type in the following:

[PHP] Re: appreciation

2012-10-12 Thread Tim Streater
On 12 Oct 2012 at 12:36, Maciek Sokolewicz tula...@php.net wrote: However, this is likely not what the OP wants. What he likely does want is to check if the filename is not '.' or '..'. Of course, there are numerous ways to do this. From very simple things like: if ( $filename != '.'

[PHP] Re: Reaching the PHP mailing list owners

2012-10-12 Thread Helmut Tessarek
Well, this is useful. First I get a a message that the owner of the list is available at internals-ow...@lists.php.net and then I get another automated reply. On 12.10.12 13:48 , PHP Lists Owner wrote: This is an automated response to your message to internals-ow...@lists.php.net If you

Re: [PHP] Re: Reaching the PHP mailing list owners

2012-10-12 Thread Daniel Brown
What is it you're trying to achieve with the below, Helmut? On Fri, Oct 12, 2012 at 1:53 PM, Helmut Tessarek tessa...@evermeet.cx wrote: Well, this is useful. First I get a a message that the owner of the list is available at internals-ow...@lists.php.net and then I get another automated

Re: [PHP] Re: Reaching the PHP mailing list owners

2012-10-12 Thread Helmut Tessarek
Hello Daniel, I wanted to get an answer to my question (which you would have seen, if you actually had read the mail). I got a mail that messages bounced from my mail server. So I sent a reply to the list owner to get an explanation how this is possible, since my mail server only rejects mails

<    1   2   3   4   5   6   7   8   9   10   >