Re: [PHP] Carriage Returns

2009-11-08 Thread Eddie Drapkin
On Sun, Nov 8, 2009 at 11:40 AM, John List johnl...@gulfbridge.net wrote: Dan Shirah wrote: Hello all, Basically I have a form with a textarea.  The user can enter up to 5,000 characters in this text area. If the user just types text like: This is a test. And saves it, there's no

Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-08 Thread Eddie Drapkin
On Sun, Nov 8, 2009 at 2:47 PM, Tony Marston t...@marston-home.demon.co.uk wrote: It is for the better? How can you justify that? It is a problem that will cause a lot of headaches for a lot of users, yet the solution which I have proposed will remove that problem with only very little effort,

Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-08 Thread Eddie Drapkin
On Sun, Nov 8, 2009 at 4:13 PM, Tony Marston t...@marston-home.demon.co.uk wrote: That's an amateur fudge, not a professional fix. Besides, what happens if your hosting company won't let you install PECL extensions? -- Tony Marston http://www.tonymarston.net http://www.radicore.org Eddie

Re: [PHP] OO method inside a variable

2009-11-04 Thread Eddie Drapkin
On Wed, Nov 4, 2009 at 4:36 PM, simone.na...@ptvonline.it wrote: Hi everybody, i'm trying to apply a method to an object getting its name from a variable, that i obtain parsing an XML file. For example: $object = new Class; $method = row(); #I'm getting this from the XML parser

