php-general Digest 5 Mar 2011 18:03:03 -0000 Issue 7212

2011-03-05 Thread php-general-digest-help
php-general Digest 5 Mar 2011 18:03:03 - Issue 7212 Topics (messages 311683 through 311699): $GLOBALS example script on php.net 311683 by: Ashim Kapoor 311687 by: Richard Quadling 311688 by: Ashim Kapoor 311689 by: David Hutto 311697 by: Daniel Brown

Re: [PHP] Returning a recordset to a desktop app

2011-03-05 Thread Richard Quadling
On 4 March 2011 23:48, Ken Watkins k...@atlanticbb.net wrote: Hi All. I have a Windows desktop app that I created using Visual Foxpro (a database app). I want to write a PHP script that I will call from my desktop app. The script will simply query a MySQL database on my web server and

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Richard Quadling
On 5 March 2011 05:44, Ashim Kapoor ashimkap...@gmail.com wrote: Dear all, I was reading this page http://php.net/manual/en/reserved.variables.globals.php and  I found the following script there : Here's a function which returns an array of all user defined global variables: ?php

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Ashim Kapoor
I'll remove it. How does one remove user notes from php.net ? Thank you, Ashim

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread David Hutto
On Sat, Mar 5, 2011 at 5:10 AM, Ashim Kapoor ashimkap...@gmail.com wrote: I'll remove it.  How does one remove user notes from  php.net ? I'd guest they had been granted access to the php.net page editor, but I may be wrong. Not that that site hasn't been scraped by other sites and added to

[PHP] Re: Somewhat OT - Stored Procedures

2011-03-05 Thread Florin Jurcovici
Hi. I would always recommend stored procedures, as long as there are a very few rules obeyed: - keep them simple - they should mostly implement just CRUD operations plus application-specific searches, and should not encapsulate any other logic - use just portable SQL (well, as long as this is

Re: [PHP] Double method access (Hi everyone! :))

2011-03-05 Thread Vivek
I also totally agree with Larry that if used judiciously then method/object chaining can give great results, else otherwise, can create a lot of overhead in the application. Netemp On Sat, Mar 5, 2011 at 1:14 AM, Paola Alvarez paola.alvare...@gmail.comwrote: Hi, thanks a lot Alex and Larry

Re: [PHP] Returning a recordset to a desktop app

2011-03-05 Thread Ken Watkins
Larry, Yes, the PHP script will reside on my web server along with the MySQL database. I assumed that I would call the script over HTTP, but I guess that is part of my question too. Foxpro allows you to embed controls in its forms, and one of them is a browser control. But I don't really want

Re: [PHP] Returning a recordset to a desktop app

2011-03-05 Thread Ken Watkins
On 3/5/2011 4:30 AM, Richard Quadling wrote: On 4 March 2011 23:48, Ken Watkins k...@atlanticbb.net wrote: Hi All. I have a Windows desktop app that I created using Visual Foxpro (a database app). I want to write a PHP script that I will call from my desktop app. The script will simply

Re: [PHP] Re: Somewhat OT - Stored Procedures

