[PHP] Re: php5 - website development - what next

2010-10-08 Thread Nathan Rixham
;t want to use PHP any more, or you may find that you want to apply the paradigms and lessons learned to PHP using the new features in 5.3 Hope that helps a little, I'll stop here because I could list projects till the end of time! Many Regards Nathan -- PHP General Mailing List (ht

[PHP] Re: zip and mac safari

2010-10-08 Thread Nathan Rixham
file - or it's a big in PHP / your zipping process which is handled gracefully by other browsers but not by safari, in which case report it too. Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-08 Thread Nathan Rixham
edd, please cc me in to the final answer as I won't have time to check the list for a while, and I'm quite interested in this one - kudos to you if you managed to do it and get both parties happy with the result though! Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-08 Thread Nathan Rixham
Nathan Rixham wrote: tedd wrote: Now, back to the question at hand -- what price would you sell a line of your code for? Just realised I responded to the wrong question - the answer was how I'd approach the original question "What do you think he was paid?" For myself, I w

Re: [PHP] which one is faster

2010-10-08 Thread Nathan Rixham
L; } I also ran the tests in the opposite order just to ensure they were fair, results are that $a.$b (concatenation) averaged 22 seconds, and the "$a$b" approach was 28 seconds. Thus, concatenation is faster - but you have to get up to circa 10 million+ uses per second to

Re: [PHP] Casting from parent class to child

2010-10-08 Thread Nathan Rixham
David Harkness wrote: Casting does not change an object. You must copy the relevant value(s) from the object returned into a new DateTimePlus. Since DateTime's constructor takes only a string, and I assume it won't accept your format directly, unless you implement __toString I believe (not test

[PHP] What other languages do you use?

2010-10-08 Thread Nathan Rixham
in to another language Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What other languages do you use?

2010-10-08 Thread Nathan Rixham
Per Jessen wrote: Nathan Rixham wrote: As per the subject, not what other languages have you used, but what other languages do you currently use? French, German, English and Danish. Forhåbentlig ikke alle zur en même temps -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] What other languages do you use?

2010-10-08 Thread Nathan Rixham
Daniel P. Brown wrote: On Fri, Oct 8, 2010 at 13:30, Nathan Rixham wrote: As per the subject, not what other languages have you used, but what other languages do you currently use? Spanish, Gaelic, and German, on occasion. Ahhh, but have you mastered Ambiguity yet? ps: thanks for that

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-09 Thread Nathan Rixham
tedd wrote: At 4:30 PM +0100 10/8/10, Nathan Rixham wrote: tedd wrote: Now, back to the question at hand -- what price would you sell a line of your code for? Interesting case and question Tedd! Quite sure we all realise the answer is not black and white but various shades of grey, and I

Re: [PHP] What other languages do you use?

2010-10-09 Thread Nathan Rixham
tedd wrote: At 6:30 PM +0100 10/8/10, Nathan Rixham wrote: As per the subject, not what other languages have you used, but what other languages do you currently use? I guess it may also be interesting to know if: (1) there's any particular reason for you using a different language (

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Nathan Nobbe
nail and Rob showed how to change the value of a private member variable via serialization - EPIC! Dan I also remember when you were sending the tally of weekly posts per contributor at the end of each week, which I think spurred activity for some time. I still hop on threads from time to time, just a lot more picky about which ones any more. >ducks< -nathan

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Nathan Nobbe
ngs apart for you now... um, right, the whole point is that the conversations are not being viewed through mail clients when people are finding them via search engines on the web. and some mail clients are dumber than others, lol. -nathan

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Nathan Nobbe
On Thu, Oct 21, 2010 at 2:15 PM, Michael Shadle wrote: > On Thu, Oct 21, 2010 at 12:56 PM, Nathan Nobbe > wrote: > > > um, right, the whole point is that the conversations are not being viewed > > through mail clients when people are finding them via search engines on &

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Nathan Nobbe
On Thu, Oct 21, 2010 at 2:33 PM, Michael Shadle wrote: > On Thu, Oct 21, 2010 at 1:21 PM, Nathan Nobbe > wrote: > > > what does syntax highlighting have to do w/ a mess of text that could be > > sorted out by folks willing to take the extra 2 seconds to put their > >

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Nathan Nobbe
On Thu, Oct 21, 2010 at 4:24 PM, Michael Shadle wrote: > On Thu, Oct 21, 2010 at 3:12 PM, Nathan Nobbe > wrote: > > > i've found top-posting to be useful in the corporate environment where > the > > people i'm working with are too ignorant to understand the ra

