[PHP] Spaces in filename or path

2011-04-30 Thread Tim Streater
Does it matter to PHP filesystem functions if a path/to/file/name contains spaces? IOW, is this handled OK by design or should I replaces such spaces by backslash-space or would doing that present problems? Thanks -- tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: Re: [PHP] Spaces in filename or path

2011-04-30 Thread Tim Streater
On 30 Apr 2011 at 22:33, Richard Quadling rquadl...@gmail.com wrote: On 30 April 2011 22:07, Tim Streater t...@clothears.org.uk wrote: Does it matter to PHP filesystem functions if a path/to/file/name contains spaces? IOW, is this handled OK by design or should I replaces such spaces

Re: [PHP] Re: postgresql database access failure

2011-05-02 Thread Tim Streater
On 02 May 2011 at 11:05, e-letter inp...@gmail.com wrote: Here's the URL of the relevant manual page: http://www.php.net/manual/en/function.pg-fetch-result.php The manual page did not explain the purpose of the text 'die', so was ignored (;)). What, you mean this? $db =

Re: [PHP] Bold links

2011-05-07 Thread Tim Streater
On 07 May 2011 at 18:42, Michael Simiyu simiyu.mich...@gmail.com wrote: hey, straw. some php 101 here guys :) i want to bold the first name and last name in the code below... It's not PHP 101, it's HTML 101. tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: Re: [PHP] mysql problems

2011-05-12 Thread Tim Streater
On 11 May 2011 at 19:25, Curtis Maurand cur...@maurand.com wrote: $_cartTotal=$0.00; Surely that should be: $_cartTotal = 0.00; tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Error recovery - fatal errors

2011-05-14 Thread Tim Streater
I would like, in my app, to recover from as many run-time errors as possible, so that I can tidy up. And unsolicited output generated by the standard error system is really unhelpful as it becomes part of the ajax reply to the browser. So I've added my own error handler, but it seems that I

