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

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 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, yet still > leave only on

Re: [PHP] Carriage Returns

2009-11-08 Thread Eddie Drapkin
On Sun, Nov 8, 2009 at 11:40 AM, John List wrote: > Dan Shirah wrote: >> >> Hello all, >> >> Basically I have a form with a .  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 problem. >> >> Howev

Re: [PHP] OO method inside a variable

2009-11-04 Thread Eddie Drapkin
On Wed, Nov 4, 2009 at 4:36 PM, 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 > $object->$method; #I've

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 wrote: > On Thu, Oct 29, 2009 at 11:11 AM, Robert Cummings wrote: > >> Ashley Sheridan wrote: >> >>> On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote: >>> >>>  How is the following evaluated: [code] if ($data = somefunc()) ... >>

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 wrote: > 2009/10/26 Eddie Drapkin : >> On Mon, Oct 26, 2009 at 11:59 AM, Tom Barrett wrote: >>> 2009/10/26 Eddie Drapkin : >>>> On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: >>>>> Hello &g

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 wrote: > 2009/10/26 Eddie Drapkin : >> On Mon, Oct 26, 2009 at 11:45 AM, Tom Barrett wrote: >>> Hello >>> >>> I have installed: >>>  - libevent >>>  - libmemcached (http://tangent.org/552/li

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 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 /etc/php.d/memcached.ini >

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 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 I'm experiencing:

Re: [PHP] Web Service Server in PHP

2009-10-21 Thread Eddie Drapkin
On Wed, Oct 21, 2009 at 9:26 PM, Daniel Echalar 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 web servic

Re: [PHP] PEAR segfaulting

2009-10-19 Thread Eddie Drapkin
On Mon, Oct 19, 2009 at 1:35 PM, Ashley M. Kirchner 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:

Re: [PHP] PEAR segfaulting

2009-10-19 Thread Eddie Drapkin
On Mon, Oct 19, 2009 at 1:28 PM, Ashley M. Kirchner 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 went well)

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 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) 1997-2007 The PHP

Re: [PHP] Need unrounded precision

2009-10-11 Thread Eddie Drapkin
On Fri, Jan 1, 2010 at 9:20 PM, Andre Dubuc 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 digits before the d

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

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 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 fade into hi

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

2009-10-06 Thread Eddie Drapkin
On Tue, Oct 6, 2009 at 12:25 PM, Andrea Giammarchi wrote: > > er ... tedd, whatever, usually ++i is faster in almost every language, and > even C developers could use these kind of micro optimizations. > > Speed, even in this SuperCPU era, is still relevant, we would not need > benchmark to comp

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 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... > > > function sendEmail

Re: [PHP] strtotime strangeness

2009-10-04 Thread Eddie Drapkin
On Sun, Oct 4, 2009 at 3:22 PM, Floyd Resler 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 General Mailing List

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

2009-09-29 Thread Eddie Drapkin
On Tue, Sep 29, 2009 at 6:51 PM, Jim Lucas 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

Re: [PHP] Random Flash Movies

2009-09-20 Thread Eddie Drapkin
On Sun, Sep 20, 2009 at 11:33 AM, Ashley Sheridan 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 it could be adapt

Re: [PHP] moving to quad core

2009-09-15 Thread Eddie Drapkin
On Tue, Sep 15, 2009 at 11:35 AM, Rahul S. Johari wrote: > >> On 9/15/09 10:54 AM, "Andres Gonzalez" 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 a >> quad core host for this applicat

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

2009-09-14 Thread Eddie Drapkin
On Mon, Sep 14, 2009 at 5:39 AM, Phred White 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 perl of all thing

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

2009-09-13 Thread Eddie Drapkin
On Sun, Sep 13, 2009 at 9:38 PM, Phred White wrote: > > On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: > >> On Sun, Sep 13, 2009 at 8:29 PM, Phred White >> wrote: >>> >>> On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: >>> >>>&

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

