Re: [PHP] Why is some_function()[some_index] invalid syntax?

2008-01-10 Thread Nathan Nobbe
On Jan 10, 2008 11:00 PM, Arlen Christian Mart Cuss [EMAIL PROTECTED] wrote: Hi there, Why is it that if I try to evaluate an index of an array returned by a function immediately, a syntax error is produced? (unexpected '[', expecting ',' or ';') thats hillarious, i literally brought this

Re: [PHP] Why is some_function()[some_index] invalid syntax?

2008-01-10 Thread Nathan Nobbe
On Jan 11, 2008 12:25 AM, Jim Lucas [EMAIL PROTECTED] wrote: So, make all your functions return objects, and have the object have a method called get or index or something like that that returns the index requested. :) Better yet, make everything an object: String, Numeric, Array, etc i

Re: [PHP] Why is some_function()[some_index] invalid syntax?

2008-01-11 Thread Nathan Nobbe
On Jan 11, 2008 3:45 AM, Zoltán Németh [EMAIL PROTECTED] wrote: and call it Java ;) or perhaps javascript :) function cool() { return [1, 2, 3]; } alert(cool()[0]); -nathan

Re: [PHP] Posting Summary for Week Ending 11 January, 2008:

2008-01-12 Thread Nathan Nobbe
On Jan 12, 2008 10:41 AM, Zoltán Németh [EMAIL PROTECTED] wrote: 2008. 01. 12, szombat keltezéssel 10.25-kor tedd ezt írta: At 4:00 PM -0500 1/11/08, PostTrack [Dan Brown] wrote: Posting Summary for PHP-General List Week Ending: Friday, 11 January, 2008 Messages

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Nathan Nobbe
the 2 problems that globals introduce are 1. namespace collisions 2. point of origin problem where a namespace collision is the inconsistent use of a global variable within an application eg. // one point in the application $GLOBALS['curUser'] = array('username' = 'bob', 'userId' = 5);

Re: [PHP] uh oh, I defined a resoruce

2008-01-13 Thread Nathan Nobbe
On Jan 13, 2008 12:14 PM, David Giragosian [EMAIL PROTECTED] wrote: In general, I agree with Stut's response delineated earlier in this thread, that a careful and circumscribed use of globals has a place in PHP programming. agreed. -nathan

Re: [PHP] uh oh, I defined a resoruce

2008-01-14 Thread Nathan Nobbe
On Jan 14, 2008 6:11 PM, Sancar Saran [EMAIL PROTECTED] wrote: Hello Jochem, no not in the slightest. both those bits of code are identical for one (apart from the fact that neither are valid syntax). and whatever your trying to point out it's beside the point (I think). any possible

Re: [PHP] PHP SOAP Client formats