Re: Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Tim Streater
On 14 May 2011 at 15:05, Peter Lind peter.e.l...@gmail.com wrote: On 14 May 2011 12:33, Tim Streater t...@clothears.org.uk wrote: I would like, in my app, to recover from as many run-time errors as possible, so that I can tidy up. And unsolicited output generated by the standard error system

Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Tim Streater
On 16 May 2011 at 21:34, Peter Lind peter.e.l...@gmail.com wrote: You were trying to call a method on a non-object - how do you expect PHP to handle that if not with a fatal error? Anyway, good to hear you solved the issue - I misunderstood what you wanted to do (shut down in a proper

Re: Re: [PHP] A Review Request

2011-05-18 Thread Tim Streater
On 18 May 2011 at 20:31, Joshua Kehn josh.k...@gmail.com wrote: On May 18, 2011, at 3:22 PM, tedd wrote: What do you people think? I can say I really don't like your bracing style. I completely disagree - having the braces lined up is the only way to go. Means I don't have to search all

Re: Re: [PHP] A Review Request

2011-05-18 Thread Tim Streater
On 18 May 2011 at 22:22, Peter Lind peter.e.l...@gmail.com wrote: On 18 May 2011 23:12, tedd t...@sperling.com wrote: This is just one way to give-back. Suggesting people that they copypaste your code is a very bad way of giving back. Suggesting that they read and understand the code is a

Re: Re: [PHP] Warning: session_start()

2011-05-19 Thread Tim Streater
On 19 May 2011 at 10:20, Richard Quadling rquadl...@gmail.com wrote: On 18 May 2011 19:15, Nazish naz...@jhu.edu wrote: Hi everyone, !---            WHEN USER CLICKS 'ENTER' TO LOGIN

Re: Re: [PHP] A Review Request

2011-05-20 Thread Tim Streater
On 20 May 2011 at 04:03, Alex Nikitin niks...@gmail.com wrote: but here is a brief example: (!DEBUG) || error_log(Fetch Data: .memory_get_usage()/1048576); reads and writes a lot better and faster then: if(DEBUG) { $memory = memory_get_usage()/1048576; error_log(Fetch Data:

Re: Re: [PHP] A Review Request

2011-05-20 Thread Tim Streater
On 19 May 2011 at 23:47, Adam Richardson simples...@gmail.com wrote: You did make several other great points (session hijacking, multiple login attempts), but to be fair to Tedd, there are many levels of security, and I doubt he's trying to educate PHP developers with your background. In the

Re: Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Tim Streater
On 28 May 2011 at 14:11, Igor Konforti php@confiq.org wrote: It means that array $_POST does not have a key called negin. Simple If statement before line 4 would fix this. On Sat, May 28, 2011 at 16:03, Negin Nickparsa nickpa...@gmail.com wrote: suppose that i have this SIMPLE code:

Re: Re: [PHP] iPhone sadness

2011-05-30 Thread Tim Streater
On 30 May 2011 at 19:07, jean-baptiste verrey jeanbaptiste.ver...@gmail.com wrote: I like how people just like to complain about everything^^ But as the debate is raging I had a look over internet and http://www.caliburn.nl/topposting.html gave the best argument ever : we read from *top* to

Re: [PHP] Announcing New PHP Extension: System Detonation Library (was: phpsadness)

2011-06-04 Thread Tim Streater
On 03 Jun 2011 at 16:56, Daniel Brown danbr...@php.net wrote: First of all, a happy Friday to all here. Hopefully some of you will be able to pass this on to your boss and get sent home early. Second, as dreamed up in the previous thread, I've decided to take a few moments this morning

Re: Re: [PHP] phpsadness - P.C. shmee seee.

2011-06-05 Thread Tim Streater
On 05 Jun 2011 at 06:08, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 3, 2011, at 3:52 PM, Daevid Vincent wrote: ...actually, I do have some good ones here: http://daevid.com/content/examples/procmail.php It appears your browser does not support some of the advanced features this

Re: Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Tim Streater
On 05 Jun 2011 at 16:23, Geoff Shang ge...@quitelikely.com wrote: On Sun, 5 Jun 2011, Richard Riley wrote: I don't. I just don't want them to lock out my browser just because they don't support it. Many pages which don't work optimally under Lynx can still be read, which is all I'm

Re: Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Tim Streater
On 05 Jun 2011 at 21:28, Geoff Shang ge...@quitelikely.com wrote: On Sun, 5 Jun 2011, Richard Riley wrote: If they allowed incompatible browsers that caused havoc then before you know it the great unwashed would be demanding more and better support or complaining about lack of

Re: [PHP] What do you get for ...

2011-06-07 Thread Tim Streater
On 07 Jun 2011 at 11:35, Richard Quadling rquadl...@gmail.com wrote: What do you get for ... php -r var_dump(realpath(null)); OS X: string(10) /Users/tim -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] jQuery to PHP

2011-06-22 Thread Tim Streater
On 22 Jun 2011 at 19:44, Ethan Rosenberg eth...@earthlink.net wrote: I have a PHP program which will generate a chess board with a form in the program. I wish to fill the form by clicking one of the squares in the chess board. I am trying to use jQuery and Aja to do this. The Ajax call

Re: Re: [PHP] jQuery to PHP

2011-06-22 Thread Tim Streater
On 22 Jun 2011 at 20:56, Jim Lucas li...@cmsws.com wrote: On 22/6/2011 12:43 PM, Tim Streater wrote: On 22 Jun 2011 at 19:44, Ethan Rosenberg eth...@earthlink.net wrote: I have a PHP program which will generate a chess board with a form in the program. I wish to fill the form by clicking

Re: Re: Re: [PHP] jQuery to PHP

2011-06-22 Thread Tim Streater
On 22 Jun 2011 at 21:56, Ethan Rosenberg eth...@earthlink.net wrote: At 04:30 PM 6/22/2011, you wrote: On 22 Jun 2011 at 20:56, Jim Lucas li...@cmsws.com wrote: So the OP is using the form's action to reload the page, and seemingly making an ajax call under some circumstance that will also

Re: [PHP] jQuery to PHP

2011-06-23 Thread Tim Streater
On 23 Jun 2011 at 14:56, Ethan Rosenberg eth...@earthlink.net wrote: At 05:21 PM 6/22/2011, you wrote: 2) Instead of doing alert(yippee), seems to me you should alert on the results of the ajax call. I don't know how you get at those with jquery, but I imagine that is where you'll find the

Re: [PHP] Re: Php filter validate url

2011-06-27 Thread Tim Streater
On 27 Jun 2011 at 00:15, Richard Riley rile...@googlemail.com wrote: In addition your content type in your post is incorrect. Your header contains Content-Type: multipart/alternative; boundary=00151747b53cf2927204a6a46ebb But its not multipart. This happens a lot in this group and I dont

Re: Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-27 Thread Tim Streater
On 27 Jun 2011 at 13:18, Steve Staples sstap...@mnsi.net wrote: On Sat, 2011-06-25 at 16:11 -0500, Tamara Temple wrote: Well played, sir, well played. I think we should go through all the xkcd comics that relate to programming somehow and insert them in the php.net documentation :)

