Re: [PHP] php5 - possible bug discovered

2007-10-08 Thread Robert Cummings
In PHP5 objects are no longer copied when assigned. Instead the object's handle is assigned (similar to a reference but not quite). So the behaviour is as expected. Cheers, Rob. On Mon, 2007-10-08 at 21:42 +0100, David Restall - System Administrator wrote: > Hi, > > I think I have discovered a

Re: [PHP] How to format CLI tabular data?

2007-10-08 Thread Robert Cummings
On Mon, 2007-10-08 at 15:59 -0700, Daevid Vincent wrote: > I write many CLI scripts in PHP to clean up DB records, etc via crontab > scripts. Often though, I implement command line switches to 'debug' or see > various data as a precaution before actually purging. > > Perl has some neat tools built

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 09:12 -0400, Nathan Nobbe wrote: > On 10/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > Nothing brittle at all about PHP4 code. I can completely screw > > up any PHP5 code you send my way too. > > ok; > without modifying this clas

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 11:41 -0400, Christoph Boget wrote: > > > > Maybe next time you'll have a challenge for me ;) And don't whine about > > how I achieved what I did. > > > Brilliant! I never would have thought of that. ;) It gets easier... here's a quick toolset for completely violating PHP5

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 11:49 -0400, Nathan Nobbe wrote: > On 10/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > Maybe next time you'll have a challenge for me ;) > > > bravo! i expected you would come up w/ something. > > And don&#x

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 12:40 -0400, Andrew Ballard wrote: > On 10/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > $sucker = new TryToViolateEncapsulation(); > > $sucker = (array)$sucker; > > > > $keys = array_keys( $sucker ); > > $sucker[reset( $key

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 13:15 -0400, Nathan Nobbe wrote: > On 10/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > Why would I use an interface? :) > > > because inheritance is not always optimal. > > What's the problem tha

Re: [PHP] Looking for help with a complex algorithm

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 14:01 -0500, Jay Blanchard wrote: > Good afternoon gurus and guru-ettes! > > I am searching for an algorithm that will take a list of monetary values > and determine which of these values totals a value supplied to the > widget. > > 1. I supply a value to the application and

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 14:11 -0400, Andrew Ballard wrote: > On 10/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > Certainly you'll notice I've extended the original class, > > overriden the __wakeup() call and basically used inheritance > > and polymorphism

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 16:18 -0400, Robert Cummings wrote: > On Tue, 2007-10-09 at 14:11 -0400, Andrew Ballard wrote: > > On 10/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > Certainly you'll notice I've extended the original class, > > > overr

RE: [PHP] Looking for help with a complex algorithm

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 15:28 -0500, Jay Blanchard wrote: > [snip] > This *IS* the knapsack problem. Just because you specify date ranges to > get your values and the value isn't a knapsack doesn't change the fact > that it is the same problem :) I remember having fun with genetic > algorithms and th

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Robert Cummings
On Tue, 2007-10-09 at 21:37 -0400, Nathan Nobbe wrote: > > does a lawn mower not have blades; and gas and a control panel; does it not > have > wheels? my object modeling of a lawn mower would certainly have these > things; > and most likely i would mark components of the engine as private. > and

RE: [PHP] Looking for help with a complex algorithm

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 07:00 -0500, Jay Blanchard wrote: > > There is another ongoing thread about OOP in PHP4 that has approached > holy war status. I fear that some are overlooking solutions to problems > that already have been solved. Things such as interfaces and design > patterns exist because

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 08:55 -0400, tedd wrote: > At 9:54 PM -0400 10/9/07, Nathan Nobbe wrote: > > i hope i have been able to contribute something to someone > >amidst all the arguing. > > > >-nathan > > > Yeah, you gave me a better appreciation of some of the members of > this list -- we have

Re: [PHP] Editing an element within an array

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 14:36 +0100, Stut wrote: > Brian Dunning wrote: > > > > A pint of cachaça to he who sets me on the path to success. > > Don't really know what that is, but OK! I'll be back with your pint a minute... right now I have to go to the washroom... why am I carrying this empty pint

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 14:44 +0100, Tony Marston wrote: > ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On 10/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > >> > >> On Tue, 2007-10-09 at 21:37