Re: [PHP] "My truth comes out" [1]

2010-10-23 Thread Nathan Rixham
Richard Quadling wrote: On 21 October 2010 12:42, Richard Quadling wrote: On 21 October 2010 10:39, Gary wrote: Is there any nice way to convert a string containing either "TRUE" or "FALSE" to a bool with the appropriate value? I know I can just "if (strcmp..." but, as the song goes on to say

[PHP] Re: objects and $_SESSION access control

2010-10-26 Thread Nathan Rixham
ure of the application - perhaps if you give more details (show us the interfaces, the code, or PHP doc the system to expose the API) we could help find where the problems are. Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP with POSIX style message queues (mq_open() and friends)

2010-10-28 Thread Nathan Nobbe
wrapper binaries that can be called via shell_exec() or > shell() > > For performance reasons, the second is nearly a non-option. Is, then, the > first option the only way to go about this? > wouldn't calling the wrapper binaries via exec() be faster w/o the shell overhead? -nathan

Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Nathan Nobbe
much only a > single line of description. > > > > What would you all do? > i would go w/ the stubbed out methods in the base class. if theres nothing to do for the default implementation just use the 'null' pattern, function pause() {} __call is something of a last resort for me; i think it's best for proxies or similar and thats about the most its useful for. -nathan

Re: [PHP] include html

2010-11-01 Thread Nathan Nobbe
n the iframe w/o any proxy effort is possible. -nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] time zone ignored (both via ini or in code)

2010-11-01 Thread Nathan Nobbe
you something you may be overlooking 2. for grins, maybe see if the TZ environment variable is set on your system var_dump(getenv('TZ')); 3. another test would be to set date.timezone to something else and see if date_default_timezone_get() returns that new value, which would indicate it's falling through to the third option in the precedence chain. lastly you might see if the calling date_default_timezone_set() does the trick. -nathan

Re: [PHP] include html

2010-11-01 Thread Nathan Nobbe
ame. Like > > iframe.holder .someclassusedbythem {} > > Or do I do? > > iframe#holder .someclassusedbythem {} > > Or > > #holder .someclassusedbythem {} > > Sorry if I'm OT with that. > shrug, no worries, but im too lazy to dig into the details of client side options. :) -nathan

[PHP] Re: Implementing optional methods in a concrete class, but calling themfrom an abstract class.

2010-11-02 Thread Nathan Rixham
e it and go for an event or message based system, that way you can hook in multiple different callbacks to "do something" when the onSomething [event/message] is dispatched. Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-02 Thread Nathan Rixham
re not 1&1 or Godaddy, but there one of the biggest webhosting companies that use cpanel. I would recommend any webhosting company that use cpanel because its either harder to use, not as secure or both. Did you really say all of that and then drop an affiliate link in? Awesome. Yours,

Re: [PHP] time zone ignored (both via ini or in code)

2010-11-02 Thread Nathan Nobbe
On Tue, Nov 2, 2010 at 7:52 AM, Dan Yost wrote: > > > So now I suppose the thread becomes: how do I get a valid US/Central > (America/Chicago) timezone in PHP5? > give the timezonedb extension a shot http://pecl.php.net/package/timezonedb -nathan

Re: [PHP] time zone ignored (both via ini or in code)