Re: [PHP] PHP 5.4.0alpha1 released

2011-06-28 Thread Tim Streater
On 28 Jun 2011 at 22:39, David Soria Parra d...@php.net wrote: You can read more information about this release here: http://www.php.net/archive/2011.php#id2011-06-28-1 Not quite yet, perhaps? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Tim Streater
On 29 Jun 2011 at 17:25, Richard Quadling rquadl...@gmail.com wrote: And UTC is not the same as GMT. Ish. Yes it is. GMT is only valid for 6 months of the year. Then, due to DST, it becomes BST. No, the UK is on GMT for 5 months a year and then on BST (GMT+1) for 7 months. -- Cheers --

Re: [PHP] PHP EOL

2011-07-04 Thread Tim Streater
On 04 Jul 2011 at 08:01, Stuart Dallas stu...@3ft9.com wrote: On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hello Stuart, After some closer look at the RFC Compliant manuals you suggested, I have determined that the creator of that code was in fact RFC821

Re: [PHP] Top Posting

2011-07-05 Thread Tim Streater
On 05 Jul 2011 at 15:29, ad...@buskirkgraphics.com wrote: Since this is the 3rd time I have been chewed out for top posting. Anyone know how to make Outlook changes its reply position. I am using outlook 2007 and I do not find an option for this. I have to scroll down to the bottom of the

Re: Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Tim Streater
On 06 Jul 2011 at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: You are currently listed in my /etc/postfix/helo_checks file as 64.118.87.45 REJECT Your mail server is a source of SPAM. Fix it! My mail server is my isp's. It is a shared server and not under my control. They are

Re: Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Tim Streater
On 06 Jul 2011 at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: Frankly, I don't know why you are getting mail from me - I'm not sending you any. You're sending mail to all of us. Here's what I got from you: To: php-general@lists.php.net From:Jim Giner

[PHP] What is a label?

2011-07-13 Thread Tim Streater
Looking over the definition of a function today I see: Function names follow the same rules as other labels in PHP. but I can't find the definition of a label anywhere. I can't see it listed in the contents - have I overlooked it? If not, how can I request the the doccy be updated? Tim

Re: Re: [PHP] What is a label?

2011-07-13 Thread Tim Streater
On 13 Jul 2011 at 22:39, Micky Hulse rgmi...@gmail.com wrote: They must mean labels as in general naming convention rules for programming... Like not naming a variable/function label with a number at the front. Here's a page about variables:

Re: Re: [PHP] Your language sucks because...

2011-07-14 Thread Tim Streater
On 14 Jul 2011 at 01:59, Lester Caine les...@lsces.co.uk wrote: Daevid Vincent wrote: (at the risk of starting another $h!t storm like the last time) http://wiki.theory.org/YourLanguageSucks#PHP_sucks_because: Perhaps when they get around to checking the facts ... most of the content will

Re: [PHP] How to sum monetary variables

2011-07-18 Thread Tim Streater
On 18 Jul 2011 at 23:00, Martín Marqués martin.marq...@gmail.com wrote: I'm building a table (which is a report that has to be printed) with a bunch of items (up to 300 in some cases) that have unitary price (stored in a numeric(9,2) field), how many there are, and the total price for each

[PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
I need to be able to convert a line of the form: From to have either one more or one less at the front. A web site tells me that the regexps to use are: 1,$s/^*From // and 1,$s/^(*From )/\1/ respectively (there is a single space after From). So, if my text string is in $line, I ought to

Re: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:35, Dajka Tamás vi...@vipernet.hu wrote: I lost trail, what do you want to do? You want to convert From to this: From The number of in front of From is not known. I want to be able to add or remove one. -- Cheers -- Tim -- PHP General Mailing List

Re: RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:57, Dajka Tamás vi...@vipernet.hu wrote: You want to do it in a greater text, I think. 1,$s/^(*From )/\1/ $line = preg_replace ($pattern, $replacement, $line); Adding one '': preg_replace('/(^[]+From )/','$1', $line) Removing one '': preg_replace('/(^([]+From

Re: RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:57, Dajka Tamás vi...@vipernet.hu wrote: You want to do it in a greater text, I think. See below. 1,$s/^(*From )/\1/ $line = preg_replace ($pattern, $replacement, $line); Adding one '': preg_replace('/(^[]+From )/','$1', $line) Removing one '':

[PHP] pathinfo function

2011-07-26 Thread Tim Streater
Is it to be expected that, if a file has no extension, and I do this: $info = pathinfo ($myfile); that I will get an error if I try to reference $info[extension] ?? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] pathinfo function

2011-07-27 Thread Tim Streater
On 26 Jul 2011 at 23:55, Micky Hulse rgmi...@gmail.com wrote: On Tue, Jul 26, 2011 at 3:47 PM, Tim Streater t...@clothears.org.uk wrote: that I will get an error if I try to reference $info[extension] ?? From what I can tell via reading the docs: The following associative array elements

Re: RE: Re: [PHP] pathinfo function

2011-07-27 Thread Tim Streater
On 27 Jul 2011 at 11:09, Mike Ford m.f...@leedsmet.ac.uk wrote: -Original Message- From: Tim Streater [mailto:t...@clothears.org.uk] Seems to me that's the case. However the doc is ambiguous, especially as I *asked* for that key to be returned. IMO it should exist and be empty

Re: Re: [PHP] Re: testing

2011-08-04 Thread Tim Streater
On 04 Aug 2011 at 15:48, Jim Giner jim.gi...@albanyhandball.com wrote: Sounds like time for me to move on. Thanks for the info Dan. Say Jim, Why don't you pick it up as mail like the rest of us? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: Re: [PHP] pass text variables to next page

2011-08-09 Thread Tim Streater
On 09 Aug 2011 at 13:30, Chris Stinemetz chrisstinem...@gmail.com wrote: Not sure if I am doing it right. It looks like the last single quote is being escaped. When I dump the query I get: SELECT store_id, store_subject FROM stores WHERE store_subject = 'Bella Roe 4980 Roe Blvd\' I am

Re: [PHP] Using function prototypes in code

2011-08-10 Thread Tim Streater
On 10 Aug 2011 at 02:10, Frank Thynne frank.thy...@gmail.com wrote: In the interest of clarity and maintainability I would like to be able to write code that makes it clear what kind of arguments a function expects and what it returns. So add the appropriate comments to your functions.

Re: Re: [PHP] text insertion

2011-08-10 Thread Tim Streater
On 10 Aug 2011 at 22:39, Daniel P. Brown daniel.br...@parasane.net wrote: On Wed, Aug 10, 2011 at 17:37, Chris Stinemetz chrisstinem...@gmail.com wrote: No luck. Thanks. Per list rules, please don't top-post. If the situation you're describing is accurate and correct, then pre is

Re: Re: [PHP] text insertion

2011-08-10 Thread Tim Streater
On 10 Aug 2011 at 22:07, Chris Stinemetz chrisstinem...@gmail.com wrote:    Use HTML 'pre' tags:        pre?php echo $your_content; ?/pre I just tried that and that puts all the text on a single line. You could write the string into another textarea, which you could make readonly for

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Tim Streater
On 11 Aug 2011 at 02:22, Jason Pruim pru...@gmail.com wrote: while ($num != 1) { while($row = mysql_fetch_assoc($result)) { $padnum = number_pad($num, 4); echo $row['areacode'] . - . $row['prefix'] . - . $padnum . BR; $num++; } } This is certain to fail.

Re: Re: [PHP] Login with Remember me Feature

2011-08-14 Thread Tim Streater
On 14 Aug 2011 at 14:23, Alekto Antarctica alekto.antarct...@gmail.com wrote: *function loggedin()* *{* * if (isset($_SESSIONS['username']) || isset($_COOKIE['username']))* * {* * $loggedin = true;* * return $loggedin;* * }* *}* Why not justreturn true; And what happens if your if

Re: [PHP] How to catch an irregular end of an application?

2011-08-26 Thread Tim Streater
On 26 Aug 2011 at 01:33, Andreas maps...@gmx.net wrote: what is the best practice to catch an irregular end of an application? The browser might crash or the user closes accidently the browser window decides to jump away to his favourite bloq without loging out of my application. Is there

Re: Re: [PHP] Re: Code should be selv-maintaining!

2011-08-29 Thread Tim Streater
On 29 Aug 2011 at 21:32, George Langley george.lang...@shaw.ca wrote: The One True Brace Style: http://en.wikipedia.org/wiki/Indent_style Didn't know there was a name for the way I learned to indent! Make sense to me - looks so much cleaner and less scrolling/printing. And, I

Re: Re: [PHP] Code should be selv-maintaining!

2011-09-01 Thread Tim Streater
On 01 Sep 2011 at 11:42, Richard Quadling rquadl...@gmail.com wrote: On 30 August 2011 23:25, Richard Quadling rquadl...@gmail.com wrote: On 30 August 2011 20:09, Robert Cummings rob...@interjinn.com wrote: You're just saying that so Tedd will be your friend!! Come now, let's be honest with

Re: [PHP] Opening Multiple Files

2011-09-07 Thread Tim Streater
On 07 Sep 2011 at 15:21, Ron Piggott ron.pigg...@actsministries.org wrote: Hi Everyone I am trying to load an HTML book into mySQL. The book was distributed with each chapter being it’s own HTML file. The only way I know how to open a file is by specifying the file name. Such as:

Re: Re: [PHP] What would you like to see in most in a text editor?

2011-09-14 Thread Tim Streater
On 14 Sep 2011 at 12:40, Richard Quadling rquadl...@gmail.com wrote: On 14 September 2011 01:23, tamouse mailing lists tamouse.li...@gmail.com wrote: On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings rob...@interjinn.com wrote: I'm a big fan of editors that work in the terminal. You'll get

Re: Re: Re: [PHP] What would you like to see in most in a text editor?

2011-09-14 Thread Tim Streater
On 14 Sep 2011 at 17:52, Paul M Foster pa...@quillandmouse.com wrote: Eventually I switched to Vim (counter-intuitively) because 1) there's no *unix variant on which it's not available; 2) at some point, you're probably going to *have* to know how to operate Vi if you move around among