2009-09-13 Thread Eddie Drapkin
On Sun, Sep 13, 2009 at 8:29 PM, Phred White wrote: > > On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: > >> On Fri, Sep 11, 2009 at 1:02 PM, Phred White >> wrote: >>> >>> Hey folks.. >>> >>> Anybody ever use APC to show upload prog

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] 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 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 after the > g

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] APC - Upload progress problem. apc

2009-09-11 Thread Eddie Drapkin
On Fri, Sep 11, 2009 at 1:02 PM, Phred White 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 3.0.19, Apache2,

Re: [PHP] String scrambling

2009-09-10 Thread Eddie Drapkin
On Thu, Sep 10, 2009 at 8:57 PM, Ron Piggott 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 (http://www.php.net/) To unsubscribe

Re: [PHP] upgrade php4 to php5

2009-09-09 Thread Eddie Drapkin
On Thu, Sep 10, 2009 at 2:51 AM, madunix 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 --with-ap

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

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

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

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia 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 socket_create(), then

Re: [PHP] XML. Prevent < from turning into <

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

Re: [PHP] Renaming a Directory

2009-09-08 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 12:08 AM, Paul M Foster 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, moving the fi

Re: [PHP] Renaming a Directory

2009-09-08 Thread Eddie Drapkin
On Tue, Sep 8, 2009 at 5:39 PM, 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, moving the files, and then deleting the old one.  Is there an > easier way? > > Than

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 Gould 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 > it as an

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 Pejman wrote: > Hi, > > I noticed that the following returns a 1. > > echo (1<2) ? 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 I am > t

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 Colannino 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.  I looked

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 hack988 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 : >> I found memcache_get_stats for memcached in some php code. >> I'm search it at php.net's function

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-04 Thread Eddie Drapkin
On Fri, Sep 4, 2009 at 12:02 PM, Lupus Michaelis 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 ». Like can be > u

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-03 Thread Eddie Drapkin
On Thu, Sep 3, 2009 at 3:17 PM, Ashley Sheridan 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 original examp

Re: [PHP] OO and "Singleton" class

2009-09-01 Thread Eddie Drapkin
On Tue, Sep 1, 2009 at 5:16 PM, Paul M Foster 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 this? Any other su

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

2009-09-01 Thread Eddie Drapkin
On Tue, Sep 1, 2009 at 2:12 PM, Daniel Brown 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 upgrade oper

Re: [PHP] Re: Directory Listing

2009-08-26 Thread Eddie Drapkin
On Wed, Aug 26, 2009 at 9:45 AM, hack988 hack988 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 listdir($dir,

Re: [PHP] Case Insensativity in String Comparisons

2009-08-25 Thread Eddie Drapkin
On Tue, Aug 25, 2009 at 12:48 PM, Ben Miller 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 (http://www.ph

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 McKenzie 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 that is app

Re: [PHP] PHP Byte Code Compiler

2009-08-14 Thread Eddie Drapkin
On Fri, Aug 14, 2009 at 12:24 PM, Robert Cummings wrote: > Eddie Drapkin wrote: >> >> On Fri, Aug 14, 2009 at 11:58 AM, Robert Cummings >> wrote: >>> >>> Ralph Deffke wrote: >>>> >>>> quite a while I'm thinking for what could

Re: [PHP] PHP Byte Code Compiler

2009-08-14 Thread Eddie Drapkin
On Fri, Aug 14, 2009 at 11:58 AM, Robert Cummings 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, PHPAccelerator, and

Re: [PHP] Problem with memcache - help needed

2009-08-14 Thread Eddie Drapkin
On Fri, Aug 14, 2009 at 7:14 AM, Jean Michel Malatray 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) > > 192.168.0.1:11212 (4 G

Re: [PHP] Embedding foreach loops

2009-08-11 Thread Eddie Drapkin
On Tue, Aug 11, 2009 at 3:56 PM, tedd 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 > > That w

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 Scotta wrote: > Why do you all always use isset? > Why do you don't use array_key_exists instead? is it a more semantic > solution? > > > $key = 'UserWishesDateRange'; # just to make statement shorter > if( array_key_exists($key, $_POST ) && 'T' == $_POST[$k

Re: [PHP] Re: PHP programming strategy

2009-08-09 Thread Eddie Drapkin
On Sun, Aug 9, 2009 at 6:33 PM, tedd 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 > > ted

Re: [PHP] ZCE Question

2009-08-08 Thread Eddie Drapkin
On Sat, Aug 8, 2009 at 4:18 PM, Augusto Flavio 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? > > > > >  myMethod >   >   >   HI! >   >   > > > > Answer... >    None of the above

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 Sheridan 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 who writes a book w

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 Marston wrote: > > "Eddie Drapkin" wrote in message > news:68de37340908060841x129a9096w6c0907f85614c...@mail.gmail.com... > >> >> Does no one see the inherent issues in buying a book about a >> not-feature-complete ver

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, tedd 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 from what littl

Re: [PHP] PHP programming strategy

2009-08-02 Thread Eddie Drapkin
On Sun, Aug 2, 2009 at 2:24 PM, Larry Garfield 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 >&

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 noticeab

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 Neimeyer 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 case it's not

Re: [PHP] OOP Design Software

2009-07-26 Thread Eddie Drapkin
On Sun, Jul 26, 2009 at 12:54 PM, Caner BULUT 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 Message

[PHP] Re: Renaming all variables in a repository

2009-07-23 Thread Eddie Drapkin
On Thu, Jul 23, 2009 at 1:50 PM, Greg Beaver 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

[PHP] Renaming all variables in a repository

2009-07-23 Thread Eddie Drapkin
uld either point me in the right direction or just down and out tell me how to do it. Thanks so much --Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Client Side PHP

2009-07-22 Thread Eddie Drapkin
On Wed, Jul 22, 2009 at 4:03 PM, Lenin 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] Replace in a string with regex

2009-07-22 Thread Eddie Drapkin
nt >> to have double quotes so it will be parsed by PHP. >> >> Then I would surround YOUR variable with curly brackets to separate it >> from the rest. >> >> echo preg_replace('#(screens/)temp/.+?_1(_main\.jpg)#', >>                   &

Re: [PHP] Replace in a string with regex

2009-07-22 Thread Eddie Drapkin
On Wed, Jul 22, 2009 at 9:07 AM, rszeus 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] > Enviad

Re: [PHP] Replace in a string with regex

2009-07-22 Thread Eddie Drapkin
On Wed, Jul 22, 2009 at 8:02 AM, rszeus 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, > 't

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
sion is entirely M$ Windows mentality and doesn't really extend to *nix environments, where most of us are hosting our sites, anyway. You could name your scripts whatever you want, .awesome, .refridgerator, .silver, whatever and it'd have no bearing on the files themselves. It'

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, Govinda 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 with what I want fr

Re: [PHP] MySQL Queries in PHP

2009-07-13 Thread Eddie Drapkin
On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubb 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 years now and

Re: [PHP] MySql Injection advice

2009-07-13 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, myse

Re: [PHP] php.ini and cli

2009-07-13 Thread Eddie Drapkin
On Mon, Jul 13, 2009 at 4:48 AM, Ashley Sheridan 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 is called, or is the

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-12 Thread Eddie Drapkin
On Sun, Jul 12, 2009 at 3:05 AM, Lenin wrote: > On Sun, Jul 12, 2009 at 6:49 AM, Daniel Brown 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 one.  Check the rule

Re: [PHP] MySql Injection advice

2009-07-11 Thread Eddie Drapkin
On Sat, Jul 11, 2009 at 6:39 PM, Haig Dedeyan 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 f

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, tedd wrote: > At 3:34 AM +0700 7/12/09, Lenin wrote: >> >> On Sun, Jul 12, 2009 at 2:56 AM, Eddie Drapkin wrote: >> >>>  On Sat, Jul 11, 2009 at 3:53 PM, Govinda >> >>  > wrote: >>  > > what does "EOT

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, Govinda wrote: > On Jul 11, 2009, at 11:26 AM, Eddie Drapkin wrote: > >> $foo = <<> $bar[hello] >> EOT; > > what does "EOT" stand for? > (I realize that string can be anything..  but I am just asking what EOT > m

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 Brown wrote: > On Sat, Jul 11, 2009 at 13:45, Eddie Drapkin 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_re

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 Brown wrote: > On Sat, Jul 11, 2009 at 13:35, Daniel Brown 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 equivalent/literal 'hello' string/g"

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 Brown wrote: > On Sat, Jul 11, 2009 at 10:42, Ashley Sheridan > 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 the [ >> sign, so you couldn't acce

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, Govinda 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, visit: http://www

Re: [PHP] HELP SQL INJECTION

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 3:50 PM, Daniel Brown wrote: > On Fri, Jul 10, 2009 at 15:48, Chris Payne 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 you >> have any ideas how to lock dow

Re: [PHP] Error Trapping

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 11:39 AM, Floyd Resler wrote: > Eddie, >        Thanks for the tip.  It suddenly occurred to me what I was doing > wrong.  I do use an error trap but I was telling my script to stop running > after the error.  So, now I ignore it and continue through

Re: [PHP] Error Trapping

2009-07-10 Thread Eddie Drapkin
On Fri, Jul 10, 2009 at 10:56 AM, Floyd Resler 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 another > connect attempt

Re: [PHP] HTTP headers and include()

2009-07-09 Thread Eddie Drapkin
"?>" at the end of a file followed by some whitespace. The solution was to remove the ?> from the end of all the files and I haven't closed an entire file since. Perhaps that might be it? --Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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

2009-07-09 Thread Eddie Drapkin
e overly ornery about a point so trivial? It seems like you're trying to turn this into a "Fight the Power" battle, when the only power you're fighting are your peers. --Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple login form with cookies

2009-07-08 Thread Eddie Drapkin
mpossible to create a rainbow table and run rainbow table attacks on your database. It costs nearly nothing to do, in terms of resource usage and any sort of human comprehensible scheme to store those hashes is easily broken. I've seen "{$user}{$randomCharacter}{$password}" used before, and I'd never recommend something so simple. --Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple login form with cookies

2009-07-05 Thread Eddie Drapkin
On Mon, Jul 6, 2009 at 2:01 AM, Jason Carson wrote: >> On Mon, Jul 6, 2009 at 1:45 AM, Jason Carson 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 -> adm

Re: [PHP] Simple login form with cookies

2009-07-05 Thread Eddie Drapkin
On Mon, Jul 6, 2009 at 1:45 AM, Jason Carson 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 wi

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 do

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

2009-07-04 Thread Eddie Drapkin
On Sun, Jul 5, 2009 at 2:43 AM, Paul Scott 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

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

2009-07-04 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 Johnson wrote: > you think this is similar to http://w

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 Mai

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

2009-06-30 Thread Eddie Drapkin
On Tue, Jun 30, 2009 at 4:50 PM, Bastien Koert wrote: > On Tue, Jun 30, 2009 at 4:48 PM, PJ 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 pages, nothing in the world gets i

Re: [PHP] Re: Scope woe

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

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
; static? >> >> Also, if I'm not using OOP properly, Eddie, how would I use it properly to >> prevent this situation? >> >> Thanks, >> > > Hmmm, I didn't notice the method was static - that means my idea really won't > work... > > I

Re: [PHP] Re: Scope woe

2009-06-30 Thread Eddie Drapkin
On Tue, Jun 30, 2009 at 10:44 AM, Luke wrote: > > > 2009/6/30 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

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 Ford wrote: > Luke w

  1   2   >