2010-11-02 Thread Nathan Nobbe
On Tue, Nov 2, 2010 at 8:44 AM, Dan Yost wrote: > On Tue, Nov 2, 2010 at 9:19 AM, Nathan Nobbe > wrote: > > On Tue, Nov 2, 2010 at 7:52 AM, Dan Yost wrote: > >> > >> So now I suppose the thread becomes: how do I get a valid US/Central > >> (America/Chic

Re: [PHP] time zone ignored (both via ini or in code)

2010-11-02 Thread Nathan Nobbe
On Tue, Nov 2, 2010 at 10:11 AM, Dan Yost wrote: > On Tue, Nov 2, 2010 at 11:02 AM, Nathan Nobbe > wrote: > >> >> > >> >> So now I suppose the thread becomes: how do I get a valid US/Central > >> >> (America/Chicago) timezone in PHP5?

Re: [PHP] time zone ignored (both via ini or in code)

2010-11-02 Thread Nathan Nobbe
On Tue, Nov 2, 2010 at 10:37 AM, Nathan Nobbe wrote: > dude at this point i dont want to sound too much like a troll, but php 5.1 > is some really old software. frankly this is why i chose not to run on > centos during my evaluation of it. i understand the concept behind running > p

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-02 Thread Nathan Nobbe
r the cli. or if that's too much for you admin you can always try dl('sockets.so'); at the top of your script. you can also try var_dump(extension_loaded('sockets')); to see if sockets are actually enabled where you're trying to invoke them from. -nathan

Re: [PHP] include html

2010-11-02 Thread Nathan Nobbe
On Tue, Nov 2, 2010 at 12:50 AM, Karl DeSaulniers wrote: > > On Nov 2, 2010, at 12:37 AM, Nathan Nobbe wrote: > > On Mon, Nov 1, 2010 at 11:22 PM, Karl DeSaulniers >> wrote: >> I need to basically grab the source of the page as text. Then I can do a >> replace(

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Nathan Nobbe
On Thu, Nov 4, 2010 at 11:11 AM, Suyash R wrote: > On Tue, Nov 2, 2010 at 5:49 PM, Nathan Nobbe wrote: > >> On Tue, Nov 2, 2010 at 2:33 PM, Suyash R wrote: >> >>> No, we didn't try it our dept.'s admin wants to know where is sockets.so >>> file o

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Nathan Nobbe
On Thu, Nov 4, 2010 at 11:43 AM, Nathan Nobbe wrote: > $ yum search php | grep -i socket > php-pear-Net-Socket.noarch : Network Socket Interface > check that - thats def *not* the package you're looking for, it's a userspace oo wrapper. you'd be best asking how to insta

Re: [PHP] read smb drive

2010-11-05 Thread Nathan Nobbe
i dont really want to mess with permissions too much, since this will > have to be portable from linux to windows... any help would be > appreciated... > is there any reason the php application code has to be responsible for mounting the network drive? typically this is an os-level responsibility. -nathan

Re: [PHP] read smb drive

2010-11-05 Thread Nathan Nobbe
On Fri, Nov 5, 2010 at 10:18 AM, Steve Staples wrote: > On Fri, 2010-11-05 at 10:06 -0600, Nathan Nobbe wrote: > > On Fri, Nov 5, 2010 at 9:48 AM, Steve Staples wrote: > > > > > Hey guys (and gals) > > > > > > I am writing something that needs to conn

Re: [PHP] Re: read smb drive

2010-11-05 Thread Nathan Nobbe
On Fri, Nov 5, 2010 at 10:37 AM, Ian wrote: > On 05/11/2010 16:18, Steve Staples wrote: > > On Fri, 2010-11-05 at 10:06 -0600, Nathan Nobbe wrote: > >> On Fri, Nov 5, 2010 at 9:48 AM, Steve Staples > wrote: > >> > >>> Hey guys (and gals) > >>&

Re: [PHP] read smb drive

2010-11-05 Thread Nathan Nobbe
On Fri, Nov 5, 2010 at 10:43 AM, Richard Quadling wrote: > On 5 November 2010 16:30, Nathan Nobbe wrote: > > On Fri, Nov 5, 2010 at 10:18 AM, Steve Staples > wrote: > > > >> On Fri, 2010-11-05 at 10:06 -0600, Nathan Nobbe wrote: > >> > On Fri, Nov 5,

Re: [PHP] read smb drive

2010-11-05 Thread Nathan Nobbe
On Fri, Nov 5, 2010 at 11:01 AM, Alexandr wrote: > Nathan Nobbe пишет: > > On Fri, Nov 5, 2010 at 10:43 AM, Richard Quadling > >wrote: >> >> >> >>> On 5 November 2010 16:30, Nathan Nobbe wrote: >>> >>> >>>> On Fri, Nov 5, 2

Re: [PHP] Shopping cart question

2010-11-05 Thread Nathan Nobbe
ZenCart are ancient, and there are many nasty things about the programming practices, most notably, the 'view' layer, which is markup intermingled with logic .. its pretty bad. Magento is robust, and has a feature set that makes OScommerce look like it shipped from the third world. That said it may be overkill as well - just my 2c. -nathan

Re: [PHP] Shopping cart question

2010-11-07 Thread Nathan Nobbe
On Fri, Nov 5, 2010 at 5:51 PM, Tommy Pham wrote: > > -Original Message- > > From: Nathan Nobbe [mailto:quickshif...@gmail.com] > > Sent: Friday, November 05, 2010 11:40 AM > > To: Jack > > Cc: PHP > > Subject: Re: [PHP] Shopping cart question >

Re: [PHP] Updating a GET variable

2010-11-10 Thread Nathan Rixham
Tamara Temple wrote: On Nov 10, 2010, at 8:58 AM, Marc Guay wrote: foreach($_GET as $k => $v) $qs[$k] = URLDecode($v); $qs['lang'] = 'en'; echo 'Flip'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small POST form besides the styling problems I'll run

[PHP] Re: Chat

2010-11-10 Thread Nathan Rixham
Dušan Novaković wrote: Hello there, I have to make chat for website that has around 10 000 users (small social network). So before I start, I would like to hear different opinions. Important thing is to have in mind that in one moment you can have over 1 000 users using chat. So, if you have tim

Re: [PHP] Template engines

2010-11-10 Thread Nathan Rixham
Daniel P. Brown wrote: On Mon, Nov 8, 2010 at 16:41, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? I chose to write two of my own over the years: one procedural, one

Re: [PHP] Newbie looking for a project

2010-11-10 Thread Nathan Rixham
tedd wrote: At 12:34 PM -0500 11/8/10, Daniel P. Brown wrote: On Mon, Nov 8, 2010 at 06:29, Ashim Kapoor wrote: Writing apps on my own is fun but it's fruit is only for me to benefit from,but yes if nothing else I should do that. Not at all, many others can benefit from it as well. T

Re: [PHP] Updating a GET variable

2010-11-11 Thread Nathan Rixham
Marc Guay wrote: So all you need to do, is take a look at $_SERVER['HTTP_ACCEPT_LANGUAGE'] to get a users language preferences. Hi Nathan, Yep, I'm using this var to set the default but I think it's nice to allow the user to override it. Maybe someone using their computer

Re: [PHP] How to protect the source code.

2010-11-19 Thread Nathan Nobbe
ensions or runtime environments on the server for clients and that typically is not realistic. -nathan

Re: [PHP] Procedural Autoloader?

2010-11-22 Thread Nathan Nobbe
vely, you > *could* write a function wrapper that utilizes function_exists() and > the like, then rewrite all of your code to use that wrapper but > how much sense does that make? ;-P Shrug, if you want to really be dirty about it, you could just put a 'class' atop each file of functions. -nathan

Re: [PHP] Iterators.

2010-12-03 Thread Nathan Nobbe
oFile->getFilename() . PHP_EOL; ?> here's a directory structure you can use to test w/, just put the php file containing the above code in the test-iterator directory. you should see the 'meh' file is omitted from the results, as it resides in the 'dontTouch' directory. you should also see the .php file omitted, by the FilterIterator. mkdir test-iterator mkdir test-iterator/a mkdir test-iterator/b touch test-iterator/b/care touch test-iterator/a/more touch test-iterator/a/blah mkdir test-iterator/dontTouch touch test-iterator/dontTouch/meh -nathan

Re: [PHP] How can I call GD's imagepng() directly from my class?

2010-12-06 Thread Nathan Nobbe
ens when that is sent to the browser is it invokes images/gdtest.php on your server, which outputs the binary directly to the browser. If you want to use the class, you should do as your second example for the tag itself, then inside of images/gdtest.php instantiate the class and call the method. gdtest.php render_image(); ?> -nathan

Re: [PHP] How can I call GD's imagepng() directly from my class?

2010-12-06 Thread Nathan Nobbe
temp_path(); imagepng( $my_img, $temp_path ); imagecolordeallocate( $line_color ); imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $my_img ); // returning path to temp location return $temp_path; } } ?> -nathan

Re: [PHP] new keyword combined with other things...

2010-12-08 Thread Nathan Nobbe
ut ORM frameworks like Hibernate in the Java > > world save countless man-hours of work every day, time that can be spent > > on making better applications. > > > > Last time I checked, there isn't an equivalent of Hibernate for PHP. :) pretty sure doctrine is as close as it gets w/ its DQL -nathan

Re: [PHP] Scalable Vector Graphics with PHP

2010-12-09 Thread Nathan Nobbe
plish, but obviously you could use any number of vector programs over the cli from php. you might also have a peak at the cairo library which php allegedly supports (ive never tried it myself). http://us.php.net/manual/en/intro.cairo.php -nathan

[PHP] Re: Announcing New PHP Extension: FileConv

2010-12-12 Thread Nathan Rixham
Nice one Dan, and thanks! :) Daniel Brown wrote: Happy Saturday, folks; I've finally gotten around to releasing my latest PHP extension (which was actually written about two years ago). Named FileConv, it adds native functions for converting back and forth between DOS, *NIX, and legacy

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
s, caching is not an optimization, an application which is designed to not repeat itself (via caching), is a good, scalable, ultra performant application, and that's what we, as developers, are paid to create. Best, and thanks for taking the effort to point this out to the list thus far Pe

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Tommy Pham wrote: -Original Message- From: Peter Lind [mailto:peter.e.l...@gmail.com] Sent: Sunday, December 12, 2010 5:27 AM To: Lester Caine Cc: php-general@lists.php.net Subject: Re: [PHP] ORM doctrine The reason for 'caching' needs to be understood before it is applied in order

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Lester Caine wrote: Nathan Rixham wrote: In your application itself, caching can be introduced at every level, you've already got filesystem io caches provided by the operating system, a well tuned db server cache can make a big difference as well, then on to opcode caches in languages lik

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
'd like to know how to approach these problems, I'd be happy to go through the process of making these always dynamic pages HTTP friendly with you :) (and on the list or in private) Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Tommy Pham wrote: -Original Message- From: Nathan Rixham [mailto:nrix...@gmail.com] Sent: Sunday, December 12, 2010 8:23 AM To: Tommy Pham Cc: 'Peter Lind'; php-general@lists.php.net; 'Lester Caine' Subject: Re: [PHP] ORM doctrine Tommy Pham wrote: -Origin