Re: Fwd: [PHP] Bug?

2011-09-15 Thread Tim Streater
On 15 Sep 2011 at 22:43, tamouse mailing lists tamouse.li...@gmail.com wrote: For the floats, http://us2.php.net/operators.comparison makes it pretty clear (and this has been a well-known thing about floats as far back as Uni for me, in 1979). The fact that floating point hardware has

[PHP] Search for string followed by whitespace

2011-09-18 Thread Tim Streater
At the moment, I'm doing this: $start = stripos ($body, a , $loc); You'll note the space after the 'a'. But I really need to search in $body for 'a' followed by any whitespace char, at least one, starting at the $loc'th character, and returning the location of the string in $start. I had a

Re: [PHP] Question about losing port number

2011-09-26 Thread Tim Streater
On 26 Sep 2011 at 23:45, vince chan rainma...@gmail.com wrote: I have a general question about PHP: So basically I have a link, and I want the href to be absolute., so I do 'https://' . $_SERVER['HTTP_HOST'] . '/login' ; this gives me https://127.0.0.1/login on my local; however, what i

Re: [PHP] Input variable from form help request

2011-09-29 Thread Tim Streater
On 29 Sep 2011 at 13:30, PHProg php...@speedemessenger.com wrote: I'm trying to create a standard web form that will use a PHP script to copy a file from one server to another. [snip] ?php if(!@copy('http://mydomain.com/files/.$_POST['trakname'].','/.$_POST['dirna

Re: [PHP] Variable question

2011-10-01 Thread Tim Streater
On 01 Oct 2011 at 18:59, Ron Piggott ron@actsministries.org wrote: If $correct_answer has a value of 3 what is the correct syntax needed to use echo to display the value of $trivia_answer_3? I know this is incorrect, but along the lines of what I am wanting to do: echo

[PHP] Multiple SQLite statements

2011-10-10 Thread Tim Streater
I would like to use the SQLite3 (not PDO) interface to SQLite, and I would like to be able to supply a string containing several SQL statements and have them all executed, thus saving the overhead of several calls. It *appears* that this may be how it actually works, but I wondered if anyone