2008-01-14 Thread Nathan Nobbe
On Jan 14, 2008 8:48 PM, Andrés Robinet [EMAIL PROTECTED] wrote: The only problem I had with nuSOAP was a name clash with the PHP 5 native extension. But they fixed it in November (there was a previous non-official fix also.. but can't remember the link right now). nuSOAP has been around for

Re: [PHP] Closures in PHP

2008-01-14 Thread Nathan Nobbe
when it comes to create_function(), id say its just as painful as building functions with html or writing queries by hand. namely, its prone to a lot of string escaping which produces awful hard to read code. i mean, the kind of code you write yourself and then look at a week later and say 'what

Re: [PHP] SimpleXML addChild() namespace problem

2008-01-14 Thread Nathan Nobbe
On Jan 14, 2008 10:22 PM, Carole E. Mah [EMAIL PROTECTED] wrote: This is problematic code, even though it works, because it auto-generates an unnecessary xmlns: attribute: $item-addChild('itunes:subtitle', $mySubTitle,itunes); It generates the following XML: itunes:subtitle

Re: [PHP] Closures in PHP

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 6:51 AM, Jochem Maas [EMAIL PROTECTED] wrote: Nathan Nobbe schreef: when it comes to create_function(), id say its just as painful as building functions with html or writing queries by hand. namely, its prone to a lot of string escaping which produces awful hard to read

Re: [PHP] SimpleXML addChild() namespace problem

2008-01-15 Thread Nathan Nobbe
On Jan 14, 2008 11:21 PM, Carole E. Mah [EMAIL PROTECTED] wrote: Yes, I tried the following: http://us3.php.net/manual/en/function.dom-domdocument-createelementns.php Same results. based upon information from bug #43221, if you define the namespace beforehand it will work. ?php $xml =

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to validate if there were 3 text input fields to collect the data, rather than 1, free-form field. -nathan

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 9:30 AM, Per Jessen [EMAIL PROTECTED] wrote: Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? A regular expression perhaps? you

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 10:02 AM, Per Jessen [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to validate if there were 3 text input fields to collect the data

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 10:46 AM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 15, 2008 10:38 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, January 15, 2008 9:02 am, Per Jessen wrote: Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about

Re: [PHP] Closures in PHP

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 7:31 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: when i said a function would have to be loaded into the interpreter to avoid a runtime error upon invocation, i didnt mention that its best to programatically verify it can be called before letting the runtime error occur

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 1:31 PM, Adam Williams [EMAIL PROTECTED] wrote: Andrew Ballard wrote: All the more reason I would turn it into a timestamp or DateTime object in PHP first. That will prevent trying to insert something like what I used above. Then I would get rid of the MySQL STR_TO_DATE

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 2:24 PM, Andrew Ballard [EMAIL PROTECTED] wrote: On Jan 15, 2008 2:05 PM, Brady Mitchell [EMAIL PROTECTED] wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of

Re: [PHP] Closures in PHP

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 1:58 AM, Larry Garfield [EMAIL PROTECTED] wrote: On Tuesday 15 January 2008, Nathan Nobbe wrote: when i said a function would have to be loaded into the interpreter to avoid a runtime error upon invocation, i didnt mention that its best to programatically verify it can

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
to all who have posted classes w/ the singleton instance as a public static; this is not good. the singleton instance should be stored in a private static variable. why? because, otherwise client code can just access the value directly, and even unset the instance; which sort of defeats the

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 1:36 PM, Julian [EMAIL PROTECTED] wrote: I would like to understand what am I missing fom the concept here are the issues i see; you should have a private static for the instance of dbaccess you should have a private instance variable for the instance of the mysqli class

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 3:59 PM, Jochem Maas [EMAIL PROTECTED] wrote: given that dbaccess doesn't extend mysqli instantiation of dbaccess is completely pointless no? i dont know; i think using an instance of dbaccess to control a single instance of the mysqli class is appropriate. personally, i

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 4:55 PM, Jochem Maas [EMAIL PROTECTED] wrote: Eric Butera schreef: I still don't understand the obsession of a singleton in regards to a db connection. Using a registry is a much better practice I think. I think I alluded to the registry pattern in my reply above -

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 5:06 PM, Eric Butera [EMAIL PROTECTED] wrote: Also with the registry you can use lazy loading. singleton is typically implemented with a lazy loading approach, and most of the code samples ive seen on this thread today use a lazy loading approach. could you give us a more

Re: [PHP] green bean question on singleton php5

2008-01-16 Thread Nathan Nobbe
On Jan 16, 2008 5:09 PM, Eric Butera [EMAIL PROTECTED] wrote: Here is an implementation: http://framework.zend.com/manual/en/zend.registry.html Here is another: http://www.stubbles.net/browser/trunk/src/main/php/net/stubbles/util/stubRegistry.php cool; ill have a look when i get home.

Re: [PHP] Function-return-array idea

2008-01-17 Thread Nathan Nobbe
On Jan 16, 2008 6:32 PM, Stijn Leenknegt [EMAIL PROTECTED] wrote: Hello I've an idea for PHP6. Let's kickoff with an example. ?php $info = getUserInformation($id); //return an array with all the information of an user. echo $info['naam']; ? This is nice, but when I want one element of

Re: [PHP] Foreach

2008-01-17 Thread Nathan Nobbe
On Jan 17, 2008 5:49 PM, Pastor Steve [EMAIL PROTECTED] wrote: Here is my code: $name = $_POST['name']; if ($name) { foreach ($name as $t) { echo $t; } $order = $_POST['order']; if ($order) { foreach ($order as $i) { //Update the table in MySQL

Re: [PHP] Foreach

2008-01-17 Thread Nathan Nobbe
On Jan 17, 2008 11:40 PM, Jim Lucas [EMAIL PROTECTED] wrote: Pastor Steve wrote: Here is my code: $name = $_POST['name']; if ($name) { foreach ($name as $t) { echo $t; } $order = $_POST['order']; if ($order) { foreach ($order as $i) {

Re: [PHP] SimpleXML addChild() namespace problem

2008-01-18 Thread Nathan Nobbe
On Jan 18, 2008 12:04 PM, Carole E. Mah [EMAIL PROTECTED] wrote: I did exactly this, and still got: ?xml version=1.0 encoding=UTF-8? rss xmlns:itunes=http://www.itunes.com/dtds/podcast-1.0.dtd; version= 2.0 channel !-- snipping, some elements omitted ... --

Re: [PHP] Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-18 Thread Nathan Nobbe
On Jan 18, 2008 7:40 PM, Jim Lucas [EMAIL PROTECTED] wrote: Plus, what about a tool/site that would allow me to view a graph of the entire of the list/archive? A graph including, but not limited to post/person post/email address posts/day posts/country etc... Thanks -- Jim Lucas i

Re: [PHP] SimpleXML addChild() namespace problem

2008-01-18 Thread Nathan Nobbe
On Jan 18, 2008 2:48 PM, Carole E. Mah [EMAIL PROTECTED] wrote: On Jan 18, 2008 12:22 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: Are you trying to read an existing document into a SimpleXMLElement, or are you trying to create a SimpleXMLElement instance and generate a document from

Re: [PHP] Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-18 Thread Nathan Nobbe
On Jan 18, 2008 4:56 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 18, 2008 4:52 PM, Jim Lucas [EMAIL PROTECTED] wrote: PostTrack [Dan Brown] wrote: 514 (100%) 975244 (100%) EVERYONE 69(13.4%) 92431(9.5%) Richard Lynch [EMAIL PROTECTED]

Re: [PHP] Still can't fix it.

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 9:54 AM, Apple [EMAIL PROTECTED] wrote: Still can't fix it. I've checked everything like 20-30 times, I feel like crazy. Everything should work fine, but it doesn't. :( im installing mencode; atm; ill mess with it for a little while once its finished. -nathan

Re: [PHP] Still can't fix it.

2008-01-19 Thread Nathan Nobbe
ok, it seems to be working, pretty easily for me; note, this code is a gross oversimplification of anything i would use in production; its just a little test script. ?php $sourceFile = $_GET['sourceFile']; $destFile = $_GET['destFile']; echo $sourceFile . ' ' . $destFile;

Re: [PHP] Still can't fix it.

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 11:13 AM, Jochem Maas [EMAIL PROTECTED] wrote: Apple schreef: Still can't fix it. I've checked everything like 20-30 times, I feel like crazy. Everything should work fine, but it doesn't. :( If anyone have an idea about what it can be, please let me know. what's

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Nathan Nobbe
i think the script is pretty cool, dan ;) -nathan

Re: [PHP] Re: Still can't fix it.

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:29 PM, Apple [EMAIL PROTECTED] wrote: I've tried only to run it from browser. I've just tried to run it from cli and I get error message: Fatal error: Call to undefined function mysql_connect() in /home/re/videoEncode.php on line 3 likely that was breaking it from

Re: [PHP] Re: Still can't fix it.

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:34 PM, Apple [EMAIL PROTECTED] wrote: Jochem Maas jochem at iamjochem.com writes: what's you exact code? how [exactly] do you run the code? Did you ask me or Nathan? My current code is (modified little bit, because Gmane doesn't allow to use lines longer than 80

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:57 PM, Alain Roger [EMAIL PROTECTED] wrote: Hi, I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? as my website is hosted by and external company, i do not have access to apache conf file. you could take the code

Re: [PHP] Re: system command runs application, but application doesn't work correctly

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:24 PM, Apple [EMAIL PROTECTED] wrote: Richard Lynch ceo at l-i-e.com writes: They also won't have your same environment, e.g., home directory $HOME. Check permissions on all files/directories. Use complete pathnames from the root hard drive:

Re: [PHP] I'm confused, but it works

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:46 PM, Apple [EMAIL PROTECTED] wrote: Nathan Nobbe quickshiftin at gmail.com writes: if it works there, and not from the browser, id imagine its a permissions issue Ok, I wrote simple script and run it from CLI. It works. Then I've tried to run simple script from

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 1:46 PM, Alain Roger [EMAIL PROTECTED] wrote: Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see the index of folders... for sure users should be able to browse the website, but not to see its structure by

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 1:47 PM, Richard Lynch [EMAIL PROTECTED] wrote: $email = str_replace(array('@', '.'), array(' AT ', ' DOT ', $email); This will defeat 99.% of spambots, and still be quite usable for any legitimate purpose. this is a great idea; and its the same concept employed for

[PHP] password hashing and crypt()

2008-01-19 Thread Nathan Nobbe
hi all, recently ive been debating a bit about the use of the crypt() function and the best practice thereof, im hoping you can help to clarify this for me. so, the crypt function http://www.php.net/manual/en/function.crypt.php has a second parameter, $salt, which, if not supplied will be

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 3:08 PM, Jochem Maas [EMAIL PROTECTED] wrote: or alternatively use that .htaccess to deny apache index listings. i of course use .htaccess, but OP was asking for a php based solution, so thats what i supplied, thats all. -nathan

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 2:06 PM, Per Jessen [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: On Jan 19, 2008 1:47 PM, Richard Lynch [EMAIL PROTECTED] wrote: [snip] regarding configuring mail clients to omit the senders address in the reply, well, this is one of those things that you just cant

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 7:50 PM, Jochem Maas [EMAIL PROTECTED] wrote: my reply was to the OP, not you as such, given that your also answering his question, sorry for the misunderstanding. i think half the time i get confused myself; like this morning when you said show us your exact code, to the OP

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 9:25 PM, Ashley M. Kirchner [EMAIL PROTECTED] wrote: Well, at least we know which subject will make it to the top next week nice; say, dan, here comes another feature request; can we see the top thread (or 3 :)) as well ? -nathan

Re: [PHP] password hashing and crypt()

2008-01-19 Thread Nathan Nobbe
thanks for the great responses guys. i guess what im really getting at though is, if crypt() will embed a salt in the value it returns automatically, is there any benefit to creating a salt to pass to the second argument and storing that as well? conceivably, passwords already have a salt using

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008:php-general@lists.php.net

2008-01-20 Thread Nathan Nobbe
have you ever googled for [EMAIL PROTECTED] ? looks like it brings up some thread from around september of 07... oh wait; isnt that before dan started up the stat program .. -nathan

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008:php-general@lists.php.net

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 4:09 PM, Børge Holen [EMAIL PROTECTED] wrote: MAN don't expose it like that. Now he'll get tons upon tons of spam :D damn, did i, like, just publish it again :-O -nathan

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008:php-general@lists.php.net

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 4:38 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Sun, 2008-01-20 at 16:13 -0500, Nathan Nobbe wrote: On Jan 20, 2008 4:09 PM, Børge Holen [EMAIL PROTECTED] wrote: MAN don't expose it like that. Now he'll get tons upon tons of spam :D damn, did i, like, just

Re: [PHP] $_POST Array and Cleaning

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 9:22 PM, nihilism machine [EMAIL PROTECTED] wrote: I'm trying to create a function that will first take an array of $_POSTs and give them key/value pairs like variables. For instance, if i had $_POST['whatever'] = whatever, that would be made into $whatever = whatever, then i

Re: [PHP] change php variable depending on selection

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 8:51 PM, PHP-General [EMAIL PROTECTED] wrote: Hi, I've looked everywhere on the web (except of course the place that has the answer ;) ) but can't seem to find a solution. I'm trying to build an rss reader on a webpage. The idea is simple: there's a dropdown box where you

Re: [PHP] Digital Downloads and Scale

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 8:43 PM, Jochem Maas [EMAIL PROTECTED] wrote: get a book? I happen to be rereading building scalable websites by Carl Henderson ... something like that might help you to get a better idea of what you might be facing. wow, you read books too? i though i was the only one! dg,

Re: [PHP] POST/GET into variables

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 9:47 PM, nihilism machine [EMAIL PROTECTED] wrote: how does this look? should this by me calling ... myforms = new forms(); work by turning all key/value pairs for both get and post into variable names of the same name as the get/post key, and the variable values as the values

Re: [PHP] change php variable depending on selection

2008-01-20 Thread Nathan Nobbe
here is a complete, working example; hope it helps. http://nathan.moxune.com/exampleDynamicSelect.php -nathan

Re: [PHP] POST/GET into variables

2008-01-20 Thread Nathan Nobbe
On Jan 20, 2008 10:15 PM, nihilism machine [EMAIL PROTECTED] wrote: im trying to keep this php4 OOP. im just trying to clean the post/gets and then make them all into variables with their names being the keys to the get/post, and their values as the variables values. then all you have to do

Fwd: [PHP] change php variable depending on selection

2008-01-21 Thread Nathan Nobbe
-- Forwarded message -- From: Nathan Nobbe [EMAIL PROTECTED] Date: Jan 21, 2008 10:43 AM Subject: Re: [PHP] change php variable depending on selection To: stp [EMAIL PROTECTED] On Jan 21, 2008 9:42 AM, stp [EMAIL PROTECTED] wrote: I'm sorry…..I've got the conversion

Re: [PHP] POST/GET into variables

2008-01-21 Thread Nathan Nobbe
On Jan 21, 2008 10:19 AM, Eric Butera [EMAIL PROTECTED] wrote: I don't think making a single generic function to iterate over every value in the GET/POST arrays is a very good idea. Each field on a form can contain very different pieces of data that should be handed quite differently. I

Re: [PHP] Debugging classes

2008-01-22 Thread Nathan Nobbe
On Jan 22, 2008 1:06 PM, TG [EMAIL PROTECTED] wrote: I have a semi-good understanding of classes even if I don't totally 'grok' the benefits for the projects I've worked on so far. One thing that keeps smacking me in the face, though, is reverse engineering in order to make proper changes

Re: [PHP] Debugging classes

2008-01-22 Thread Nathan Nobbe
On Jan 22, 2008 2:40 PM, Richard Lynch [EMAIL PROTECTED] wrote: At least, that would be one of the first features I'd put into an IDE, if I used OOP in PHP and if I used IDEs in the first place... actually php-eclipse and pdt both have pretty solid oop support for php. and theyre free. the

Re: [PHP] POST/GET into variables

2008-01-22 Thread Nathan Nobbe
On Jan 22, 2008 3:59 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, January 21, 2008 10:03 am, Nathan Nobbe wrote: On Jan 21, 2008 10:19 AM, Eric Butera [EMAIL PROTECTED] wrote: I don't think making a single generic function to iterate over every value in the GET/POST arrays

Re: [PHP] Debugging classes

2008-01-22 Thread Nathan Nobbe
On Jan 22, 2008 6:15 PM, Jochem Maas [EMAIL PROTECTED] wrote: TG schreef: I have a semi-good understanding of classes even if I don't totally 'grok' the benefits for the projects I've worked on so far. One thing that keeps smacking me in the face, though, is reverse engineering in

Re: [PHP] sessions/cookies

2008-01-22 Thread Nathan Nobbe
On Jan 22, 2008 9:54 PM, Eric Butera [EMAIL PROTECTED] wrote: I realize this link I'm posting is called auth too, but that wasn't my choice. that was kind of funny after your initial criticizm above, but to solars credit, its the auth 'package' so really the name isnt too bad, id say. You

Re: [PHP] Tool for programmer team

2008-01-22 Thread Nathan Nobbe
On Jan 22, 2008 2:40 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote: What is a good tool to coordinate a team of programmers efficiently? that is a big question, primarily because there are many facets of coordination with different tools to help out. obviously version control is one of the

Re: [PHP] password hashing and crypt()

2008-01-22 Thread Nathan Nobbe
alright, so you guys have responded and im really appreciative. you have me thinking now.. so what are the real issues here? 1. portability 2. security (obviously) im wondering now if crypt() is really even so practical. especially considering the deal where only 2 characters are

Re: [PHP] Foreach

2008-01-22 Thread Nathan Nobbe
On Jan 18, 2008 5:24 PM, Richard Lynch [EMAIL PROTECTED] wrote: If you are trying to keep the names and orders in parallel you need to do something not unlike: while (list($key, $name) = each($names)){ $order = $orders[$key]; $query = update whatever set order = $order where name =

Re: [PHP] unpack() big endian signed long?

2008-01-23 Thread Nathan Nobbe
On Jan 23, 2008 3:38 PM, Floor Terra [EMAIL PROTECTED] wrote: Hi, Is it possible to use unpack() to read a big endian signed long on a little endian machine? http://nl.php.net/pack refers to perl, on wich this function is based. The php function unpack() doesn't seem to support the and

Re: [PHP] are email address could be spammed

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 4:57 AM, Jochem Maas [EMAIL PROTECTED] wrote: it's 'our email' not 'are email' ;-) and yes we know about this problem. nothing much we can do about it get gmail; it works like a charm :) -nathan

Re: [PHP] are email address could be spammed

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 10:26 AM, Jochem Maas [EMAIL PROTECTED] wrote: like a charm for the marketing, ad-shovelling sales whores at google you. i dont know man; its a pretty nice user interface. i might try to setup an open source web interface for my server when i get the time, but for now i can

Re: [PHP] if

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 10:39 AM, Pastor Steve [EMAIL PROTECTED] wrote: Greetings, Can anyone point me in the right direction on this? I want a link to an image that appears below the link after it is clicked. I think it would be an ³if² statement, but I am not sure where to start. there are

Re: [PHP] forms and php

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 3:34 AM, Mark Pashia [EMAIL PROTECTED] wrote: If I fill in the fields of a form and hit the enter key to submit the form, no variables seem to be passed along. If I use the submit button, everything works perfectly. It seems that other forms on the web work with the enter key

Re: [PHP] Rename

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 3:51 PM, Pastor Steve [EMAIL PROTECTED] wrote: I have been looking, but the problem is that I don¹t know what questions to ask or what to look for. I think it is a rename function. That works, but it only does one file at a time. I was looking for something that will do all

Re: [PHP] Rename

2008-01-24 Thread Nathan Nobbe
here a simple little cli script that has the guts of what youre trying to accomplish. NOTE: this is not a comprehensive solution :) ?php $srcDir = $argv[1]; $destDir = $argv[2]; if(is_dir($srcDir) is_dir($destDir)) { $dirHandle = opendir($srcDir); while($curFile = readdir($dirHandle)) {

Re: [PHP] Rename

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 4:42 PM, Bastien Koert [EMAIL PROTECTED] wrote: http://ca3.php.net/manual/en/function.copy.php make the manual your friend rename() is much more efficient; since the original files will have to be deleted as well, with a copy approach. and i suspect rename() atomic as well.

Re: [PHP] pack it in

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 6:20 PM, Jochem Maas [EMAIL PROTECTED] wrote: someone asked about checksum values in another thread, I believe he got his answer no thanks to me. but whilst I was trying to help I got stuck playing with pack/unpack. so now I have the broadbrush question of what would one use

Re: [PHP] Looking for easier way to build email message

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 6:20 PM, Rene Brehmer [EMAIL PROTECTED] wrote: Drew a blank off the archive, so here goes... I'm working on some forms for our company website, all of which simply have to be mailed to us by email. After verifying that the content of all the fields is valid and the proper

Re: [PHP] pack it in

2008-01-24 Thread Nathan Nobbe
On Jan 24, 2008 7:13 PM, Jochem Maas [EMAIL PROTECTED] wrote: ok. that's where my brain goes to mush - all strings in php (for now) are binary ... what's the difference between the binary strings in php and such found in these 'binary files' that they need to be packed/unpacked? sorry if

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 3:35 PM, Thijs Lensselink [EMAIL PROTECTED] wrote: Change: }return $authenticated; to return $authenticated; } else it will never return the value from the function. But it will always give you undefined variable notice nice catch ;) -nathan

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
?PHP /// initialize the return variable $authenticated = false; function authentication(){ if(!isset($user) || !isset($pass)) { return false; } /// -- i would do it a bit nicer than this, but you get the idea if($user $pass) { // Keep in mind, PASSWORD has

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 1:01 PM, Floor Terra [EMAIL PROTECTED] wrote: If all these apache/php processes are a problem, you could try a different setup: Write a SOAP (or silmilar) webservice in a language that does support proper threading. Now call your SOAP function from your php script to send the

Re: [PHP] Rename

2008-01-26 Thread Nathan Nobbe
On Jan 26, 2008 3:52 AM, Nathan Rixham [EMAIL PROTECTED] wrote: vote 2 for: mv dir1/* dir2 its nice, but its platform dependent. -nathan

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 12:45 PM, Jochem Maas [EMAIL PROTECTED] wrote: you'll end up forking a complete apache process - assuming mod_php. you don't want that alright, Jocheem, now its my turn for a stupid question. doesnt apache fork a different process on each php request anyway, if its complied w/

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
oh; i just noticed you dont have formal parameters for $user or $pass; so, function authentication($user, $pass) { /// ... then you can remove the first line i put in there on the last post :) } -nathan

Re: [PHP] Foreach

2008-01-27 Thread Nathan Nobbe
On Jan 23, 2008 8:02 AM, Eric Butera [EMAIL PROTECTED] wrote: Maybe someday SPL will become part of the PHP manual too. ;) ill admit, the doxygen documentation is a little daunting at first. at least more so than phpDocumentor for example. but once youve cruised around the spl docs for a

Re: [PHP] htmlentities() does not remove escape

2008-01-27 Thread Nathan Nobbe
On Jan 27, 2008 1:27 PM, jekillen [EMAIL PROTECTED] wrote: Hello: I have a form that has a textarea and I do not want to disallow the use of single quote as apostrophe, or for any other normal stylization. So I am using html entities to change these characters into html entities. But the

Re: [PHP] Foreach

2008-01-27 Thread Nathan Nobbe
On Jan 27, 2008 7:24 PM, Eric Butera [EMAIL PROTECTED] wrote: I was just pointing out how fragmented PHP5+ is. Look at the docs on SPL and the DOM stuff, it's horrible. i hear you, and i agree, most of the php docs are good, but some of the oop stuff is kinda weak, like SoapClient, and

[PHP] interface inheritance

2008-01-27 Thread Nathan Nobbe
all, previously, on this list and elsewhere, i have raised the topic of interface inheritance, lamenting that php is void of the feature. to my utter amazement i discovered that php does in fact support interface inheritance, reading through some of Marcus Boergers' code in SPL.. i noticed

Re: [PHP] i enconter a question when use Zend Framework's _foward function

2008-01-27 Thread Nathan Nobbe
On Jan 27, 2008 9:53 PM, little btx [EMAIL PROTECTED] wrote: in the function init() ,i want to use the function _foward but it doesn't work. how to deal the problem i think youll have to be more specific, can you supply some code that illustrates the problem ? -nathan

Re: [PHP] i enconter a question when use Zend Framework's _foward function

2008-01-27 Thread Nathan Nobbe
On Jan 27, 2008 10:01 PM, little btx [EMAIL PROTECTED] wrote: public function init() try{ $this-subject = new subject($subject_id); }catch (Zend_Exception $e) { $this-_forward('index','error',null,array('error'=$e-getMessage()); } } when it catch the

Re: [PHP] Getting nuequiz pro wo to work in php5

2008-01-28 Thread Nathan Nobbe
On Jan 28, 2008 11:35 AM, Jim Lucas [EMAIL PROTECTED] wrote: Well, since this quiz app doesn't work. Does anybody have suggestions on a good tool to use for in-house/office training? Sort of like an employee initial training or evaluation quiz application. Guess it doesn't have to be just

Re: [PHP] determine file-upload's tmp-filename

2008-01-28 Thread Nathan Nobbe
On Jan 28, 2008 2:50 PM, Michael Fischer [EMAIL PROTECTED] wrote: well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either

Re: [PHP] Another question about functions...

2008-01-29 Thread Nathan Nobbe
On Jan 29, 2008 11:07 AM, Jason Pruim [EMAIL PROTECTED] wrote: What's happening is, I have the code set and it downloads the file into excel, but it doesn't have the database fields in it, rather a copy of the entire webpage which it trys to put into excel. this sounds to me like you may not

Re: [PHP] Handle time-outs and errors with file()

2008-01-29 Thread Nathan Nobbe
On Jan 29, 2008 10:58 AM, John Papas [EMAIL PROTECTED] wrote: I'm using file() to get the contents of a remote page in my script but I cannot find any information regarding how I could *gracefully* handle a broken network connection or even a time-out (slow connection). Is there a way?

Re: [PHP] How can I do this -- method chaining

2008-01-29 Thread Nathan Nobbe
On Jan 29, 2008 3:26 PM, Jochem Maas [EMAIL PROTECTED] wrote: Nathan Nobbe schreef: On Jan 29, 2008 3:02 PM, Stut [EMAIL PROTECTED] wrote: Why? What exactly do you think you're saving by not putting the instance in a variable? I can't think of one good reason to do this. its

Re: [PHP] Another question about functions...

2008-01-29 Thread Nathan Nobbe
On Jan 29, 2008 3:53 PM, Jason Pruim [EMAIL PROTECTED] wrote: I did as you suggested, and I think I found the reason... I included info for the doctype, and some files that are on all my pages... Once I comment out those lines it works just fine... I'm assuming that that is expected behavior?

Re: [PHP] Another question about functions...

2008-01-29 Thread Nathan Nobbe
On Jan 29, 2008 2:39 PM, Jason Pruim [EMAIL PROTECTED] wrote: Okay, so I checked everything I can think of, and it's still downloading it as an application which means it's downloading the entire website instead of just the data from the database... Anyone have any idea what to check? im

Re: [PHP] How can I do this -- method chaining

2008-01-29 Thread Nathan Nobbe
On Jan 29, 2008 2:27 PM, Andrew Ballard [EMAIL PROTECTED] wrote: On Jan 29, 2008 1:53 PM, Christoph Boget [EMAIL PROTECTED] wrote: Constructors return the object, correct? Actually, I don't think so. I believe constructors return void, while the 'new' keyword returns a copy of the object.

<    1   2   3   4   5   6   7   8   9   10   >