Re: [PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Eddie Drapkin
On Thu, Oct 29, 2009 at 10:23 AM, Martin Scotta martinsco...@gmail.com wrote: On Thu, Oct 29, 2009 at 11:11 AM, Robert Cummings rob...@interjinn.comwrote: Ashley Sheridan wrote: On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote:  How is the following evaluated: [code] if ($data =

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Eddie Drapkin
On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett t...@miramedia.co.uk wrote: Hello I have installed:  - libevent  - libmemcached (http://tangent.org/552/libmemcached.html)  - Done a PECL installation (pecl download memcached, phpize ./configure make)  - memcached cat

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Eddie Drapkin
On Mon, Oct 26, 2009 at 11:59 AM, Tom Barrett t...@miramedia.co.uk wrote: 2009/10/26 Eddie Drapkin oorza...@gmail.com: On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett t...@miramedia.co.uk wrote: Hello I have installed:  - libevent  - libmemcached (http://tangent.org/552/libmemcached.html

Re: [PHP] (nginx) fcgi+PHP+memcache on RedHat: Class 'Memcache' not found...

2009-10-26 Thread Eddie Drapkin
On Mon, Oct 26, 2009 at 12:22 PM, Tom Barrett t...@miramedia.co.uk wrote: 2009/10/26 Eddie Drapkin oorza...@gmail.com: On Mon, Oct 26, 2009 at 11:59 AM, Tom Barrett t...@miramedia.co.uk wrote: 2009/10/26 Eddie Drapkin oorza...@gmail.com: On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett t

Re: [PHP] Is there any way to get all the function name being called in a process?

2009-10-23 Thread Eddie Drapkin
There's xdebug, as mentioned, that'll do it as an extension. What you REALLY probably are looking for is http://php.net/debug_backtrace And what kind of reverse engineering would you be doing without reflection? ( http://php.net/reflection ) ;] -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Limit query/function time

2009-10-22 Thread Eddie Drapkin
On Thu, Oct 22, 2009 at 4:14 PM, Philip Thompson philthath...@gmail.com wrote: Hi all. I'm running into a random issue where sometimes it take several minutes (up to 10 or 15) to complete a query. According to 1 or 2 references, this may be a mysql bug. These links explain the similar problem

Re: [PHP] Web Service Server in PHP

2009-10-21 Thread Eddie Drapkin
On Wed, Oct 21, 2009 at 9:26 PM, Daniel Echalar dany...@gmail.com wrote: Hi, Does anybody knows a web services server based on PHP? The only one a see is Nusoap, but even for this one i can't find the webpage to see the documentation. by the way, i'm trying to develop an application using

Re: [PHP] PEAR segfaulting

2009-10-19 Thread Eddie Drapkin
On Mon, Oct 19, 2009 at 1:28 PM, Ashley M. Kirchner ash...@pcraft.com wrote: Thodoris wrote: Obviously something went wrong while installing PHP and you will have to find this because this probably the reason pear segfaults. Did you run make test before installing? (makes sure everything

Re: [PHP] PEAR segfaulting

2009-10-19 Thread Eddie Drapkin
On Mon, Oct 19, 2009 at 1:35 PM, Ashley M. Kirchner ash...@pcraft.com wrote: Eddie Drapkin wrote: Have you tried running pear upgrade pear?   Yep, but I'll do it again for you to see: pear -vvv upgrade pear Warning: file_exists(): Unable to find the wrapper channel

Re: [PHP] exec() confused by a specially crafted string

2009-10-12 Thread Eddie Drapkin
On Mon, Oct 12, 2009 at 2:10 PM, Soner Tari so...@comixwall.org wrote: On Mon, 2009-10-12 at 13:21 -0300, Jonathan Tapicer wrote: Confirmed, it also happens to me on Linux, PHP version: PHP 5.2.4-2ubuntu5.7 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 2009 19:52:39) Copyright (c)

Re: [PHP] Need unrounded precision

2009-10-11 Thread Eddie Drapkin
On Fri, Jan 1, 2010 at 9:20 PM, Andre Dubuc aajdu...@webhart.net wrote: Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. I've tried a few methods to accomplish this. If I use 'ini_set' I would need to know the number of

Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo

2009-10-07 Thread Eddie Drapkin
On Tue, Oct 6, 2009 at 6:59 PM, Andrea Giammarchi an_...@hotmail.com wrote: So while we can debate computing considerations of today, tomorrow those will be less important. That was the point I was making. Why not focus on things that make significant difference and let the insignificant

Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo

2009-10-07 Thread Eddie Drapkin
On Wed, Oct 7, 2009 at 11:36 AM, Tom Worster f...@thefsb.org wrote: just yesterday i was reading through this wonderful and very funny presentation:    http://talks.php.net/show/froscon08/0 for me it really drove home the message (among others) that it makes sense to find out where the real

Re: [PHP] How do YOU set default function/method params?

2009-10-05 Thread Eddie Drapkin
On Mon, Oct 5, 2009 at 8:48 PM, Jim Lucas li...@cmsws.com wrote: Here is a problem that I have had for years now.  I have been trying to come up with the perfect solution for this problem.  But, I have come down to two different methods for solving it. Here is the problem... ?php

Re: [PHP] strtotime strangeness

2009-10-04 Thread Eddie Drapkin
On Sun, Oct 4, 2009 at 3:22 PM, Floyd Resler fres...@adex-intl.com wrote: Yeah, the ;Y was a typo in my email.  That's what happens while trying to type while watching my Colts play! Thanks! Floyd Go Colts! At least you get to watch it, I have to follow along on sports sites! -- PHP

Re: [PHP] Where's my memory going?!

2009-09-29 Thread Eddie Drapkin
On Tue, Sep 29, 2009 at 6:51 PM, Jim Lucas li...@cmsws.com wrote: Philip Thompson wrote: On Sep 29, 2009, at 4:38 PM, Jim Lucas wrote: Philip Thompson wrote: On Sep 28, 2009, at 4:40 PM, jeff brown wrote: Yes, that's the best way to clean up after yourself.  And you really should use that

Re: [PHP] Random Flash Movies

2009-09-20 Thread Eddie Drapkin
On Sun, Sep 20, 2009 at 11:33 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Sun, 2009-09-20 at 11:30 -0400, Gary wrote: A question was posted on another board that the poster wanted random flash movies to display as the page is reloaded.  I posted the script below and said I thought

Re: [PHP] moving to quad core

2009-09-15 Thread Eddie Drapkin
On Tue, Sep 15, 2009 at 11:35 AM, Rahul S. Johari sleepwal...@rahulsjohari.com wrote: On 9/15/09 10:54 AM, Andres Gonzalez and...@packetstorm.com wrote: I have an application developed that uses alot of PHP. Currently, it is running on a Ubuntu 8.04 , single core CPU host.  We are moving to

Re: [PHP] APC - Upload progress problem. apc

2009-09-14 Thread Eddie Drapkin
On Mon, Sep 14, 2009 at 5:39 AM, Phred White phpl...@planetphred.com wrote: Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-13 Thread Eddie Drapkin
What does this offer that a real debugger, like xdebug, doesn't? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-13 Thread Eddie Drapkin
On Sun, Sep 13, 2009 at 5:01 PM, Andrea Giammarchi an_...@hotmail.com wrote: Hosting support, since it is 100% php with zero dependencies and zero config effort plus the ability do debug directly via console, unit testing via Selenium and/or others, and it does not require manual error catch

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-13 Thread Eddie Drapkin
Right, errors should never be exposed, and error_reporting should be 0 in production but log function and the fact you can move Formaldehyde with the application means it does not require extra effort. No, display_errors should be turned off (with log_errors turned on) and error_reporting

Re: [PHP] APC - Upload progress problem. apc

2009-09-13 Thread Eddie Drapkin
On Sun, Sep 13, 2009 at 8:29 PM, Phred White phpl...@planetphred.com wrote: On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White phpl...@planetphred.com wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool

Re: [PHP] APC - Upload progress problem. apc

2009-09-13 Thread Eddie Drapkin
On Sun, Sep 13, 2009 at 9:38 PM, Phred White phpl...@planetphred.com wrote: On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 8:29 PM, Phred White phpl...@planetphred.com wrote: On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM

Re: [PHP] APC - Upload progress problem. apc

2009-09-11 Thread Eddie Drapkin
On Fri, Sep 11, 2009 at 1:02 PM, Phred White phpl...@planetphred.com wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc

Re: [PHP] upgrade php4 to php5

2009-09-10 Thread Eddie Drapkin
On Thu, Sep 10, 2009 at 2:51 AM, madunix madu...@gmail.com wrote: how can i upgrade my php4 to php5? [r...@intra /]# uname -a Linux intra 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux /usr/local/apache/bin/apachectl stop cd /downloads/ cd php-4.4.3 ./configure

Re: [PHP] String scrambling

2009-09-10 Thread Eddie Drapkin
On Thu, Sep 10, 2009 at 8:57 PM, Ron Piggott ron@actsministries.org wrote: Is there a function in PHP which scrambles strings? Example: $string = Hello; Output might be: ehlol Ron http://www.php.net/manual/en/function.str-shuffle.php -- PHP General Mailing List

Re: [PHP] XML. Prevent from turning into lt;

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 9:33 AM, Matthew Croud m...@obviousdigital.com wrote: On 9 Sep 2009, at 14:26, Bastien Koert wrote: On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croudm...@obviousdigital.com wrote: Hiya, I'm writing an app that let's my client upload images, the image html code is added

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia apseudouto...@gmail.com wrote: Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database. I'm using the real BSD socket functions, not fsock. The script runs

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:53 PM, APseudoUtopia apseudouto...@gmail.com wrote: On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkinoorza...@gmail.com wrote: On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia apseudouto...@gmail.com wrote: Hey list, I have a php cli script that listens on a UDP socket

Re: [PHP] Renaming a Directory

2009-09-08 Thread Eddie Drapkin
On Tue, Sep 8, 2009 at 5:39 PM, Floyd Reslerfres...@adex-intl.com wrote: How can I rename a directory with files in it?  The rename function gives me a directory not empty error.  I know I could do it be creating the directory, moving the files, and then deleting the old one.  Is there an

Re: [PHP] Renaming a Directory

2009-09-08 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 12:08 AM, Paul M Fosterpa...@quillandmouse.com wrote: On Tue, Sep 08, 2009 at 05:39:43PM -0400, Floyd Resler wrote: How can I rename a directory with files in it?  The rename function gives me a directory not empty error.  I know I could do it be creating the directory,

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Eddie Drapkin
On Mon, Sep 7, 2009 at 3:14 PM, Bobby Pejmanbpej...@gmail.com wrote: Hi, I noticed that the following returns a 1. echo (12) ? True : False I was under the impression that true/false are of type boolean and not int.   But in php anything other than 0 translates to true, meaning a 1.  What

Re: [PHP] How to take output from an include, and embed it into a variable?

2009-09-07 Thread Eddie Drapkin
On Tue, Sep 8, 2009 at 12:35 AM, Rob Gouldgould...@mac.com wrote: I have an invoice table that is drawn on a number of pages, so I have all the logic in an include-file like this: include invoicetable_bottom.php; However, now I'm needing to take the output from that include file and pass

Re: [PHP] Sorting an array of sub-arrays based on a sub-array's key

2009-09-06 Thread Eddie Drapkin
On Sun, Sep 6, 2009 at 6:45 PM, James Colanninoja...@colannino.org wrote: Hey everyone.  I have an array that looks like this: $main_array[0] = array('key1' = 'vala'); $main_array[1] = array('key1' = 'valb'); etc. I want to sort the main array based on the value of key1 for each sub-array.

Re: [PHP] Who kown this memcache_get_stats function ?

2009-09-05 Thread Eddie Drapkin
On Sun, Sep 6, 2009 at 12:16 AM, hack988 hack988hack...@dev.htwap.com wrote: Nobody Kown this?This is my second question in this mail-list :(.I don't kown why it's no reply by anybody. 2009/9/5 hack988 hack988 hack...@dev.htwap.com: I found memcache_get_stats for memcached in some php code.

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-04 Thread Eddie Drapkin
On Fri, Sep 4, 2009 at 12:02 PM, Lupus Michaelismickael+...@lupusmic.org wrote: Ashley Sheridan a écrit : You'll have far greater performance issues if you retrieve all those records and attempt to do the same thing inside of PHP...  It's why I speak about « avoiding » and not « bannishing

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-03 Thread Eddie Drapkin
On Thu, Sep 3, 2009 at 3:17 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Thu, 2009-09-03 at 12:12 -0700, sono...@fannullone.us wrote:       Thanks to everyone who has responded.  After reading everyone's response, I think I have a very simple way to solve my problem.       Using my

Re: [PHP] Fwd: Current PHP Global Network Statistics

2009-09-01 Thread Eddie Drapkin
On Tue, Sep 1, 2009 at 2:12 PM, Daniel Browndanbr...@php.net wrote:    Guys and gals (particularly those of you interested in the trends and metrics of PHP), here's a forwarded copy of an email I just fired off to the mirrors around the world after completion of the first of three phases of an

Re: [PHP] OO and Singleton class

2009-09-01 Thread Eddie Drapkin
On Tue, Sep 1, 2009 at 5:16 PM, Paul M Fosterpa...@quillandmouse.com wrote: I'm a little fuzzy on some of the PHP implementation details for some stuff. In PHP (5 = phpversion() 5.3), I'd like a configuration class which can only effectively be instantiated once. Will the following code do

Re: [PHP] Re: Directory Listing

2009-08-26 Thread Eddie Drapkin
On Wed, Aug 26, 2009 at 9:45 AM, hack988 hack988hack...@dev.htwap.com wrote: I'm write a php file for you = define('Line_End', (PHP_OS == 'WINNT')?\r\n:\n); clearstatcache(); $mylist=array(); listdir(F:\\Programming\\Web\\php,$mylist); function

Re: [PHP] Case Insensativity in String Comparisons

2009-08-25 Thread Eddie Drapkin
On Tue, Aug 25, 2009 at 12:48 PM, Ben Millerbiprel...@gmail.com wrote: Is there a simple to way to compare two strings with case insensitivity so that the following will return true? $foo = Arnold; $bar = arnold; If($foo == $bar) { } Thanks. -- PHP General Mailing List

Re: [PHP] is there a better way to know from which php file the requestcomes from ??

2009-08-17 Thread Eddie Drapkin
On Mon, Aug 17, 2009 at 5:31 PM, Shawn McKenzienos...@mckenzies.net wrote: nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter

Re: [PHP] Problem with memcache - help needed

2009-08-14 Thread Eddie Drapkin
On Fri, Aug 14, 2009 at 7:14 AM, Jean Michel Malatrayjm.malat...@schaefer-shop.de wrote: Hello folk! Currently, we use memcached as caching solution. We provide a link to 3 servers, a server-2x the Memcache daemon is started (2 different ports (depending 4GB) 192.168.0.1:11211 (4 GB)

Re: [PHP] PHP Byte Code Compiler

2009-08-14 Thread Eddie Drapkin
On Fri, Aug 14, 2009 at 11:58 AM, Robert Cummingsrob...@interjinn.com wrote: Ralph Deffke wrote: quite a while I'm thinking for what could that be used. also in the documentation there are no posts, has anybody ever played arround with if? There are several: APC, eAccelerator, Zend,

Re: [PHP] PHP Byte Code Compiler

2009-08-14 Thread Eddie Drapkin
On Fri, Aug 14, 2009 at 12:24 PM, Robert Cummingsrob...@interjinn.com wrote: Eddie Drapkin wrote: On Fri, Aug 14, 2009 at 11:58 AM, Robert Cummingsrob...@interjinn.com wrote: Ralph Deffke wrote: quite a while I'm thinking for what could that be used. also in the documentation

Re: [PHP] Embedding foreach loops

2009-08-11 Thread Eddie Drapkin
On Tue, Aug 11, 2009 at 3:56 PM, teddtedd.sperl...@gmail.com wrote: At 12:44 PM -0700 8/11/09, Ben Dunlap wrote: This is probably flame-war tinder, so I'll try to tread more delicately in the future. Next you know we'll be on the ternary operator and which is better, Mac or Windows. ;-) Ben

Re: [PHP] reason for a Notice:.. on one site but not another? (Same code.)

2009-08-10 Thread Eddie Drapkin
On Mon, Aug 10, 2009 at 1:07 PM, Martin Scottamartinsco...@gmail.com wrote: Why do you all always use isset? Why do you don't use array_key_exists instead? is it a more semantic solution? ?php $key = 'UserWishesDateRange'; # just to make statement shorter if( array_key_exists($key, $_POST

Re: [PHP] Re: PHP programming strategy

2009-08-09 Thread Eddie Drapkin
On Sun, Aug 9, 2009 at 6:33 PM, teddtedd.sperl...@gmail.com wrote: At 1:05 PM +0100 8/9/09, Ashley Sheridan wrote: On Sun, 2009-08-09 at 07:55 -0400, tedd wrote:   But, as it was said, IE's have problems with first-child rules. How does IE8 fare with selectors in CSS? Thanks, Ash tedd

Re: [PHP] ZCE Question

2009-08-08 Thread Eddie Drapkin
On Sat, Aug 8, 2009 at 4:18 PM, Augusto Flavioafla...@gmail.com wrote: Has someone an clue about this zce question: The following is a common XML structure used in service oriented architectures, what does it represent? ?xml version=1.0? methodCall  methodNamemyMethod/methodName  params

Re: [PHP] PHP 6 and MySQL 5 for Dynamic Web Sites Book

2009-08-06 Thread Eddie Drapkin
On Thu, Aug 6, 2009 at 11:32 AM, teddtedd.sperl...@gmail.com wrote: At 5:34 PM -0700 8/5/09, sono...@fannullone.us wrote:        Has anyone read this book by Larry Ullman yet?  If so, what do you think about it?  I'm looking for a well-rounded book that covers PHP for e-commerce websites and

Re: [PHP] PHP 6 and MySQL 5 for Dynamic Web Sites Book

2009-08-06 Thread Eddie Drapkin
On Thu, Aug 6, 2009 at 12:24 PM, Tony Marstont...@marston-home.demon.co.uk wrote: Eddie Drapkin oorza...@gmail.com wrote in message news:68de37340908060841x129a9096w6c0907f85614c...@mail.gmail.com... snip Does no one see the inherent issues in buying a book about a not-feature-complete

Re: [PHP] PHP 6 and MySQL 5 for Dynamic Web Sites Book

2009-08-06 Thread Eddie Drapkin
On Thu, Aug 6, 2009 at 3:22 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Thu, 2009-08-06 at 20:16 +0100, Tony Marston wrote: Don't be so pedantic. PHP 6 does not exist in a live, production-ready version. It is still under development and has not even reached the beta stage. Anyone

Re: [PHP] PHP programming strategy

2009-08-02 Thread Eddie Drapkin
On Sun, Aug 2, 2009 at 2:24 PM, Larry Garfieldla...@garfieldtech.com wrote: On Saturday 01 August 2009 11:01:11 pm Eddie Drapkin wrote: I actually benchmarked that once.  I had a reasonably large PHP file that was, in fact, over 50% docblocks.  That's not even counting inline comments

Re: [PHP] PHP programming strategy

2009-08-01 Thread Eddie Drapkin
I actually benchmarked that once.  I had a reasonably large PHP file that was, in fact, over 50% docblocks.  That's not even counting inline comments.  While trying to find things to optimize, removing about 800 lines worth of comments (all of the docblocks) did, in fact, produce a noticeable

Re: [PHP] Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-28 Thread Eddie Drapkin
On Tue, Jul 28, 2009 at 2:48 PM, Matt Neimeyerm...@neimeyer.org wrote: Background: I'm converting a webapp from Visual FoxPro as a backend to MySQL... However one part of our app (a system status checker) is common code between the versions. I've got the following function... In English (in

Re: [PHP] OOP Design Software

2009-07-26 Thread Eddie Drapkin
On Sun, Jul 26, 2009 at 12:54 PM, Caner BULUTcaner...@gmail.com wrote: Hi Daniel, You can use Eclipse with plugin PDT or Zend Studio. They can track your classes and methods. They can remember your methods and classes also they have code completion abilities. Thanks Caner. -Original

[PHP] Renaming all variables in a repository

2009-07-23 Thread Eddie Drapkin
Hey all, we've got a repository here at work, with something like 55,000 files in it. For the last few years, we've been naming $variables_like_this and functions_the_same($way_too). And now we've decided to switch to camelCasing everything and I've been tasked with somehow determining if it's

[PHP] Re: Renaming all variables in a repository

2009-07-23 Thread Eddie Drapkin
On Thu, Jul 23, 2009 at 1:50 PM, Greg Beaverg...@chiaraquartet.net wrote: Eddie Drapkin wrote: Hey all, we've got a repository here at work, with something like 55,000 files in it. For the last few years, we've been naming $variables_like_this and functions_the_same($way_too).  And now we've

Re: [PHP] Replace in a string with regex

2009-07-22 Thread Eddie Drapkin
On Wed, Jul 22, 2009 at 8:02 AM, rszeusrsz...@gmail.com wrote: Hello, I’m tryng to make some replacements on a string. Everything goês fine until the regular expression. $file = screens/temp/7a45gfdi6icpan1jtb1j99o925_1_main.jpg; echo $a =  str_replace(array(7a45gfdi6icpan1jtb1j99o925,

Re: [PHP] Replace in a string with regex

2009-07-22 Thread Eddie Drapkin
On Wed, Jul 22, 2009 at 9:07 AM, rszeusrsz...@gmail.com wrote: Hi. It Works to remove the _1 but it doesn't replace '7a45gfdi6icpan1jtb1j99o925' for 'test' Thank you -Mensagem original- De: Eddie Drapkin [mailto:oorza...@gmail.com] Enviada: quarta-feira, 22 de Julho de 2009 13:11

Re: [PHP] Replace in a string with regex

2009-07-22 Thread Eddie Drapkin
. echo preg_replace('#(screens/)temp/.+?_1(_main\.jpg)#',                   $1{$id}$3,                   $file); I am confusing and '. Thank you -Mensagem original- De: Eddie Drapkin [mailto:oorza...@gmail.com] Enviada: quarta-feira, 22 de Julho de 2009 14:12 Para

Re: [PHP] Client Side PHP

2009-07-22 Thread Eddie Drapkin
On Wed, Jul 22, 2009 at 4:03 PM, Leninle...@phpxperts.net wrote: www.phpjs.org That's hilarious! Thanks for that laugh =) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] need to get .html files parsed by PHP. -- WAS: why does PHP parse *.html files in one subdir/ but not in another?

2009-07-19 Thread Eddie Drapkin
On Sun, Jul 19, 2009 at 2:53 AM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Sat, 2009-07-18 at 23:09 -0600, Govinda wrote: i never used x-mapp-php5, but most of a forums say it is specific to 1and1 hosting service. php recommends application/x-httpd-php

Re: [PHP] Scope of Variables and use of global and this-var

2009-07-16 Thread Eddie Drapkin
On Thu, Jul 16, 2009 at 9:53 AM, Govindagovinda.webdnat...@gmail.com wrote: On Jul 15, 2009, at 3:28 PM, tedd wrote: My way -- every time I open a database, I do so by including the configuration.php file that holds the logon/password et other data to connect with the database. When I'm done

Re: [PHP] MySql Injection advice

2009-07-14 Thread Eddie Drapkin
Things I have used prepared statements for: 1. SELECT 2. UPDATE 3. INSERT 4. DELETE 5. Stored procedures Things I am aware of that prepared statements are not capable of doing: What have you read that prepared statements can't do? I've not heard of anything, nor have I encountered anything,

Re: [PHP] MySQL Queries in PHP

2009-07-14 Thread Eddie Drapkin
On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubbtomch...@gmail.com wrote: Hi List, Just wanted to pick your brains please? I'm trying to standardise on the way I query databases and move away from the Dreamweaver built-in functions (which I know you all hate!) ;) I've been on this list for about 5

Re: [PHP] php.ini and cli

2009-07-13 Thread Eddie Drapkin
On Mon, Jul 13, 2009 at 4:48 AM, Ashley Sheridana...@ashleysheridan.co.uk wrote: Hi All, Just a quick question. When I make changes in the php.ini, to take effect, I need to restart the Apache (or other web server) service. What happens with PHP CLI? Is the php.ini parsed each time the script

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-12 Thread Eddie Drapkin
On Sun, Jul 12, 2009 at 3:05 AM, Leninle...@phpxperts.net wrote: On Sun, Jul 12, 2009 at 6:49 AM, Daniel Brown danbr...@php.net wrote: Sorry for TOP posting This mailing list also don't force us to be good :)    FORCE, no.  ENCOURAGE, yes.  Particularly in long threads like this

Re: [PHP] A prepared statements question

2009-07-12 Thread Eddie Drapkin
 if (   $link = mysqli_connect($hostname, $username, $password, $database)       $stmt = mysqli_prepare($link, $q)               mysqli_stmt_bind_param($stmt, s, $adminuser)               mysqli_stmt_execute($stmt)               mysqli_stmt_store_result($stmt))  {    $count =

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 2:01 PM, Daniel Browndanbr...@php.net wrote: On Sat, Jul 11, 2009 at 13:45, Eddie Drapkinoorza...@gmail.com wrote: If that's true, then we've found an error reporting bug! I've never seen an error/warning raised, even with my usual error_reporting(E_ALL | E_STRICT |

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 11:03 AM, Daniel Browndanbr...@php.net wrote: On Sat, Jul 11, 2009 at 10:42, Ashley Sheridana...@ashleysheridan.co.uk wrote: The braces ensure that PHP doesn't stop parsing the variable name once it reaches the [. By default, it will only match a variable name up to

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 1:41 PM, Daniel Browndanbr...@php.net wrote: On Sat, Jul 11, 2009 at 13:35, Daniel Browndanbr...@php.net wrote:    It works fine because you're forcing PHP to cast 'hello' in your array from a simple boolean TRUE to the string equivalent.    sed s/string

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 3:53 PM, Govindagovinda.webdnat...@gmail.com wrote: On Jul 11, 2009, at 11:26 AM, Eddie Drapkin wrote: $foo = EOT $bar[hello] EOT; what does EOT stand for? (I realize that string can be anything..  but I am just asking what EOT means to everyone? I just use

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 5:37 PM, teddtedd.sperl...@gmail.com wrote: At 3:34 AM +0700 7/12/09, Lenin wrote: On Sun, Jul 12, 2009 at 2:56 AM, Eddie Drapkin oorza...@gmail.com wrote:  On Sat, Jul 11, 2009 at 3:53 PM, Govindagovinda.webdnat...@gmail.com   wrote:   what does EOT stand

Re: [PHP] MySql Injection advice

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 6:39 PM, Haig Dedeyanhdede...@videotron.ca wrote: On July 11, 2009 10:57:14 am Haig Dedeyan wrote: At 10:12 PM -0400 7/10/09, Haig Dedeyan wrote: [1] $fname = mysql_real_escape_string($fname); $lname = mysql_real_escape_string($lname); $sql = UPDATE phonedir SET

Re: [PHP] Error Trapping

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 10:56 AM, Floyd Reslerfres...@adex-intl.com wrote: I'm having a hard time getting my head around this problem.  I have to connect to a FoxPro database using an ODBC driver.  Sometimes when I connect I get an error.  The error doesn't occur all the time and usually

Re: [PHP] Error Trapping

2009-07-10 Thread Eddie Drapkin
the loop you suggested.  I guess it was working exactly the way I had written it! Thanks! Floyd On Jul 10, 2009, at 11:23 AM, Eddie Drapkin wrote: On Fri, Jul 10, 2009 at 10:56 AM, Floyd Reslerfres...@adex-intl.com wrote: I'm having a hard time getting my head around this problem.  I have

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 3:50 PM, Daniel Browndanbr...@php.net wrote: On Fri, Jul 10, 2009 at 15:48, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, My server appears to be the victim of a chinese hack-attack and I believe they managed to change pages via SQL Injection, do any of

Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 8:25 PM, Govindagovinda.webdnat...@gmail.com wrote: How do I  get basename(__FILE__) or htmlentities($somevar) to be evaluated  in a heredoc? Govinda govinda.webdnat...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-09 Thread Eddie Drapkin
I called him intolerant because he jumps on issues which other people just don't care about. I called him small minded because he concentrates on small issues which simply don't matter in the great scheme of things. That sounds like fair comment to me It's just like those people who have

Re: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-09 Thread Eddie Drapkin
I honestly think this is a case of the subject being broached in a less-than-super-friendly-with-hugs-and-butterflies way and someone getting unduly offended about that. Why not chill out and look at this objectively? Mailing lists are historically, as I'm sure you know, a nearly invaluable

Re: [PHP] HTTP headers and include()

2009-07-09 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 1:21 AM, James Colanninoja...@colannino.org wrote: Hey everyone, I've been hard at work on a new web application, and discovered something that I would never have seen coming.  I was noticing that when I called session_start() after a few lines of includes, I was

Re: [PHP] Simple login form with cookies

2009-07-08 Thread Eddie Drapkin
On Wed, Jul 8, 2009 at 10:44 AM, Andrew Ballardaball...@gmail.com wrote: On Wed, Jul 8, 2009 at 9:48 AM, Martin Scottamartinsco...@gmail.com wrote: $sql = 'SELECT * FROM your-table WHERE username = \''. $username .'\' and passwd = md5( concat( \'' . $username .'\', \'@\', \'' . $password

Re: [PHP] Simple login form with cookies

2009-07-06 Thread Eddie Drapkin
On Mon, Jul 6, 2009 at 2:01 AM, Jason Carsonja...@jasoncarson.ca wrote: On Mon, Jul 6, 2009 at 1:45 AM, Jason Carsonja...@jasoncarson.ca wrote: Hello everyone, I am trying to create a PHP login script using cookies but am having some troubles. Here is my setup     index.php -

Re: [PHP] Re: Epiphany - a salute to APC

2009-07-05 Thread Eddie Drapkin
if you want a pure opcode cache, APC is a great choice. APC should //not// be used for persistent RAM storage. Memcached is much faster and designed for that aim, while not being tied to the webserver. On Sun, Jul 5, 2009 at 2:10 AM, Brandon Johnsonbrandonl...@aol.com wrote: you think this is

Re: [PHP] Re: Epiphany - a salute to APC

2009-07-05 Thread Eddie Drapkin
On Sun, Jul 5, 2009 at 2:43 AM, Paul Scottpsc...@uwc.ac.za wrote: Eddie Drapkin wrote: if you want a pure opcode cache, APC is a great choice. you think this is similar to http://www.danga.com/memcached/ or you think this method would be faster ? Which do you say would be the greatest benfit

Re: [PHP] Re: Epiphany - a salute to APC

2009-07-05 Thread Eddie Drapkin
-=- (from other discussion) Interesting that facebook uses both. The fedora maintainer for the apc rpm listed it as conflicting with memcache. If you can use both, that's a fedora packaging but that should be fixed. I've never seen, nor heard of, a full scale caching implementation that

Re: [PHP] Simple login form with cookies

2009-07-05 Thread Eddie Drapkin
On Mon, Jul 6, 2009 at 1:45 AM, Jason Carsonja...@jasoncarson.ca wrote: Hello everyone, I am trying to create a PHP login script using cookies but am having some troubles. Here is my setup     index.php - authenticate.php - admin.php I want a login form on index.php that allows me to login

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
It should be passed into the constructor as a parameter. If you're using OOP properly, there's no reason to use $GLOBALS, ever. Any variable in the $GLOBALS array exists twice in memory, so just keep that in mind, if you plan to use it. On Tue, Jun 30, 2009 at 8:43 AM, Peter

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
On Tue, Jun 30, 2009 at 10:44 AM, Lukel...@blog-thing.com wrote: 2009/6/30 Eddie Drapkin oorza...@gmail.com It should be passed into the constructor as a parameter.  If you're using OOP properly, there's no reason to use $GLOBALS, ever.  Any variable in the $GLOBALS array exists twice

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
On Tue, Jun 30, 2009 at 11:12 AM, Peter Fordp...@justcroft.com wrote: Luke wrote: Thanks for the replies :) Surely if I pass it as a parameter to the __construct then I would have to make an instance of the otherObject, notice that messwithotherthings is static? Also, if I'm not using OOP

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
On Tue, Jun 30, 2009 at 12:37 PM, Paul M Fosterpa...@quillandmouse.com wrote: On Tue, Jun 30, 2009 at 11:17:17AM -0400, Eddie Drapkin wrote: snip I wouldn't really recommend going with a singleton in this situation, as there exists a different solution (my other post :P) and there are very

Re: [PHP] exasperated again - shot in the foot

2009-06-30 Thread Eddie Drapkin
On Tue, Jun 30, 2009 at 4:50 PM, Bastien Koertphps...@gmail.com wrote: On Tue, Jun 30, 2009 at 4:48 PM, PJaf.gour...@videotron.ca wrote: PJ wrote: Could somebody please explain to me what is wrong with this code? In my script it works, returns the correct id, but when I try it in a test

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
You are correct as there was no metaphor in here at all!  This, It helps to think of classes like cars on a highway, is almost a simile, but on the whole I would probably say that you were using an analogy :-) HEIL SPELLCHECK! I bow to my grammar nazi superior *bow* -- PHP General Mailing

Re: [PHP] Does something like this exist?

2009-06-29 Thread Eddie Drapkin
Have you looked at class_parents()? http://www.php.net/manual/en/function.class-parents.php On Mon, Jun 29, 2009 at 4:42 PM, Christoph Bogetjcbo...@yahoo.com wrote: * What files are include in which scripts pecl.php.net/package/inclued  - an awesome tool, will show you includes/require calls

  1   2   >