Re: Re: [PHP] Re: Oi , Portas/ Hello, Ports

2011-10-10 Thread Tim Streater
On 10 Oct 2011 at 19:30, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Jim Giner jim.gi...@albanyhandball.com wrote: QI.VOLMAR QI qi.vol...@gmail.com wrote in message news:cab7l6ey9rkfwtmprpe0fk3doo5s1c5jyhpnbt5rjj0f_eb5...@mail.gmail.com... Alguem sabe se, e como eu posso trabalhar com

Re: Re: [PHP] Multiple SQLite statements

2011-10-11 Thread Tim Streater
On 11 Oct 2011 at 03:03, Paul M Foster pa...@quillandmouse.com wrote: On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: I would like to use the SQLite3 (not PDO) interface to SQLite, and I would like to be able to supply a string containing several SQL statements and have them

Re: Re: Re: [PHP] Multiple SQLite statements

2011-10-11 Thread Tim Streater
On 11 Oct 2011 at 10:47, David Robley robl...@aapt.net.au wrote: Tim Streater wrote: On 11 Oct 2011 at 03:03, Paul M Foster pa...@quillandmouse.com wrote: On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: I would like to use the SQLite3 (not PDO) interface to SQLite, and I

Re: Re: Re: Re: [PHP] Multiple SQLite statements

2011-10-11 Thread Tim Streater
On 11 Oct 2011 at 11:25, David Robley robl...@aapt.net.au wrote: Tim Streater wrote: On 11 Oct 2011 at 10:47, David Robley robl...@aapt.net.au wrote: Tim Streater wrote: On 11 Oct 2011 at 03:03, Paul M Foster pa...@quillandmouse.com wrote: On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim

Re: Re: [PHP] Local variable protection

2011-10-13 Thread Tim Streater
On 13 Oct 2011 at 16:25, Tedd Sperling tedd.sperl...@gmail.com wrote: So, if in your main script you have the statement: $myVar = 'test'; Then the $GLOBAL['myVar'] has also been created and will hold the value of 'test' without any additional coding. While many of you will say But of

Re: Re: [PHP] Local variable protection

2011-10-14 Thread Tim Streater
On 14 Oct 2011 at 16:46, Tedd Sperling tedd.sperl...@gmail.com wrote: On Oct 13, 2011, at 11:37 AM, Tim Streater wrote: On 13 Oct 2011 at 16:25, Tedd Sperling tedd.sperl...@gmail.com wrote: So, if you want a main script variable (i.e., $myVar) to be accessed by a function, you can do

Re: Re: [PHP] junk from my forms output

2011-10-19 Thread Tim Streater
On 19 Oct 2011 at 22:27, Simon J Welsh si...@welsh.co.nz wrote: On 20/10/2011, at 10:24 AM, hanson zhou wrote: I have the following in a file called hello.php in my htdocs directory (Apache webroot). form action=action.php method=post pYour name: input type=text name=name //p pYour age:

Re: [PHP] Friday Distraction

2011-10-21 Thread Tim Streater
On 21 Oct 2011 at 17:27, Daniel Brown danbr...@php.net wrote: I'll get this week's Friday distraction kicked off here with something shared with me by a Facebook friend. If you're on Facebook, try this. Well, I'm not. I took one look at their TsCs and thought Sod that! -- Cheers -- Tim

Re: Re: [PHP] Friday Distraction

2011-10-21 Thread Tim Streater
On 21 Oct 2011 at 21:30, Govinda govinda.webdnat...@gmail.com wrote: I did not use the takethislollipop.com app, so I don't know either what is its point (I hesitate like others said they do, to let apps grab all my FB data), but here I was just commenting on FB and social apps in general.

Re: Re: [PHP] Geo IP Location help needed...

2011-10-25 Thread Tim Streater
On 25 Oct 2011 at 02:36, DealTek deal...@gmail.com wrote: On Oct 24, 2011, at 6:23 PM, Bastien wrote: On 2011-10-24, at 9:07 PM, DealTek deal...@gmail.com wrote: If the IP is showing, could there be some left over debug in some function? If the IP is not in your list it could be anything

Re: Re: [PHP] Execute permission question