RE: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 13:30 -0500, Jay Blanchard wrote: > [snip] > so what are the benefits of the "with interfaces" solution over > the"without > > interfaces" solution > [/snip] > > Polymorphism. Bleh, polymorphism isn't unique to interfaces. In fact, PHP has polymorphism all over the place by

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 17:46 -0400, Nathan Nobbe wrote: > On 10/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Wed, 2007-10-10 at 13:30 -0500, Jay Blanchard wrote: > > [snip] > > so what are the benefits of the "with interf

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 17:46 -0400, Nathan Nobbe wrote: > On 10/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Wed, 2007-10-10 at 13:30 -0500, Jay Blanchard wrote: > > [snip] > > so what are the benefits of the "with interf

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 20:45 -0400, Nathan Nobbe wrote: > On 10/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > What I was really illustrating is how interfaces are syntactic > > sugar only. In my above example what I've really shown is an > > impl

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 20:57 -0500, Larry Garfield wrote: > On Wednesday 10 October 2007, Nathan Nobbe wrote: > > On 10/10/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > What I was really illustrating is how interfaces are syntactic > > > sugar only. In my abo

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-10 Thread Robert Cummings
On Wed, 2007-10-10 at 22:15 -0400, Nathan Nobbe wrote: > well i have to say i dont really see the difference between an > implicit and explicit interface. > > the example you gave looks like it works just like the example i gave. > > in your example the check for the function is performed at runt

RE: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-11 Thread Robert Cummings
On Thu, 2007-10-11 at 07:19 -0500, Jay Blanchard wrote: > [snip] > What I was really illustrating is how interfaces are syntactic > sugar only. In my above example what I've really shown is an > implicit interface :) Since OOP is largely meant to model real > world things, ask yourself this... when

Re: [PHP] How to decode the PHP Source Code

2007-10-11 Thread Robert Cummings
On Thu, 2007-10-11 at 12:06 +, Javed Khan wrote: > Hello Everyone, > I have the source code of a php application I got from someone but it is > encoded with IonCude. > I would really appreciate if someone can send me any solution for that. There's a reason it's encoded with IonCube. Someone d

RE: [PHP] Classes - Dumb question

2007-10-11 Thread Robert Cummings
On Thu, 2007-10-11 at 07:36 -0500, Jay Blanchard wrote: > [snip] > okay, this is really (!) embarassing, but I have to ask: > > Why would I want to use classes in PHP? > > I have been using PHP for years now and writing the "normal" functions all > the time. I have never even bothered working wi

Re: [PHP] Detect local or remote call?

2007-10-11 Thread Robert Cummings
On Thu, 2007-10-11 at 19:58 +0200, Anders Norrbring wrote: > Is there a good way to detect in a script if it's called locally from > command line, or via a remote browser? I've always used if( isset( $_SERVER['SERVER_PORT'] ) ) { return 'web'; } Cheers, Rob. --

Re: [PHP] exit and ob_*

2007-10-12 Thread Robert Cummings
On Fri, 2007-10-12 at 14:30 -0500, Philip Thompson wrote: > On 10/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > Have you checked your error log to see if there an error being generated > > that you can't see? > > > > Cheers, > > Rob. &g

Re: [PHP] exit and ob_*

2007-10-12 Thread Robert Cummings
Have you checked your error log to see if there an error being generated that you can't see? Cheers, Rob. On Fri, 2007-10-12 at 14:03 -0500, Philip Thompson wrote: > Hi. This is weird. Here's my structure. I have an index.php file that just > includes the content depending on what page the user

Re: [PHP] Fast prefix search?

2007-10-13 Thread Robert Cummings
On Sun, 2007-10-14 at 02:07 +0900, js wrote: > On 10/14/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > can you use the php string manipulation functions ? > > I'll probably use strstr() to check whether a string starts with some prefix. >From the help for PHP's strstr() function: "Note: If

Re: [PHP] This, then that.

