php-general Digest 5 Mar 2011 05:41:35 -0000 Issue 7211

2011-03-04 Thread php-general-digest-help
php-general Digest 5 Mar 2011 05:41:35 - Issue 7211 Topics (messages 311667 through 311682): Re: Somewhat OT - Stored Procedures 311667 by: Nathan Rixham 311668 by: Nathan Rixham Re: Overriding session length in existing session? 311669 by: Scott Baker

RE: [PHP] Check for open file

2011-03-04 Thread Arno Kuhl
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thursday, March 03, 2011 2:03 PM To: sstap...@mnsi.net Cc: php-general@lists.php.net Subject: RE: [PHP] Check for open file As far as I was aware, if you're in the middle of writing to a file and

[PHP] Re: Help! Made a boo-boo encrypting credit cards

2011-03-04 Thread Nisse Engström
On Fri, 11 Feb 2011 14:42:18 -0800, Brian Dunning wrote: Hey all - I'm using mcrypt to store credit cards into MySQL. About 90% of them decrypt fine, but about 10% decrypt as nonsense (b1�\�JEÚU�A��� is a good example). Maybe there is a character that appears in about 10% of my encryptions

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

2011-03-04 Thread Marc Guay
This is called globally in *all* my scripts. In another script I'd really like to set the session to expire after the browser closes if a uses clicks public terminal or something. Howdy. Don't sessions expire when the browser closes as a rule? Do you mean the session cookie? Why not store

Re: [PHP] Re: Help! Made a boo-boo encrypting credit cards

2011-03-04 Thread Richard Quadling
2011/3/4 Nisse Engström news.nospam.0ixbt...@luden.se: On Fri, 11 Feb 2011 14:42:18 -0800, Brian Dunning wrote: Hey all - I'm using mcrypt to store credit cards into MySQL. About 90% of them decrypt fine, but about 10% decrypt as nonsense (b1�\�JEÚU�A��� is a good example). Maybe there is a

Re: [PHP] Somewhat OT - Stored Procedures

2011-03-04 Thread Richard Quadling
On 3 March 2011 18:30, Nathan Nobbe quickshif...@gmail.com wrote: Hey gang, (Yes Tedd, I like your style, when it pertains to how you address the list :)) I have a new curiosity that's arisen as a result of a new contract I'm working on, I'd like to bounce around some thoughts off the list

Re: [PHP] Check for open file

2011-03-04 Thread Richard Quadling
On 3 March 2011 19:59, Ashley M. Kirchner ash...@pcraft.com wrote:                Is there a clean or reliable way of checking to see if a file is still being written to before doing anything with it?                Here's the scenario: we have a Samba share that we can copy files to

Re: [PHP] Re: Help! Made a boo-boo encrypting credit cards

2011-03-04 Thread David Hutto
Maybe I missed something here, but aren't the cc's held by the merchant account provider, and just an id by you to recharge(recurring or once), which can be disputed. I ask because it's been a while since I had to look at this. So let the OP's question take precedence, and mine secondary if

Re: [PHP] Check for open file

2011-03-04 Thread Daniel Brown
On Thu, Mar 3, 2011 at 14:59, Ashley M. Kirchner ash...@pcraft.com wrote:                Can PHP detect this, or should I look into some delayed process of checking the file's modified time stamp versus current time and not touch the file till a certain threshold has been reached (say 30

Re: [PHP] Check for open file

2011-03-04 Thread Steve Staples
On Fri, 2011-03-04 at 09:55 -0500, Daniel Brown wrote: On Thu, Mar 3, 2011 at 14:59, Ashley M. Kirchner ash...@pcraft.com wrote: Can PHP detect this, or should I look into some delayed process of checking the file's modified time stamp versus current time and not touch the

[PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-04 Thread Nathan Rixham
Richard Sharp wrote: I have been banging my head trying to figure out how to delay $(document).ready() command until my php script finish running and load data into a csv file. Any ideas *which* PHP script? are you returning an HTML document then keeping the script going in the background,

[PHP] Re: Somewhat OT - Stored Procedures

2011-03-04 Thread Nathan Rixham
Hi Nathan, Nathan Nobbe wrote: Also, bear in mind that personally I tend to favor OO paradigms for application development so would prefer feedback that incorporates that tendency. Initial thoughts are Bad: . Not well suited for ORM, particularly procedures which return multiple result sets

Re: [PHP] Somewhat OT - Stored Procedures

2011-03-04 Thread Nathan Rixham
Richard Quadling wrote: At a fundamental level, my PHP code isn't concerning itself with any physical data structures. As much as possible my PHP code treats the sql data source as a processor ready to supply data in a standardized form (even hierarchical) and to accept data for storage (again

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

2011-03-04 Thread Paola Alvarez
Hi there!, I have been reading this list before but this is my first post. Reading some code from Symfony I got this: $this-getTable()-getColumns() ...when you can use this double method access?, I used before the regular $this-getTable(), but two?. I mean I have been trying but I got an error* *

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

2011-03-04 Thread alex
On 03/04/2011 09:25 PM, Paola Alvarez wrote: Hi there!, I have been reading this list before but this is my first post. Reading some code from Symfony I got this: $this-getTable()-getColumns() ...when you can use this double method access?, I used before the regular $this-getTable(), but two?. I

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

2011-03-04 Thread la...@garfieldtech.com
That's called method chaining. -getColumns() will get called on the object returned by -getTable(). That is, getTable() returns an object (presumably representing an SQL table, I guess), and that object has a getColumns() method, which you call. This is an extremely common style in

[PHP] Possible bug in PHP 5.3.5 with OAuth extension?

2011-03-04 Thread Daniel Hong
Hello, I'm using the PHP OAuth extension and running into a strange issue. I'm not sure if it's a bug in PHP 5.3.5, or if it's a bug in the OAuth extension when installed on a system with PHP 5.3.5. On a machine with PHP 5.3.5, when I call OAuth::fetch() with http method of POST, the debug info

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

2011-03-04 Thread Paola Alvarez
Hi, thanks a lot Alex and Larry for your very clear answer! Paola, On Fri, Mar 4, 2011 at 4:33 PM, la...@garfieldtech.com la...@garfieldtech.com wrote: That's called method chaining. -getColumns() will get called on the object returned by -getTable(). That is, getTable() returns an object

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

2011-03-04 Thread Marc Guay
I think that my suggestion is still a valid solution, someone correct me if I'm wrong. Let's say your code went like this: session_start(); // Check to see if the session variable has already been set, if not if (!isset($_SESSION['var'])){ // Check to see if it's been stored in a

[PHP] Returning a recordset to a desktop app

2011-03-04 Thread Ken Watkins
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 recordset to the desktop app. My question is simply this:

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

2011-03-04 Thread la...@garfieldtech.com
Assuming you mean that the PHP script is on a web server somewhere and the desktop app is hitting it over HTTP, it's no different than any other response. Anything you print will be sent back to the client, in this case your desktop a.. So if you want to send XML back, you'd build a string

[PHP] Re: Possible bug in PHP 5.3.5 with OAuth extension?

2011-03-04 Thread Daniel Hong
Correction: I stated the incorrect version of PHP that does not seem to have this issue. The version of PHP that works correctly is 5.3.2, not 5.3.3. Thanks, daniel On Fri, Mar 4, 2011 at 11:40 AM, Daniel Hong dan...@amagineinc.com wrote: Hello, I'm using the PHP OAuth extension and running

Re: [PHP] Re: Possible bug in PHP 5.3.5 with OAuth extension?

2011-03-04 Thread Jim Lucas
On 3/4/2011 5:18 PM, Daniel Hong wrote: Correction: I stated the incorrect version of PHP that does not seem to have this issue. The version of PHP that works correctly is 5.3.2, not 5.3.3. Can you give us an example of what you are doing? Jim Lucas Thanks, daniel On Fri, Mar 4,

Re: [PHP] Re: Possible bug in PHP 5.3.5 with OAuth extension?

2011-03-04 Thread Daniel Hong
Hi Jim, I'm using oauth to connect to Dropbox. The OAuth::getRequestToken() and OAuth::getAccessToken() works without a problem since (assuming) those are sent over the wire as a GET request. When I try to issue a fetch command, for example: $oauth-enableDebug()

Re: [PHP] Re: Possible bug in PHP 5.3.5 with OAuth extension?

2011-03-04 Thread Daniel Hong
Ok, I'm such a dud. Looks like someone had already reported this exact bug http://pecl.php.net/bugs/bug.php?id=22485 I actually was looking at the problematic method in the source, but didn't catch the problem. But now that someone has pointed it out, it's so obvious. I deserve a slap on the back

[PHP] $GLOBALS example script on php.net

2011-03-04 Thread Ashim Kapoor
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 function globals() { $globals = $GLOBALS; foreach (array(

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

2011-03-04 Thread clancy_1
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 date(), complaining about a missing parameter. The manual states that the second parameter is optional, and even phpinfo doesn't know

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

2011-03-04 Thread Simon J Welsh
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 date(), complaining about a missing parameter. The manual states that the