2011-10-28 Thread Tim Streater
On 28 Oct 2011 at 16:01, Tedd Sperling tedd.sperl...@gmail.com wrote: On Oct 27, 2011, at 7:49 PM, Daniel Brown wrote: But does having execute permissions set on a script affect the scripts ability to run shell commands? No, as Dan has said. But if you have a file called wiggy, containing

Re: [PHP] What is an information_id in directory

2011-10-29 Thread Tim Streater
On 29 Oct 2011 at 20:46, Ernie Kemp ernie.k...@sympatico.ca wrote: 2 - Make a new content area in Site Manager-Content Manager. It doesn't matter what you put in your content area, you could just put This is my new content area or Hello World if you so choose. 3 - Grab the information_id of

Re: Re: [PHP] Safari and PDF

2011-11-15 Thread Tim Streater
On 15 Nov 2011 at 22:36, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I always thought that opening a PDF inside the browser was a rubbish idea anyway. I've uninstalled Adobe Reader from my work machine now and the world is a happier place! Well I'd rather it displays in the browser

Re: [PHP] Think I found a PHP bug

2011-11-15 Thread Tim Streater
On 15 Nov 2011 at 22:34, Geoff Shang ge...@quitelikely.com wrote: The bug is that if a server's timezone is set to Europe/London and you don't set an explicit timezone in your script, if it's winter time in the UK, PHP thinks the timezone is UTC instead of Europe/London. I find I need to do

Re: RE: [PHP] Safari and PDF

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 00:43, HallMarc Websites m...@hallmarcwebsites.com wrote: And in conclusion; sorry, I get uppity after a long day LOL. It's as I already thought; the answer is NO. So here is what I will do for any of you looking for an answer and stumbling across my slight rant, I will

Re: RE: RE: [PHP] Safari and PDF

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 12:13, HallMarc Websites m...@hallmarcwebsites.com wrote: Seems strange that you are given a choice. My clients have been telling me that they are told to get the latest Acrobat Reader by Safari. Which they have done (again why allow a plugin that isn't supported get

[PHP] {} forms

2011-11-16 Thread Tim Streater
I'm looking at the source of a web sockets server and I see these various forms: ws://{$host}{$path} HTTP/1.1 ${status}\r\n Are these simply equivalent to: ws:// . $host . $path HTTP/1.1 . $status . \r\n; and if so, is there any particular benefit to using that form? Or if not, what

Re: Re: [PHP] {} forms

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 14:27, Richard Quadling rquadl...@gmail.com wrote: If you want to embed $array[CONSTANT], then the {} is used. I use {} out of habit for non arrays. Not sure if there is an impact. http://docs.php.net/manual/en/language.types.string.php#example-71 shows the use. Oh.

Re: Re: [PHP] Think I found a PHP bug

2011-11-17 Thread Tim Streater
On 16 Nov 2011 at 16:30, Geoff Shang ge...@quitelikely.com wrote: On Wed, 15 Nov 2011, Tim Streater wrote: I find I need to do this: date_default_timezone_set (@date_default_timezone_get ()); in all my scripts since 5.x.x to avoid rude messages. Apart from the fact that I've not seen

[PHP] socket_recv

2011-11-17 Thread Tim Streater
I'm playing around with web sockets and have found a couple of simple servers written in PHP. They both appear to perform the initial handshake with a client but then just give up because socket_recv reports that there is no data. I'm confused by this as, the handshake being complete, I

Re: Re: [PHP] Sniping on the List

2011-11-18 Thread Tim Streater
On 18 Nov 2011 at 05:40, Robert Cummings rob...@interjinn.com wrote: without a proof it's just farts in the wind :) No more valid than a theory of creation or the big ass spaghetti thingy majingy dude. Folded The theory of creation is not a theory. It's a hypothesis, as is scientific

[PHP] include

2011-11-19 Thread Tim Streater
At the moment I'm using an instance of apache to run PHP scripts, as and when required via AJAX. Having got some understanding of web sockets, I'm minded to look at having a small server to execute these functions as required. The scripts, some 50 or so, are only about 300kbytes of source code,

Re: Re: [PHP] include

2011-11-20 Thread Tim Streater
On 20 Nov 2011 at 10:36, Tommy Pham tommy...@gmail.com wrote: I think you're approaching this the wrong way. 1) have a clear understanding of PHP - syntax, capabilities, etc. That's what I'm doing - gathering information about bits of PHP that I've not used (or not used very much) before to

Re: Re: [PHP] include

2011-11-21 Thread Tim Streater
On 20 Nov 2011 at 23:46, Tamara Temple tamouse.li...@tamaratemple.com wrote: Tim Streater t...@clothears.org.uk wrote: At the moment I'm using an instance of apache to run PHP scripts, as and when required via AJAX. Having got some understanding of web sockets, I'm minded to look at having

Re: [PHP] include

2011-11-21 Thread Tim Streater
On 21 Nov 2011 at 11:10, Tommy Pham tommy...@gmail.com wrote: On Mon, Nov 21, 2011 at 2:56 AM, Tim Streater t...@clothears.org.uk wrote: I'm looking for confirmation that:  include $fn; is an allowed form of the include statement. RTFM [1] example #6 ;) [1] http://php.net

[PHP] Class instance pointers

2011-11-29 Thread Tim Streater
Is there any benefit to setting a pointer to a class instance to null before returning from a function? As in: function myfunc () { $p = new myclass (); // do stuff $p = null; } Thanks. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To

Re: Re: [PHP] Class instance pointers

2011-11-29 Thread Tim Streater
On 29 Nov 2011 at 17:01, cimodev cimo...@googlemail.com wrote: Am 29.11.2011 16:56, schrieb Tim Streater: Is there any benefit to setting a pointer to a class instance to null before returning from a function? As in: function myfunc () { $p = new myclass (); // do stuff

Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Tim Streater
On 04 Jan 2012 at 14:09, Richard Quadling rquadl...@gmail.com wrote: Where do I put my php.ini file for a MacBook Air? I've only had it 2 days and having trouble with the date.timezone setting. Hmmm, looks like I haven't got one on my Mini. Which doesn't appear to matter as a number of PHP

Re: Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Tim Streater
On 04 Jan 2012 at 21:01, Robert Williams rewilli...@thesba.com wrote: On 1/4/12 13:33, Tim Streater t...@clothears.org.uk wrote: Also, if I remember right, Apple sets up Apache so that each user has his/her own config file inside the conf folder. You should make any config changes

Re: Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Tim Streater
On 04 Jan 2012 at 21:59, Robert Williams rewilli...@thesba.com wrote: On 1/4/12 14:34, Tim Streater t...@clothears.org.uk wrote: As I hinted in my previous mail, client and server side of my app are always on the user's machine. When the user starts the app, I create an apache config file

Re: RE: [PHP] passing variables to php script

2012-01-12 Thread Tim Streater
On 12 Jan 2012 at 18:51, David Savage dsav...@cytelcom.com wrote: Installed apache onto a win2K server, and have the html file php file in the same folder (Q:\ASTERISK\) on the Q: drive (which is just another drive in this same server). I opened the html file using IE 6.0. What I'm

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Tim Streater
On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't figured out why yet. The test

[PHP] Measuring CPU time

2012-01-15 Thread Tim Streater
I haven't found a function to allow me to see elapsed CPU time to date in a function. Am I right in thinking none such exists? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Looking for the string functions

2012-02-01 Thread Tim Streater
I'm keen to look at the C source of such as substr_replace() and stripos(). I've downloaded the 5.3.9 PHP source, but am having difficulty locating the string functions. Could someone point me at the right directory or .c file? Thanks, -- Cheers -- Tim -- PHP General Mailing List

Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 07:47, Adam Richardson simples...@gmail.com wrote: While not purely focused on PHP, I toss this out to the group because I believe there are some novel, interesting points regarding the potential benefits of using the goto construct as implemented in PHP:

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 15:05, Robert Cummings rob...@interjinn.com wrote: I've had a strong opinion on goto for a very long time. I was one of the proponents who argued on internals for its inclusion several years ago. I stand by its utility and refer the reader to the fact that many open source

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 09:48, Adam Richardson simples...@gmail.com wrote: On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson simples...@gmail.comwrote: On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater t...@clothears.org.uk wrote: I disagree that the nested function is a straw-man. I (just as the other

[PHP] Re: Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 20:51, Simon J Welsh si...@welsh.co.nz wrote: On 7/02/2012, at 9:44 AM, Marco Behnke wrote: Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in several different places (eg data validation, ...). But

  1   2   >