[PHP] Re: Parsing a phrase

2010-12-12 Thread Nathan Rixham
et/explode http://php.net/str_split http://php.net/preg_split Many examples can be found on the above pages, and you're real solution depends on how many edge-cases you want to cover, but the above will cover most approaches :) Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Scalable Vector Graphics with PHP

2010-12-13 Thread Nathan Rixham
disclaimer: a different nathan You may also be interested in protovis, and raphael, both of which are js libraries which make, or export, svg graphics :) Best, Nathan sudarshana sampath wrote: Nathan, Thank you very much for your response, we are going to visualize network management

[PHP] Re: PDO: good, popular?

2010-12-14 Thread Nathan Rixham
est bet, and is certainly good :) failing that just generic db specific functions or some form of framework to wrap it all up, like doctrine or some such. Would recommend PDO as a nice abstraction layer though that's well used/tested. Best, Nathan -- PHP General Mailing List (http:

Re: [PHP] Singleton with variable parameters

2010-12-15 Thread Nathan Nobbe
ablish state on all of your classes and keep the getInstance method down to 0 params. As long as your singletons aren't immutable this should work just fine. -nathan

Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Nathan Nobbe
trying to print $name triggers the same error anywhere in that > function, too; as I noted further down it seems the string that's passed in > is getting mutated into an object. (Whose missing toString function is what > led me here - but it works fine in PHP 4.3...) Why not test for the type of $name at each point of interest in the SelectBoxOption constructor? If you're passing a string value to the constructor it almost has to be getting changed by the Tag constructor, right ? class SelectBoxOption extends Tag { function SelectBoxOption($name, $value, $selected=false) { var_dump(is_string($name)); parent::Tag("option", $name); var_dump(is_string($name)); .. } -nathan

Re: [PHP] String passed to object constructor turning into aninstance of that object?

2010-12-16 Thread Nathan Nobbe
On Thu, Dec 16, 2010 at 3:21 PM, Kris Deugau wrote: > Nathan Nobbe wrote: > >> Why not test for the type of $name at each point of interest in the >> SelectBoxOption >> constructor? If you're passing a string value to the constructor it >> almost >

Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Nathan Nobbe
On Thu, Dec 16, 2010 at 4:04 PM, Kris Deugau wrote: > Nathan Nobbe wrote: > >> probly something screwy going on w/ the old style of naming constructors. >> 2 >> things, >> >> 1. can you post the Tag constructor as it reads now? >> > > function Tag

Re: [PHP] String passed to object constructor turning into aninstance of that object?

2010-12-16 Thread Nathan Nobbe
On Thu, Dec 16, 2010 at 3:21 PM, Kris Deugau wrote: > Nathan Nobbe wrote: > >> Why not test for the type of $name at each point of interest in the >> SelectBoxOption >> constructor? If you're passing a string value to the constructor it >> almost >

Re: [PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-16 Thread Nathan Nobbe
e(true); >php > $foo = new Foo(); >php > $foo->bar(); you just have to invoke the function from the context of the ReflectionMethod instance setAccessible(true); $m->invokeArgs(new Foo(), array()); ?> -nathan

Re: [PHP] how would I do this?

2010-12-27 Thread Nathan Nobbe
> just clean up the array definition: $services = array('lawn_maintenance', 'core_areation', 'over_seeding', 'hedge_trimming', 'mulch_installation', 'natural_debris_removal', 'leaf_cleanup_removal', 'snow_plowing'); > Could anyone give me a hand? Obviously I don't understand arrays very well > :-/ > looks more like it's the strings you're struggling with ;) -nathan

[PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
x27;t included any additional spaces". Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Joshua Kehn wrote: Trim usernames but not passwords. agree. nice catch, I was thinking about passwords specifically and forgot usernames was in the topic too! On Dec 28, 2010, at 2:57 PM, Nathan Rixham wrote: Dotan Cohen wrote: I seem to have an issue with users who copy-paste their

[PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Dotan Cohen wrote: On Tue, Dec 28, 2010 at 21:57, Nathan Rixham wrote: Don't trim or limit the range of input characters, but far more importantly /don't send passwords in clear text/, indeed don't generate passwords at all, let users enter there desired password, then they wo

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Joshua Kehn wrote: On Dec 28, 2010, at 3:18 PM, Dotan Cohen wrote: I'm toying with the idea of having the passwords hashed twice: they're already in the database hashed, and javascript hashes them on the client before sending them over, but I'm thinking about sending an additional salt to the c

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Dotan Cohen wrote: On Tue, Dec 28, 2010 at 22:30, Joshua Kehn wrote: indeed, and on reflection, if you're putting this much effort in to it, and security is a worry, then forget username and passwords, and issue each user with a client side RSA v3 certificate and identify them via the public ke

[PHP] Re: Hot Topics

2010-12-30 Thread Nathan Rixham
can just avert their eyes - it was hardly 4chan grade trolling! Best & happy new year to you, Nathan Daniel Brown wrote: First, I have to admit that what I did was wrong. I had assumed (ASS-umed) that the other party in a discussion under a different thread would understand and appreci

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-31 Thread Nathan Rixham
Tamara Temple wrote: On Dec 28, 2010, at 2:11 PM, Joshua Kehn wrote: Specifically: Dotan Cohen wrote: I seem to have an issue with users who copy-paste their usernames and passwords coping and pasting leading and trailing space characters. Users should not be copy-pasting passwords or use

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-31 Thread Nathan Rixham
Tamara Temple wrote: Sorry, I was mislead by your use of the phrase "Users should not be copy-pasting passwords or usernames" above. I'd love to hear what you think is an alternative to identifying with web app that keeps track of information about someone that is more secure. client side ssl

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Nathan Rixham
Ethan Rosenberg wrote: FYI [to all the list] -- I thank all for their input. I only needed US phones, and I am forcing the user of the form to conform to xxx-xxx- as the input format. out of interest, why are you forcing you're users to conform to that input format? you could simply stri

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Nathan Rixham
Ethan Rosenberg wrote: At 07:11 AM 12/31/2010, Nathan Rixham wrote: Ethan Rosenberg wrote: FYI [to all the list] -- I thank all for their input. I only needed US phones, and I am forcing the user of the form to conform to xxx-xxx- as the input format. out of interest, why are you

Re: [PHP] Global or include?

2011-01-05 Thread Nathan Nobbe
ad_config() available in all your files, via something like require_once on the file which defines load_config(). the result is the configuration will only be read once on a given page load, thereafter its contents will come from memory. this is actually very similar to the singleton approach in OOP. -nathan

Re: [PHP] Global or include?

2011-01-05 Thread Nathan Nobbe
On Wed, Jan 5, 2011 at 4:27 PM, Nathan Nobbe wrote: > On Wed, Jan 5, 2011 at 3:40 PM, Paul Halliday wrote: > >> Say you have 10 or so scripts and a single config file. If you have >> main.php, functions1.php, functions2.php, functions3.php.. >> >> Does is hurt to do

[PHP] PHP Docs update

2011-01-06 Thread Nathan Rixham
To whoever did it, "it" being http://docs.php.net/ - congrats, v nice, and v quick! Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] date() confustion

2012-04-25 Thread Nathan Nobbe
er of mine and I've verified date.timezone is consistent in both environments. Something's going on in the first case, but I'm unsure what; any ideas? Your help appreciated as always. -nathan

Re: [PHP] date() confustion

2012-04-25 Thread Nathan Nobbe
On Wed, Apr 25, 2012 at 10:44 PM, Simon J Welsh wrote: > On 26/04/2012, at 4:40 PM, Nathan Nobbe wrote: > > > Hi everyone, > > > > Does anybody know what might influence the output of the date() function > > besides date.timezone setting? > > > > Runni

[PHP] problem loading php extension: undefined reference to __gxx_personality_v0‏

2012-05-01 Thread Nathan Ridge
Hi, I'm having trouble loading a PHP extension that I made. When starting PHP, I get the following error: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/libtg.so' - /usr/lib/php5/20090626/libtg.so: undefined symbol: __gxx_personality_v0 in Unknown on line

[PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
method A::tryToCallMeFromB() from context 'B' so why the special treatment for member variables, is this supposed to be a feature? -nathan

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
On Thu, Jul 12, 2012 at 8:38 PM, Tommy Pham wrote: > On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe > wrote: > > Hi all, > > > > Strangely PHP seems to let each class have its own layer of private scope > > for member variables. If a subclass defines a member vari

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
On Thu, Jul 12, 2012 at 9:23 PM, Nathan Nobbe wrote: > On Thu, Jul 12, 2012 at 8:38 PM, Tommy Pham wrote: > >> On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe >> wrote: >> > Hi all, >> > >> > Strangely PHP seems to let each class have its own layer

[PHP] APC expunge notices

2012-08-17 Thread Nathan Nobbe
avior could be implemented. Your feedback appreciated, -nathan

Re: [PHP] PDO

2012-10-22 Thread Nathan Nobbe
;); > > $query = $db->prepare("SELECT id, title, date FROM bloggen ORDER BY date > DESC LIMIT 0,5"); > if (!$query) {die("Execute query error, because: " . $db->errorInfo());} > That looks like you've not connected to the database successfully inside of db.php. -nathan

Re: [PHP] Variables with - in their name

2012-11-18 Thread Nathan Nobbe
using a syntax error. > > How do I retrieve the value of this variable and over come the “minus” > sign that is really a hyphen? > php > ${distributor-42-2} = 5; php > echo ${distributor-42-2}; 5 I think that's it. -nathan

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-21 Thread Nathan Nobbe
gt;> >> From what I do know, there shouldn't be an a[4]. > In any case, let's assume that there is a bug in the string logic that > you're using. Why not just use substr? > > $topic = substr($topic,0,-1); > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Neat idea Tedd, but judging by a quick test, I don't think changing the value of the string is entirely supported though that notation. php > $str = 'blah'; php > $str[3] = ''; php > echo $str . PHP_EOL; bla php > echo strlen($str); 4 -nathan

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-21 Thread Nathan Nobbe
On Fri, Dec 21, 2012 at 4:10 PM, Nathan Nobbe wrote: > > > On Fri, Dec 21, 2012 at 3:27 PM, Jim Giner > wrote: > >> On 12/21/2012 5:16 PM, Tedd Sperling wrote: >> >>> On Dec 21, 2012, at 4:58 PM, Jim Giner >>> wrote: >>> >>>> &g

Re: [PHP] Is there a PHP based authentication library?

2013-04-02 Thread Nathan Nobbe
used the SAML one, so YMMV. -nathan bash-3.2$ ls -1 modules/ InfoCard adfs aggregator aggregator2 aselect authX509 authYubiKey authcrypt authfacebook authlinkedin authmyspace authorize authtwitter authwindowslive autotest cas casserver cdc consent consentAdmin consentSimpleAdmin core cron discop

[PHP] mcrypt_create_iv - why so slow?

2013-05-30 Thread Nathan Nobbe
Hi folks, This code:

[PHP] Re: mcrypt_create_iv - why so slow?

2013-05-30 Thread Nathan Nobbe
DEV_RANDOM? #morbidcuriosity -nathan On Fri, May 31, 2013 at 12:40 AM, Nathan Nobbe wrote: > Hi folks, > > This code: > > $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, > MCRYPT_MODE_CBC), MCRYPT_DEV_RANDOM); > var_dump($iv); > > Takes just over a m

Re: [PHP] Command line PHP

2011-01-07 Thread Nathan Nobbe
t might not make sense > to learn another language as well. why bother learning 2 languages when 1 will suit most needs perfectly? for most folks who work with the web and a typical deployment environment like a linux server, the second language of choice most likely would be a client side one like javascript. -nathan

Re: [PHP] Command line PHP

2011-01-07 Thread Nathan Nobbe
On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn wrote: > On Jan 7, 2011, at 1:48 PM, Nathan Nobbe wrote: > > shrug, you must not be too familiar with php then. 9 times out of 10 it's > the natural, perfect choice for a cli program. there are situations where > you get past w

Re: [PHP] Command line PHP

2011-01-07 Thread Nathan Nobbe
On Fri, Jan 7, 2011 at 12:53 PM, tedd wrote: > At 12:16 PM -0700 1/7/11, Nathan Nobbe wrote: > >> On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn wrote: >> >> Why bother learning other languages? Is this a joke? Why should someone >>> stop learning *ever

Re: [PHP] Command line PHP

2011-01-07 Thread Nathan Nobbe
On Fri, Jan 7, 2011 at 2:52 PM, tedd wrote: > At 1:24 PM -0700 1/7/11, Nathan Nobbe wrote: > >> On Fri, Jan 7, 2011 at 12:53 PM, tedd <<mailto:tedd.sperl...@gmail.com> >> tedd.sperl...@gmail.com> wrote: >> much of the gripe comparing php to python >>

Re: [PHP] First PHP job

2011-01-10 Thread Nathan Nobbe
ing of strings to numbers under > > the proper conditions. You'll scratch your head for quite a while once > > you hit that one. > > > > Paul > > > > -- > > Paul M. Foster > > http://noferblatz.com > > > > > or the ($needle, $haystack) vs ($haystack, $needle)... i still get it > screwed up... thankfully php.net/{function_name} is easy to use :P php --rf is also pretty handy. -nathan

<    6   7   8   9   10   11   12   13   14   15   >