2007-10-18 Thread Robert Cummings
On Thu, 2007-10-18 at 15:04 -0400, tedd wrote: > Hi gang: > > I would like to run a php script that creates a web page and AFTER it > is finished creating the page, then it runs another php script -- how > you do that? exec() Cheers, Rob. -- ...

RE: [PHP] This, then that.

2007-10-19 Thread Robert Cummings
On Fri, 2007-10-19 at 13:31 -0700, Instruct ICC wrote: > > I want to prohibit an image from being shown to anyone who is not > > permitted (i.e., logged in). > > > > The way I want to do this is to: > > > > 1. Set [file] permissions... > > > > What if 2 or more users access the application at

Re: [PHP] directory modification dates

2007-10-19 Thread Robert Cummings
On Sat, 2007-10-20 at 01:36 +0300, Marek wrote: > I have a simple directory listing script - you can move up and down > directories and it shows the files/dirs inside. Now I have to figure out > a way to display the latest modification time for each directory. > > The problem is that filemtime() w

Re: [PHP] Regex for Advanced search feature

2007-10-19 Thread Robert Cummings
On Fri, 2007-10-19 at 09:48 -0700, Kevin Murphy wrote: > I'm trying to create an advanced search feature for my site, and I > have it mostly working the way I want. I take whatever search term > ($searchkey) that the user submits, explodes if off any spaces > between words, and then use that

Re: [PHP] Is it possible to restart Windows Apache (service) on a PHP script?

2007-10-19 Thread Robert Degen
Why don't you try a passthru('net apache restart') perhabs another parameter order, but I think It won't work. Stopping it might work, but restarting... On Fr, Okt 19, 2007 at 04:32:45 +0800, Louie Miranda wrote: > Is it possible to restart Windows Apache (service) on a PHP script? > > i

Re: [PHP] IF statement

2007-10-18 Thread Robert Cummings
On Thu, 2007-10-18 at 19:57 -0500, ron.php wrote: > I just tried to send this to the list. I am not trying make it post again, I > don't think I had the e-mail address correct the first time. > > I am trying to stop $component_reference from doing the echo below when the > value is 5 or 19. I

RE: [PHP] This, then that.