2011-03-05 Thread NetEmp
Hi Team I very much agree with the points shared by Florin (esp. the two rules). But unfortunately, these rules are not standards and that is where the real problem lies. The injudicious use of SPs leads to un-manageable code which is rarely portable (real life situations J which are too

Re: [PHP] Re: Somewhat OT - Stored Procedures

2011-03-05 Thread NetEmp
Hi Team I very much agree with the points shared by Florin (esp. the two rules). But unfortunately, these rules are not standards and that is where the real problem lies. The injudicious use of SPs leads to un-manageable code which is rarely portable (real life situations J which are too

[PHP] Regex for extracting quoted strings

2011-03-05 Thread Mark Kelly
Hi. I'm hoping someone can help me extract text between double quotes from a string. $regex = 'some magic'; $r = preg_match($regex, $sentence, $phrases); So, if $sentence = 'Dave said This is it. Nope, that is the wrong colour she replied.'; I want $phrases to contain 'This is it' and

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Daniel Brown
On Sat, Mar 5, 2011 at 05:42, David Hutto smokefl...@gmail.com wrote: I'd guest they had been granted access to the php.net page editor, but I may be wrong. Not that that site hasn't been scraped by other sites and added to their content, or been catalogued by google cache or alexis, etc.

[PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Nathan Rixham
Mark Kelly wrote: Hi. I'm hoping someone can help me extract text between double quotes from a string. $regex = 'some magic'; $r = preg_match($regex, $sentence, $phrases); So, if $sentence = 'Dave said This is it. Nope, that is the wrong colour she replied.'; I want $phrases to contain

Re: [PHP] Overriding session length in existing session?

2011-03-05 Thread tedd
At 5:00 PM -0800 3/3/11, Scott Baker wrote: On 03/03/2011 04:31 PM, tedd wrote: Simple answer -- put session_start() at the start of your code -- first line. Of index.php or header.php? You lost me. -- Scott Baker - Canby Telcom Scott: The statement should be at the start of every php

Re: [PHP] Overriding session length in existing session?

2011-03-05 Thread Marc Guay
The statement should be at the start of every php file that has php code in it. Hi Tedd, Normally I'd agree with this but having never used the function session_set_cookie_params() before, I looked it up, and the manual says to put it before session_start(). Set cookie parameters defined in

[PHP] Is 5.3.5 really that much slower than 5.2?

2011-03-05 Thread Joel
Hi list, I've been getting my code base ready to upgrade from 5.2 to 5.3 for all the great features and supposed performance and memory improvements, but with regular usage (ie. on my production servers) I just don't see those improvements. With 5.2 pages load on average of 2ms and consume

Re: [PHP] Overriding session length in existing session?

2011-03-05 Thread tedd
At 1:29 PM -0500 3/5/11, Marc Guay wrote: The statement should be at the start of every php file that has php code in it. Hi Tedd, Normally I'd agree with this but having never used the function session_set_cookie_params() before, I looked it up, and the manual says to put it before

[PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Shawn McKenzie
On 03/05/2011 09:26 AM, Mark Kelly wrote: Hi. I'm hoping someone can help me extract text between double quotes from a string. $regex = 'some magic'; $r = preg_match($regex, $sentence, $phrases); So, if $sentence = 'Dave said This is it. Nope, that is the wrong colour she

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Simon J Welsh
On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote: On 03/05/2011 09:26 AM, Mark Kelly wrote: Hi. I'm hoping someone can help me extract text between double quotes from a string. $regex = 'some magic'; $r = preg_match($regex, $sentence, $phrases); So, if $sentence = 'Dave said

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Mark Kelly
Hi. Thanks for all the replies. On Saturday 05 Mar 2011 at 22:11 Simon J Welsh wrote: On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote: $regex = '/([^]+)/'; Shawn, this regex gets me two copies of each string - one with and one without the double quotes - as did the one Nathan posted

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Ashim Kapoor
Dear Ashley, I do follow the part when it creates a local copy of $GLOBALS. When it unsets them, is there a subtlety of unset that it ONLY unsets system defined entries? Could you please explain this ? Thank you, Ashim

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Shuo
Maybe this will help. $regex = '/(?=)[^.]*(?=)/'; $r = preg_match_all($regex, $sentence, $phrases);

Re: [PHP] PHP5.3.5: error message for date()

2011-03-05 Thread Roger Riordan
On Sat, 5 Mar 2011 20:42:07 +1300, si...@welsh.co.nz (Simon J Welsh) wrote: On 5/03/2011, at 8:29 PM, clanc...@cybec.com.au wrote: After a long battle to get my system back on air after a hard disk crash, I got PHP 5.3.5 running under Apache 2.2.3. I now get a diagnostic every time I call

Re: [PHP] PHP5.3.5: error message for date()

2011-03-05 Thread Roger Riordan
PS. What is date.sunrise_zenith? I am surprised that PHP contains a function to return the time of sunrise for a given location, but I thought that latitude, longitude, date and time zone would be all you had to know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: