php-general Digest 2 Oct 2008 10:53:45 -0000 Issue 5714

2008-10-02 Thread php-general-digest-help
php-general Digest 2 Oct 2008 10:53:45 - Issue 5714 Topics (messages 281353 through 281358): Re: SESSION array problems 281353 by: Nathan Rixham 281355 by: Jim Lucas Re: Questions regarding limits of processes launched bysystem, exec,passthru ... 281354 by: Valentin

Re: [PHP] store array into session variable and get it back later

2008-10-02 Thread Stut
On 1 Oct 2008, at 20:42, Per Jessen wrote: Stut wrote: On 1 Oct 2008, at 11:40, Per Jessen wrote: Alain Roger wrote: how can i get the 'name' value for each row in this session stored array ? thx. You haven't stored an array in the session, you've tried to store an object of class

[PHP] php server push

2008-10-02 Thread gkrisz
Hi, (i hope this is the right place to ask questions like below) I am trying to use content type 'multipart/x-mixed-replace' to achive server pushing and I have the following piece of code, which works perfectly. /* file.html */ function handleContent(event) { var result =

[PHP] Re: php server push

2008-10-02 Thread Nathan Rixham
[EMAIL PROTECTED] wrote: Hi, (i hope this is the right place to ask questions like below) I am trying to use content type 'multipart/x-mixed-replace' to achive server pushing and I have the following piece of code, which works perfectly. /* file.html */ function handleContent(event) { var

Re: [PHP] db_* = pg_*/my_*/ifx_* ?

2008-10-02 Thread Nathan Rixham
uaca man wrote: nathan, if you are not going to help, DONĀ“T answer. [/snip] Angelo, suggesting that there are some classes for this on phpclasses is helping suggesting that a vast amount of articles and resource can easily be located on google is helping suggesting that the issue is also

[PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread tedd
At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy and paste exactly what I just handed

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Andrew Ballard
On Thu, Oct 2, 2008 at 10:37 AM, tedd [EMAIL PROTECTED] wrote: To all: The code provided by nathan works for me as well. However, the problem is not easily explained, but I can demonstrate it -- try this: http://www.webbytedd.com/zzz/index.php * A complete listing of the code follows the

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Jay Moore
tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy and paste exactly what I

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Jay Moore
Jay Moore wrote: tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy and

RE: [PHP] SESSION array problems

2008-10-02 Thread Ford, Mike
On 01 October 2008 21:24, tedd advised: At 2:38 PM -0500 10/1/08, Afan Pasalic wrote: main reason - if you sort by first or last name you will lose index. this way is index always linked to first/last name. Your point is well taken, but I'm not sorting this. True, the arrays have a

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread tedd
Hi gang: As strange as it may seem, but when session variables are passed to another page (i.e., used) you cannot extract ALL OF THEM using a loop when the variable names you are using are the same as the SESSION index's names. In other words, you cannot do this: for ($i = 0; $i

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Thiago H. Pojda
Much as it pains me to ask this, you don't have REGISTER_GLOBALS on, do you? Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It must be. I just ran tedd's example in both scenarios. With register_globals = Off it works like a

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 11:02 AM, tedd [EMAIL PROTECTED] wrote: As strange as it may seem, but when session variables are passed to another page (i.e., used) you cannot extract ALL OF THEM using a loop when the variable names you are using are the same as the SESSION index's names. [snip!]

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Afan Pasalic
Andrew Ballard wrote: On Thu, Oct 2, 2008 at 10:37 AM, tedd [EMAIL PROTECTED] wrote: To all: The code provided by nathan works for me as well. However, the problem is not easily explained, but I can demonstrate it -- try this: http://www.webbytedd.com/zzz/index.php * A complete

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Afan Pasalic
tedd wrote: Hi gang: As strange as it may seem, but when session variables are passed to another page (i.e., used) you cannot extract ALL OF THEM using a loop when the variable names you are using are the same as the SESSION index's names. In other words, you cannot do this: for ($i = 0;

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Now, someone show me where that is documented? http://us3.php.net/register_globals offtopic rant Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sender as well. There's a pretty good chance if they originally posted to the

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Jim Lucas
tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy and paste exactly what I

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Andrew Ballard
On Thu, Oct 2, 2008 at 11:02 AM, tedd [EMAIL PROTECTED] wrote: Hi gang: As strange as it may seem, but when session variables are passed to another page (i.e., used) you cannot extract ALL OF THEM using a loop when the variable names you are using are the same as the SESSION index's names.

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 11:11 AM, Jay Moore [EMAIL PROTECTED] wrote: Now, someone show me where that is documented? http://us3.php.net/register_globals offtopic rant Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sender as

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Stut
On 2 Oct 2008, at 16:11, Jay Moore wrote: Now, someone show me where that is documented? http://us3.php.net/register_globals offtopic rant Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sender as well. There's a pretty

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Jim Lucas
Jim Lucas wrote: tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy and

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Nathan Rixham
Jim Lucas wrote: Jim Lucas wrote: tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a

Re: [PHP] SESSION array problems

2008-10-02 Thread Nathan Rixham
Ford, Mike wrote: On 01 October 2008 21:24, tedd advised: At 2:38 PM -0500 10/1/08, Afan Pasalic wrote: main reason - if you sort by first or last name you will lose index. this way is index always linked to first/last name. Your point is well taken, but I'm not sorting this. True, the

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Nathan Rixham
Daniel Brown wrote: On Thu, Oct 2, 2008 at 11:11 AM, Jay Moore [EMAIL PROTECTED] wrote: Now, someone show me where that is documented? http://us3.php.net/register_globals offtopic rant Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers seeking assistance of our replies because you can't

Re: [PHP] Re: SESSION array problems

2008-10-02 Thread Micah Gersten
Nathan Rixham wrote: tedd wrote: At 3:41 PM -0400 10/1/08, tedd wrote: What about: foreach ($_SESSION['user_id'] as $key = $value) { $last = $_SESSION['last_name'][$key]; $first = $_SESSION['first_name'][$key]; echo $last, $first; } Jay: Close, it produced: Array,

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Nathan Rixham
Jay Moore wrote: Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers seeking assistance of our replies

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 12:12 PM, Jay Moore [EMAIL PROTECTED] wrote: Why is it that it's not ok to top post, but it's perfectly fine to not subscribe to the list? It's extremely rude and arrogant to post to the list and expect people to respond to you personally. In fact, people get all up

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Stut
On 2 Oct 2008, at 17:12, Jay Moore wrote: Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread tedd
At 11:13 AM -0400 10/2/08, Andrew Ballard wrote: As several of us have suggested now, it's got to be register_globals. To all: Yes, register_globals was ON as reported by php-info and that was the problem. I also have other servers where register_globals is OFF and I don't have the problem

[PHP] Selecting all records between a date range

2008-10-02 Thread Jason Pruim
Hi Everyone, I am working on a app where I need to be able to select all the values from a database where the 'timein' field is between a certain date range... Essentially the last 7 days... here is the code that I am working with: $rangeBegin = strtotime(Last week thursday

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Per Jessen
Jason Pruim wrote: Hi Everyone, I am working on a app where I need to be able to select all the values from a database where the 'timein' field is between a certain date range... Essentially the last 7 days... SELECT * FROM timeStore WHERE timeinDATE_SUB(now(),INTERVAL 7 DAYS) /Per

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jim Lucas
Jason Pruim wrote: Hi Everyone, Could not perform query: Query was empty This would tell me that the variable that you are passing to your function call is either empty or not set. Maybe a typo. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 12:30 PM, tedd [EMAIL PROTECTED] wrote: I also have other servers where register_globals is OFF and I don't have the problem -- so indeed, that WAS the problem. It's INI_PERDIR, by the way, so you can set it with a local php.ini - or, if httpd.conf permits it, you

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Jim Lucas
Daniel Brown wrote: And fear not, Sergeant Sperling register_globals is deprecated and is removed as of PHP6. so long, farewell, bye bye -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas [EMAIL PROTECTED] wrote: so long, farewell, bye bye If you say so. Do you realize how many websites are going to break now? ;-P https://www.example.com/secure/shop.php?page=creditcardinfo.php ?php include($page); ? -- /Daniel P. Brown More

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 1:01 PM, Daniel Brown wrote: On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas [EMAIL PROTECTED] wrote: so long, farewell, bye bye If you say so. Do you realize how many websites are going to break now? ;-P

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 12:39 PM, Per Jessen wrote: Jason Pruim wrote: Hi Everyone, I am working on a app where I need to be able to select all the values from a database where the 'timein' field is between a certain date range... Essentially the last 7 days... SELECT * FROM timeStore

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Micah Gersten
That's probably a good thing: https://www.example.com/secure/shop.php?page=/etc/passwd ?php include($page); ? :-) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Daniel Brown wrote: On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas [EMAIL PROTECTED] wrote:

Re: [PHP] Re: SESSION array problems

2008-10-02 Thread tedd
At 11:14 AM -0500 10/2/08, Micah Gersten wrote: You really should get up to speed on PHP 5. Yeah, I'll be sure to tell me clients that. Sometimes you don't have a choice -- you have to work with what they got. Cheers, tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 12:46 PM, Jim Lucas wrote: Jason Pruim wrote: Hi Everyone, Could not perform query: Query was empty This would tell me that the variable that you are passing to your function call is either empty or not set. Maybe a typo. Hi Jim, Wouldn't that have shown up in

Re: [PHP] SESSION array problems reply all

2008-10-02 Thread tedd
At 11:12 AM -0500 10/2/08, Jay Moore wrote: I don't reply-all. If I have an answer that will help someone, I post it to the list. If they can't be bothered to subscribe to see my reply, tough cookies. The question went to the list; the response went to the list. (I feel just fine about

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 1:17 PM, Jason Pruim wrote: On Oct 2, 2008, at 12:46 PM, Jim Lucas wrote: Jason Pruim wrote: Hi Everyone, Could not perform query: Query was empty This would tell me that the variable that you are passing to your function call is either empty or not set. Maybe a

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 1:14 PM, Micah Gersten [EMAIL PROTECTED] wrote: That's probably a good thing: https://www.example.com/secure/shop.php?page=/etc/passwd Yeah, it was a joke. -- /Daniel P. Brown More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread tedd
At 12:50 PM -0400 10/2/08, Daniel Brown wrote: On Thu, Oct 2, 2008 at 12:30 PM, tedd [EMAIL PROTECTED] wrote: I also have other servers where register_globals is OFF and I don't have the problem -- so indeed, that WAS the problem. It's INI_PERDIR, by the way, so you can set it with

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Robbert van Andel
What is the actual code that you use to run the query. You've shown us how you set up the query but not more. Something like $result = mysql_query($query,$conn); Robbert On Thu, Oct 2, 2008 at 10:17 AM, Jason Pruim [EMAIL PROTECTED] wrote: On Oct 2, 2008, at 12:46 PM, Jim Lucas wrote:

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Dan Joseph
On Thu, Oct 2, 2008 at 12:35 PM, Jason Pruim [EMAIL PROTECTED] wrote: SQLTEST: SELECT * FROM `timeStore` WHERE`timein` BETWEEN 1222315200 AND 122292 Could not perform query: Query was empty [EMAIL PROTECTED] Put a ' around your timestamp numbers. I think that should

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Maciek Sokolewicz
Dan Joseph wrote: On Thu, Oct 2, 2008 at 12:35 PM, Jason Pruim [EMAIL PROTECTED] wrote: SQLTEST: SELECT * FROM `timeStore` WHERE`timein` BETWEEN 1222315200 AND 122292 Could not perform query: Query was empty [EMAIL PROTECTED] Put a ' around your timestamp numbers. I

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Micah Gersten
As was mine. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Daniel Brown wrote: On Thu, Oct 2, 2008 at 1:14 PM, Micah Gersten [EMAIL PROTECTED] wrote: That's probably a good thing: https://www.example.com/secure/shop.php?page=/etc/passwd

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Robbert van Andel
In the original message you were assigning the query to $SQLTEST, but in the code below you're using $sql. On Thu, Oct 2, 2008 at 10:40 AM, Jason Pruim [EMAIL PROTECTED] wrote: On Oct 2, 2008, at 1:31 PM, Robbert van Andel wrote: What is the actual code that you use to run the query. You've

Re: [PHP] Re: SESSION array problems

2008-10-02 Thread Micah Gersten
I was referring to Nathan's examples which you cut out of the post. function save_to_session( ) { global $userids , $first , $last; $_SESSION['user_id'] = $userids; $_SESSION['first_name'] = $first; $_SESSION['last_name']= $last; } Thank you, Micah Gersten onShore Networks Internal

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Jim Lucas
Daniel Brown wrote: On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas [EMAIL PROTECTED] wrote: so long, farewell, bye bye If you say so. Do you realize how many websites are going to break now? ;-P https://www.example.com/secure/shop.php?page=creditcardinfo.php ?php include($page);

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 1:31 PM, Robbert van Andel wrote: What is the actual code that you use to run the query. You've shown us how you set up the query but not more. Something like $result = mysql_query($query,$conn); Here is the code I use: $row[]= mysql_query($sql) or die(Could not

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jim Lucas
Jason Pruim wrote: On Oct 2, 2008, at 12:39 PM, Per Jessen wrote: Jason Pruim wrote: Hi Everyone, I am working on a app where I need to be able to select all the values from a database where the 'timein' field is between a certain date range... Essentially the last 7 days... SELECT

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Stut wrote: I see your confusion. This is a *mailing list* with a newsgroup gateway. If you're using it as a newsgroup then you have to accept that you're not using it the way it was meant to be used, and that almost always has side-effects. That being the case, I apologize for my

Re: [PHP] Selecting all records between a date range

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 1:45 PM, Robbert van Andel wrote: In the original message you were assigning the query to $SQLTEST, but in the code below you're using $sql. It was a clean up... I had a working query... $sql so in attempting to improve this I didn't want to lose the original sql so I

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 1:53 PM, Jim Lucas [EMAIL PROTECTED] wrote: But, you must admit that your example above shows a very good reason that it SHOULD break! Once again, it was a joke. I thought everyone would've realized that immediately. -- /Daniel P. Brown More full-root dedicated

Re: [PHP] Re: php server push

2008-10-02 Thread Bastien Koert
On Thu, Oct 2, 2008 at 6:53 AM, Nathan Rixham [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, (i hope this is the right place to ask questions like below) I am trying to use content type 'multipart/x-mixed-replace' to achive server pushing and I have the following piece of code, which

[PHP] PHP job available, Phoenix, AZ, USA

2008-10-02 Thread Matt Graham
I just saw this. If someone is in the Phoenix, AZ, USA area and wants a job writing/maintaining PHP code, this may be right for you. Contact details below: --- azcentral.com, Arizona's leading online source for up to date news and information, is seeking a Senior Online