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: h

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

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] $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 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 e

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 >> >> $sen

[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

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 session

[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 betwee

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 i

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

[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 cont

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

2011-03-05 Thread Daniel Brown
On Sat, Mar 5, 2011 at 05:42, David Hutto 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. Richard is par

[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] 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 comm

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 comm

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 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

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 to

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 wrote: > Hi, thanks a lot Alex and Larry for your very clear answer!

[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 poss

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 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 their conten

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 Richard Quadling
On 5 March 2011 05:44, Ashim Kapoor 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: > > function globals

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

2011-03-05 Thread Richard Quadling
On 4 March 2011 23:48, Ken Watkins 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 return the recor