2007-10-20 Thread Robert Cummings
On Sat, 2007-10-20 at 09:59 -0400, tedd wrote: > At 4:59 PM -0400 10/19/07, Robert Cummings wrote: > >On Fri, 2007-10-19 at 13:31 -0700, Instruct ICC wrote: > >> > I want to prohibit an image from being shown to anyone who is not > >> > permitted (i.e., logged in

RE: [PHP] This, then that.

2007-10-21 Thread Robert Cummings
On Sat, 2007-10-20 at 18:45 -0700, Instruct ICC wrote: > > > > > > > >One idea that has always been REALLY popular around here... stuff your > > > >image in a database. *MUHAWHAWHAWHAWHAW* *Ducks from the flying rocks*. > > > > > > > >Cheers, > > > >Rob. > > > >-- > > > > > > Rob: > > > > > > Tha

Re: [PHP] problem with foreach

2007-10-22 Thread Robert Cummings
On Mon, 2007-10-22 at 18:07 +0100, Stut wrote: > Adam Williams wrote: > > I have an html page with checkboxes: > > > > > > Modern > > Mississippi > > Civil Rights > > MilitaryHistory > > > > > > and mailform2.php containing: > > > > echo "you selected: "; > > /* line 81 */ foreach ($_POST[opt

Re: [PHP] problem with foreach

2007-10-22 Thread Robert Cummings
On Mon, 2007-10-22 at 12:20 -0500, Adam Williams wrote: > > Yeah, thats the problem I'm having for some reason. When I do: > > print_r($_POST['option']); > > it prints nothing. It's usually more informative to see everything that was posted so you might have more of an idea what may have went

RE: [PHP] problem with foreach

2007-10-22 Thread Robert Cummings
On Mon, 2007-10-22 at 19:59 -0400, Bastien Koert wrote: > I am sure that I am late to the party, but am sure that > double or single quotes at least are needed around the > attribute values to make this work Late to the party and completely off the mark taboot. Don't need quotes at all. It's bad p

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: > echo "coucou " . print('v ' . print('u ' . print('toctoc ') . 'hihi > ') ) . > 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the way it does? First off, print() is a function so nesting functi

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 11:54 -0400, Andrew Ballard wrote: > On 10/23/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: > > > > > echo "coucou " . print('v ' . print('u ' . print

Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 20:34 +0100, Stut wrote: > Dare Williams wrote: > > Dear Pals, > > > > Please I need a book called : "Oracle Database 10g Express Edition PHP > > Web Programming (Osborne Oracle Press Series): Books: by Michael > > McLaughlin". > > > > Please if anyone with the E

Re: [PHP] output-buffer and memory-issue

2007-10-24 Thread Robert Cummings
On Wed, 2007-10-24 at 21:07 +, Werner Schneider wrote: > Hi, I got a strange problem: Using php 4.4.x, I capture the whole output for > a webpage into the output-buffer by using ob_start and ob_get_clean, because > I got to make some replacements in the html-code before sending the page to >

Re: [PHP] CURL + Frames, fopen + remote sessions

2007-10-26 Thread Robert Cummings
On Fri, 2007-10-26 at 17:43 +0200, Jochem Maas wrote: > jenix wrote: > > Hi, > > > > When using CURL to access a page with frames I get the "Your browser does > > not appear to support frames" error. How can get around this? Is there > > special header info that can be added? > > try spoofing th

Re: [PHP] unable to find running php script

2007-10-26 Thread Robert Cummings
On Fri, 2007-10-26 at 18:20 +0200, Jochem Maas wrote: > ah yes ... Dan said it better :) but then he is a bigger nerd than me ... > he has a truck which is more dalek than pickup :-P *hehe* My favourite Dalek line... Dalek: Cyrbermen are only good for one thing! Cyberman: What is that?

Re: [PHP] unable to find running php script

2007-10-26 Thread Robert Cummings
On Fri, 2007-10-26 at 13:22 -0400, Daniel Brown wrote: > On 10/26/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-10-26 at 18:20 +0200, Jochem Maas wrote: > > > ah yes ... Dan said it better :) but then he is a bigger nerd than me ... > > > he has

Re: [PHP] sessions (version 5.1 to 5.2 )

2007-10-28 Thread Robert Cummings
On Mon, 2007-10-29 at 11:15 +0800, Fritz Kuhlman wrote: > Dear PHP gurus, > > I moved to PHP from asp around version 4.something. When i tried using > sessions on my site, they just wouldn't work. No error messages, just > wouldn't work. There was a session ID generated, but if i tried > > $

Re: [PHP] moving over to php 5

2007-10-29 Thread Robert Cummings
On Mon, 2007-10-29 at 08:52 +, Hulf wrote: > Hi, > > > It is about time I made the jump to 5, however the only thing that is > holding me back is the problem with hosts. How many hosts still run php 4 > and am I going to have to spend hours and hours persuading them to upgrade > before I c

Re: [PHP] moving over to php 5

2007-10-29 Thread Robert Cummings
On Mon, 2007-10-29 at 09:42 -0500, Philip Thompson wrote: > > I think the real question is will listservs (like this one) stop > supporting people running applications on PHP4 in 98 days ( > http://gophp5.org/)? I'm not saying we should outcast *those people* who > haven't transitioned, but wi

Re: [PHP] moving over to php 5

2007-10-30 Thread Robert Cummings
On Tue, 2007-10-30 at 09:10 -0500, Larry Garfield wrote: > On Tuesday 30 October 2007, Per Jessen wrote: > > Larry Garfield wrote: > > > Here's a bigger question: When will people stop using mysql_ as their > > > example API, when PDO is more standard in PHP 5 and more secure, and > > > mysqli is a

Re: [PHP] FW: Reaching the PHP mailing list owners

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 06:53 -0700, John Moss wrote: > I have no idea what I am doing - and I hate to think this message is > actually going to be read by everyone in a general mailing list. But - since > the attempt to reach a human 'owner' didn't work and the general-help > doesn't yield results I

Re: [PHP] FW: Reaching the PHP mailing list owners

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 06:53 -0700, John Moss wrote: > > I find a mailing list related to php - I think. Seems right - > "lists.php.net". I 'subscribe' (I think) to a 'General user list' which > suggests "This is a really high volume general list for PHP users". I think > this is what I want - but I

Re: [PHP] while-do +array

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 13:02 +0200, Steven Macintyre wrote: > Hiya, > > I have the following code ... which only seems to result in one item ... > which is incorrect ... can anyone spot my problem? Your subject line says "while-do" + array, following code contains a "do-while" loop. We can't debug

RE: [PHP] while-do +array

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 16:20 +0200, Steven Macintyre wrote: > > Your subject line says "while-do" + array, following code contains > > a > > "do-while" loop. > > Apologies :) > > > We can't debug the script very well without a > > sample > > input since we don't know how many times the loop "shou

Re: [PHP] RE: Reaching the PHP mailing list owners

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 07:29 -0700, John Moss wrote: > Thank you, Daniel Brown, Richard Buskirk, Robert Cummings, David Giragosian > ~ and anyone else who may have jumped in to my message within the last > minute or two, trying to help me. > > Below is the message I was writing to a

Re: [PHP] FW: Reaching the PHP mailing list owners

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 11:19 -0400, Daniel Brown wrote: > On 10/31/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Oct 31, 2007, at 10:07 AM, Daniel Brown wrote: > > > On 10/31/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > >> The traffic here isn&#

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Robert Cummings
On Thu, 2007-11-01 at 09:06 -0400, Rahul Sitaram Johari wrote: > Ave, > > Somehow my PHP won't access, won't even acknowledge the existence of a file > that is outside the /Library/WebServer/Documents folder. This was never a a > problem before in any Mac version - it just started with Leopard. >

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Robert Cummings
On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote: > I've completely lost track of the state of the exact OO rules in any > given version of php5) Haha, you too eh!? BTW, I finally bothered to download PHP 5.2.4 last night and checked it out. This is the first time I've seen a speed improvemen

Re: [PHP] Re: Function variables in classes

2007-11-01 Thread Robert Cummings
On Thu, 2007-11-01 at 17:16 +0100, Jochem Maas wrote: > Robert Cummings wrote: > > On Thu, 2007-11-01 at 16:10 +0100, Jochem Maas wrote: > >> I've completely lost track of the state of the exact OO rules in any > >> given version of php5) > > > >

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 18:05 +0100, Luca Paolella wrote: > Hi, > > I'm very grateful for your help (thanks to everybody!), but maybe I > didn't explain myself correctly, I'm sorry. What I need is the bot to > log onto the server and, being logged as a user, to send some > periodic messages on

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 19:33 +0100, Per Jessen wrote: > Jason Pruim wrote: > > > Actually, what you are looking for is an eggdrop bot which is written > > in TCL. PHP in my humble opinion was not designed to handle something > > like that as it requires realtime processing. Someone correct me if >

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 20:23 +0100, Luca Paolella wrote: > > This can be done quite easily using shared memory and/or a database to > > share data between the scripts. > Really? could you give me a little briefing about this method? I'll give an example using the DB as the sharing mechanism. So you

Re: [PHP] Regular Expressions

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote: > 2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: > > > > I'm a mess in regular expressions and I make this code: > > > > $link = ereg_replace('ñ','n',$link); > > $link = ereg_replace('á','a',$link); > > $link = ereg_replace('é','e',$l

Re: [PHP] php.ini include_path and symlinks

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 18:35 -0800, Ravi Menon wrote: > Hi, > > We run php 5.2.0 + apache 2.2. with apc turned on ( apc.stat also on > ). Earlier we did not use the php.ini include_path setting. We relied > on some symlinks for our common code > so that require_once works correctly. > > This worke

Re: [PHP] Regular Expressions

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 20:15 -0800, Jim Lucas wrote: > Robert Cummings wrote: > > On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote: > >> 2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: > >>> I'm a mess in regular expressions and I make this

Re: [PHP] Regular Expressions

2007-11-07 Thread Robert Cummings
nly the effort to create a COW version of the variable. This is about as fast as the creation of the return value of preg_match_all(). Cheers, Rob. > > Robert Cummings wrote: > > On Wed, 2007-11-07 at 14:33 +, Mark Summers wrote: > > > >> This is a first attempt

Re: [PHP] Regular Expressions

2007-11-07 Thread Robert Cummings
On Wed, 2007-11-07 at 14:33 +, Mark Summers wrote: > This is a first attempt but the general idea is that the regular > expression matching is done in one operation and then str_replace() is > called only as many times as required instead of once for every line in > your list. Also, str_replac

Re: [PHP] PHP ide?

2007-11-08 Thread Robert Cummings
On Fri, 2007-11-09 at 00:28 +0100, Børge Holen wrote: > On Friday 09 November 2007 00:03:32 Instruct ICC wrote: > > > > > > > Just wondering if anyone uses an IDE and if so what ones? > > > > > > > > > > > > > > Ta, > > > > > > > > > > > > > > H. > > > > > > > > > > > > Quanta +, of course. > > > >

Re: [PHP] PHP ide? OT

2007-11-08 Thread Robert Cummings
On Fri, 2007-11-09 at 01:03 +0100, Børge Holen wrote: > > > oh no, I wasn't hinting your way, I more or less commented on > tersus > > > beeing eclipse. It's like the ubunty hype, witch fails to state on > the > > > homepage: "we're practically NOTHING without debian". > > > > Ubuntu = Debian + New

Re: [PHP] PHP ide?

2007-11-08 Thread Robert Cummings
On Thu, 2007-11-08 at 21:47 +0100, Børge Holen wrote: > On Thursday 08 November 2007 11:02:07 Hulf wrote: > > Just wondering if anyone uses an IDE and if so what ones? > > > > Ta, > > > > H. > > > Quanta +, of course. > Other is to much work and not worth the effort... > I really cannot see what

RE: [PHP] PHP ide?

2007-11-08 Thread Robert Cummings
On Thu, 2007-11-08 at 19:06 -0800, Instruct ICC wrote: > Sorry for the crap below. I think it's MS Hotmail not playing nice with > Safari. > > Eclipse and Netbeans (now it may look like I'm pushing Java) have offerings > to allow us developers to build upon -- not just apps, but tools. I think

[PHP] Help securing a server : Owned by W4n73d H4ck3r

2007-11-09 Thread robert mena
Hi, One server that hosts several domains ended up with the message "Owned by W4n73d H4ck3r".While still performing an audit I am very confident that this was caused by a php script (it is a linux server) uploaded via FTP or by a defective site hosted (perhaps vulnerable version of a CMS). Th

Re: [PHP] Help securing a server : Owned by W4n73d H4ck3r

2007-11-09 Thread robert mena
tips regarding the php part (like disabling some functions etc). But since I am also copying you directly please feel free to email me privately. Thanks again. On Nov 9, 2007 11:41 AM, Daniel Brown <[EMAIL PROTECTED]> wrote: > > On Nov 9, 2007 9:27 AM, robert mena <[EMAIL PROTECTED]

Re: [PHP] Help securing a server : Owned by W4n73d H4ck3r

2007-11-09 Thread robert mena
Hi Daniel, According to the audit this happened yesterday. I am searching astalavista but could not find anything, probably because I am being too specific. >From the php side (or closely) what steps would you recommend in order to have a better security? I could not find a consistent 'list' of

Re: [PHP] functions versus includes

2007-11-11 Thread Robert Cummings
On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: > Frank Lopes wrote: > > I just started using PHP and got to think... > > > > Without getting into the discussion of "best practices", strictly from > > a performance perspective, > > what is faster: a function or an include? > > > > For example I

Re: [PHP] PHP advice: Tips webpage valid?

2007-11-13 Thread Robert Cummings
On Tue, 2007-11-13 at 23:37 +0200, Dotan Cohen wrote: > I came across this page today: > http://reinholdweber.com/?p=3 > > It covers a lot of flammable material (echo vs. print) but I wonder > how valid some of the advice is. Can anyone elaborate? Thanks. Some of it is definitely useful individua

Re: [PHP] PHP Developers and the manual

2007-11-14 Thread Robert Cummings
veryone who > > has helped me. :) > > Hey, no worries. You'll be able to officially thank the community > when we go to the new mandatory donation system on the list on 1 > January, 2008. Watch for strange charges to your PayPal account, et > cetera, with the subj

Re: [PHP] Newbie question - current date - time

2007-11-14 Thread Robert . Degen
Check out "date" function. Prints out nice local time, what you need can be made by changing the "r" option. Have a look at the manual for alternatives to "r" liek Y for year, etc... so far - Ursprüngliche Nachricht - Von: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Datum: Donnerstag, No

Re: [PHP] PHP Developers and the manual

2007-11-14 Thread Robert Cummings
On Wed, 2007-11-14 at 13:55 -0500, Nathan Nobbe wrote: > On Nov 14, 2007 1:39 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > > > If you don't know how it works, you can > > bitch about the syntax manuals being "too vague". > > > im going to take the opportunity here and bitch about the documentat

Re: [PHP] PHP Developers and the manual

2007-11-14 Thread Robert Cummings
On Wed, 2007-11-14 at 13:36 -0500, Daniel Brown wrote: > On Nov 14, 2007 12:55 PM, Robert Cummings <[EMAIL PROTECTED]> > wrote: > > > Hey, no worries. You'll be able to officially thank the community > > > when we go to the new mandatory donation system o

Re: [PHP] PHP Developers and the manual

2007-11-14 Thread Robert Cummings
On Wed, 2007-11-14 at 22:23 -0500, tedd wrote: > At 1:54 PM -0600 11/14/07, Philip Thompson wrote: > >I know I can't be the only one that puts/creates a face for each person on > >this list... =P > > No, but I'm the best looking one. I'll leave smart for someone else. Are you trying to be smart

Re: [PHP] I need help handling form posting

2007-11-15 Thread Robert . Degen
> Jon Westcot wrote: > > > Is there a way that I can intercept the click of the "Upload" > > button, have it update a field (probably a hidden one) with a > > date/time stamp, and then have that value included in the $_POSTed > > values? > > Sure, javascript is the answer. But don't for

Re: [PHP] overloading members. aghhh!!!

2007-11-19 Thread Robert Cummings
On Mon, 2007-11-19 at 11:25 +0100, Kiketom wrote: > Hi all. > Yesterday i have looking for the overloading members > > Member overloading > void __set ( string name, mixed value ) > mixed __get ( string name ) > > As an example i put this code: > > class foo > { > private $ID; > private

Re: [PHP] overloading members. aghhh!!!

2007-11-19 Thread Robert Cummings
On Mon, 2007-11-19 at 06:27 -0500, Robert Cummings wrote: > On Mon, 2007-11-19 at 11:25 +0100, Kiketom wrote: > > Hi all. > > Yesterday i have looking for the overloading members > > > > Member overloading > > void __set ( string name, mixed value ) > > mix

[PHP] PHP and SAP Business One DI Server

2007-11-19 Thread Robert Cummings
Anyone have any experience with this? Searching the web doesn't popup much useful information with respect to using PHP. It seems that it should be simple enough using PHP and SOAP, but the lack of information on the web is unsettling :) So on that note, any information will be appreciated. Cheers

RE: [PHP] PHP and SAP Business One DI Server

2007-11-20 Thread Robert Cummings
On Tue, 2007-11-20 at 04:55 -0300, Andrés Robinet wrote: > I can only speak for my experience in PHP+SOAP in a recent project, but not > on SAP. You'll surely get more information here as the experts will start > speaking... If this is of any help to you, then PERFECT! If not, well, hope > not to b

Re: [PHP] Should I put pictures into a database?

2007-11-21 Thread Robert Cummings
On Thu, 2007-11-22 at 06:22 +, Lester Caine wrote: > Michael McGlothlin wrote: > > I use a custom file system that caches large amounts of data in RAM. > > That way it's really fast and as easy to use as normal file system calls. > > It's called a relational database ;) > Seriously. > Databa

Re: [PHP] Code Critique Please :)

2007-11-22 Thread Robert Cummings
On Thu, 2007-11-22 at 12:46 -0500, Oscar Gosdinski wrote: > > There is something that i always wonder about Singleton pattern in > PHP, do you really have a benefit using this pattern in PHP? The idea > behind this pattern is that only one instance of the class is created, > it works great in Java

Re: [PHP] Performance question for table updating (SOLVED)

2007-11-24 Thread Robert Cummings
On Sat, 2007-11-24 at 04:03 -0700, Jon Westcot wrote: > > Moral of the story? Two, really. First, ensure you always reference > values in the way most appropriate for their type. Second, don't make your > idiocy public by asking stupid questions on a public forum. What's the > quote (prob

Re: [PHP] Adv. photo scripts

2007-11-24 Thread Robert Cummings
On Sun, 2007-11-25 at 01:59 -0500, PHP-General wrote: > Not sure if I'm at the right place but here goes > > I'm trying to create a script that will let users upload photos. It is a > high traffic site and I've been told its best to create a function that will > generate a unique filename fo

Re: [PHP] how do i get a printout of original multipart post data

2007-11-26 Thread Robert . Degen
If you're with linux try netcat (nc) at listening mode. Something like (not exactly) nc -vtlp 80 and then submut against any localhost url. greetings - Ursprüngliche Nachricht - Von: Olav Mørkrid <[EMAIL PROTECTED]> Datum: Montag, November 26, 2007 1:52 pm Betreff: [PHP] how do i

Re: [PHP] Quick question on data formatting

2007-11-28 Thread Robert Cummings
On Wed, 2007-11-28 at 22:19 -0700, Jon Westcot wrote: > Hi all: > > Since I'm relatively new to PHP, I'm not familiar with all of the > shortcuts and efficient ways one could write a routine that handles > converting data from one format into another, so I thought I'd ask here for > recomme

Re: [PHP] Quick question on data formatting [SOLVED]

2007-11-28 Thread Robert Cummings
On Wed, 2007-11-28 at 22:47 -0700, Jon Westcot wrote: > Thanks, Rob! I can see that it's going to be important for me to get > familiar with the POSIX regular expressions. You can use the perl versions too. I just got used to the posix versions a long time ago :). BTW, if you didn't notice I forg

Re: [PHP] Structured Code vs. Performance

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 08:56 +0100, [EMAIL PROTECTED] wrote: > I got different portions of code only used for certain purposes (who don't > ;-)?). But what, in your opinion (better: in your experience) would be the > best regarding script-performance: Putting each code-portion in a separate > fil

Re: [PHP] Structured Code vs. Performance

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 12:13 +, Stut wrote: > > Not ;). There is no such thing as a compile-time definition in PHP. There certainly is... Now, I'm not necessarily advocating this style of compatibility programming, but I remember seeing something like it in PEAR. I think it might have been t

Re: [PHP] Structured Code vs. Performance

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 16:49 +, Stut wrote: > Robert Cummings wrote: > > On Thu, 2007-11-29 at 12:13 +, Stut wrote: > >> Not ;). There is no such thing as a compile-time definition in PHP. > > > > There certainly is... > > > > >

Re: [PHP] Glob

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 17:19 +, Tom Chubb wrote: > Please can someone help me understand the following: > I have 4 images with a .jpg extension in a folder. > The following reads all four: > $files = glob("thumbs/{*.gif,*.jpg,}",GLOB_BRACE); > > All good, however, I noticed that if the extensio

Re: [PHP] dump a class

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 18:16 +0100, Alex Toro wrote: > Hello, I would like to know why when I print_r or var_dump an object I > get the private properties. I give you an example: > > > class test > { > private $myPrivate = 'topsecret'; > } > > $myTest = new test(); > > #echo $myTest->myPr

Re: [PHP] Join question

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 15:41 -0500, tedd wrote: > Hi gang: > > I'm trying to understand joins, > > Here's the situation. I have two tables (user1, user2) in one database: > > The common field between the two tables is "username". I want to take > fields "login" and "password" from user2 and popu

<    22   23   24   25   26   27   28   29   30   31   >