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

2011-06-07 Thread Tim Streater
On 07 Jun 2011 at 11:35, Richard Quadling 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] PHP and Windows 7 g6-bit

2011-06-15 Thread Tim Thorburn
On 6/15/2011 11:37 AM, Byron Como wrote: Does the precompiled windows binary work on win 7 64? It does, however if you're using Apache as your webserver, for PHP 5.3+ you won't be able to use the binaries from apache.org for Windows. There is a link to Apache Lounge found here: http://window

Re: [PHP] jQuery to PHP

2011-06-22 Thread Tim Streater
rks, but the value never gets into the form. So where is jq_test.php? And why do you seem to be referring to it both in what looks like an ajax request (I've never ever looked at jquery, so I'm guessing here) and also as the action of a form? -- Cheers -- Tim -- PHP General Mailing Li

Re: Re: [PHP] jQuery to PHP

2011-06-22 Thread Tim Streater
On 22 Jun 2011 at 20:56, Jim Lucas wrote: > On 22/6/2011 12:43 PM, Tim Streater wrote: >> On 22 Jun 2011 at 19:44, Ethan Rosenberg 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 cl

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

2011-06-22 Thread Tim Streater
cell, the onclick handler can write the cell's id into the form, seems to me. Why use ajax for that? BTW, I'm replying via the list (even though so far this has minimal PHP content) because my mail host at clothears appears to be on earthlink's shitlist. -- 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-23 Thread Tim Streater
27;s id into the form, seems to me. Why use >> ajax for that? > Please tell me how to do that [write cell's id into form]. Something like (e.g.): Move From: and then in your onclick handler: document.getElementById("xyz").textContent = this.id; I'd say also that you ne

Re: [PHP] Re: Php filter validate url

2011-06-27 Thread Tim Streater
. And why does it matter, anyway? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-06-27 Thread Tim Streater
ion :) >> >> > Tamara, kind of like this one? > > http://ca3.php.net/manual/en/control-structures.goto.php I haven't used a goto since I stopped writing FORTRAN in 1978. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP 5.4.0alpha1 released

2011-06-28 Thread Tim Streater
On 28 Jun 2011 at 22:39, David Soria Parra 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 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 -- Tim -

Re: [PHP] PHP EOL

2011-07-04 Thread Tim Streater
FC is an internal link which makes finding things in the RFC rather easier. The following list of RFCs is the set I consulted when writing my own email client: a) RFC 5034 POP3 b) RFC 2821 SMTP c) RFC 5322 Internet Message Format d) RFC 2045, 2046, 2047, 2048, 2049, (MIME), and 2183 --

Re: [PHP] Top Posting

2011-07-05 Thread Tim Streater
ll down to the bottom of the email and it considers that to be > an adjustment to the original email, plus I have to manually write my > signature block. What is meant by "an adjustment to the original mail"? You could try switching to another email client. -- Cheers -- Ti

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

2011-07-06 Thread Tim Streater
esian filter for my e-mail app. Let the spammer, by sending you the mail, indicate what is spam and what is not. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-07-06 Thread Tim Streater
aware that is listed but cannot get to the bottom of why it is flagged. Frankly, I don't know why you are getting mail from me - I'm not sending you any. As for your solution to spam. What is Postfix? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[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 upd

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

2011-07-13 Thread Tim Streater
ssed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' Except that variables are case-sensitive whereas function names are not. And if there's going to be a formal or "programmatic" definition, then I think I'd prefer BNF to a regexp. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-07-14 Thread Tim Streater
of the content > will > be deleted? A number of the -ve's I'd personally flag as +ve's and complain if > anybody changed them ... > Generally I'd say the whole page simply sucks :) Particularly as it's written by a fathead who thinks that "lose"

Re: [PHP] How to sum monetary variables

2011-07-18 Thread Tim Streater
nvert to £xxx.xx for external display. Then just use integer arithmetic for the calculations. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Fwd: ezmlm warning

2011-07-20 Thread Tim Thorburn
On 7/20/2011 6:19 AM, Ashley Sheridan wrote: Louis Huppenbauer wrote: got the same problem today mayhabs gmail had a small problem... who knows ;) 2011/7/20 Lester Caine Tamara Temple wrote: Um... what's going on here? Why would google mail be bouncing?? Happens quite often ... just me

[PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
So, if my text string is in $line, I ought to be able to do something like: $line = preg_replace ($pattern, $replacement, $line); But, since all regexps are to me, like TECO commands, no better than line-noise, how do I make up $pattern and $replacement from the proffered regexps? Thanks

Re: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:35, Dajka Tamás 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.

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

2011-07-24 Thread Tim Streater
','>$1', $line) > > Removing one '>': > > preg_replace('/(^>([>]+From )/','$1', $line) Thanks, I'll try that. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-07-24 Thread Tim Streater
tarts at the start of the line. So, I experimented a bit and the following works: $onemore = preg_replace ('/^(>*From )/', '>$1', $line); $oneless = preg_replace ('/^>(>*From )/', '$1', $line); Thanks for the help. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[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 wrote: > On Tue, Jul 26, 2011 at 3:47 PM, Tim Streater 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

Re: RE: Re: [PHP] pathinfo function

2011-07-27 Thread Tim Streater
On 27 Jul 2011 at 11:09, Mike Ford 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 >&g

Re: Re: [PHP] Re: testing

2011-08-04 Thread Tim Streater
On 04 Aug 2011 at 15:48, Jim Giner 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: http://www.php.net/unsub.php

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

2011-08-09 Thread Tim Streater
to do that. 2) Having created $sql, echo it out. That way you could see whether it's correct or not. Doing (1) and (2) will make it a damn sight easier to see what you are *actually* creating. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using function prototypes in code

2011-08-10 Thread Tim Streater
classes can. I have successfully used the technique to > catch run-time errors of wrong object types when testing, but am > surprised that I can't use it to trap unexpected basic types - or at > least to document what is expected. This is PHP, not FORTRAN IV. Personally I see it as

Re: Re: [PHP] text insertion

2011-08-10 Thread Tim Streater
eed what you want. But can you put a inside a table cell? (I don't know that you can't, but it seems an odd thing to do). -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] text insertion

2011-08-10 Thread Tim Streater
On 10 Aug 2011 at 22:07, Chris Stinemetz wrote: >> >>    Use HTML 'pre' tags: >> >>         >> > > 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

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

2011-08-11 Thread Tim Streater
ound the inner loop 5 times. What is the value of $num when you then exit the inner loop in order to do the test against 1 in the outer loop? You need to rework that logic. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-08-14 Thread Tim Streater
d what happens if your "if" doesn't evaluate to true? What do you return then? > * * > * > *if (loggedin==true)* > *{* Should this be: if ($loggedin==true) ... -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-08-26 Thread Tim Streater
ere some way to let an javascript event trigger some ajax to store > an exit time into my DB or make it mandatory to at least visit the > logout.php before someone can surf away? Use the onbeforeunload event. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To uns

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

2011-08-29 Thread Tim Streater
/printing. > And, I already add a comment to confirm the end brace: > > } // end if($myVar) > > to clarify any long nests. The fact that you feel the need to do that is a giveaway. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-09-01 Thread Tim Streater
... Whitesmith's is -GLEE! ;) >> >> Beauty is in the eye of the beholder. > > So I think we've all established that Whitesmith's is the way to go, I've been using the Whitesmith's style since I started coding in BCPL in the mid-70s. Having the

Re: [PHP] Opening Multiple Files

2011-09-07 Thread Tim Streater
> $myFile = "B01C001.htm"; > $lines = file($myFile); > foreach ($lines as $line_num => $theData) { > > Is there a way PHP will open each file in the directory ending in “.htm”, > one file at a time, without me specifying the file name? You can use opendir() and readdir

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

2011-09-14 Thread Tim Streater
me 5 minutes to find out how to use it. I didn't need teaching about it or to have a manual. So IMO, emacs, vi, and all their ilk belong in the dustbin of history. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-09-14 Thread Tim Streater
among foreign machines and networks Yes, this is entirely valid IMO. I still have my ultrix vi summary card for such occasions. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fwd: [PHP] Bug?

2011-09-15 Thread Tim Streater
has been known ever since the first such hardware in the mid-1950's, in fact. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Search for string followed by whitespace

2011-09-18 Thread Tim Streater
At the moment, I'm doing this: $start = stripos ($body, "-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP installations, usage, and popularity

2011-09-20 Thread Tim Thorburn
On 9/19/2011 5:08 PM, Tedd Sperling wrote: As such, I need information regarding how wide-spread PHP is (i.e., number of installations), who's using it (i.e., companies, organizations), and how it compares with other Web Languages (i.e., ASP, Ruby, etc.). Since it's a school, you might also wan

Re: [PHP] Question about losing port number

2011-09-26 Thread Tim Streater
n my local; however, what i really want is > https://127.0.0.1:9090/login, it is missing ":9090". I also have tried to > use $_SERVER['SERVER_PORT'], but $_SERVER['SERVER_PORT'] doesn't give me > 9090, it gives me 80. Where does the 9090 come from? -- Che

Re: [PHP] Input variable from form help request

2011-09-29 Thread Tim Streater
a big mess of single and double quotes to me. Why don't you go through it very carefully? I'd be inclined to make a small test program separate from the web page stuff and do things like: http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirname']."/".$_POST['trakname']."'; echo $myvar; ?> and fiddle until that works. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable question

2011-10-01 Thread Tim Streater
er_$correct_answer; > > $trivia_answer_1 = “1,000”; > $trivia_answer_2 = “1,250”; > $trivia_answer_3 = “2,500”; > $trivia_answer_4 = “5,000”; Not completely obvious to me what you're trying to do but I assume its: echo '\$trivia_answer_' . $correct_answer . " = \&

[PHP] Multiple SQLite statements

2011-10-10 Thread Tim Streater
could confirm that. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-10-10 Thread Tim Streater
inspect, then as Jim mentioned, PHP is > not for you and something like java may be better suited, although I'm not > sure how much power an applet has in this area. Nothing wrong with using PHP client-side, I run plenty of PHP scripts that way. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Multiple SQLite statements

2011-10-11 Thread Tim Streater
On 11 Oct 2011 at 03:03, Paul M Foster 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 an

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

2011-10-11 Thread Tim Streater
On 11 Oct 2011 at 10:47, David Robley wrote: > Tim Streater wrote: > >> On 11 Oct 2011 at 03:03, Paul M Foster wrote: >> >>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >>> >>>> I would like to use the SQLite3 (not PDO) interfac

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

2011-10-11 Thread Tim Streater
On 11 Oct 2011 at 11:25, David Robley wrote: > Tim Streater wrote: >> On 11 Oct 2011 at 10:47, David Robley wrote: >>> Tim Streater wrote: >>>> On 11 Oct 2011 at 03:03, Paul M Foster wrote: >>>>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim St

Re: Re: [PHP] Local variable protection

2011-10-13 Thread Tim Streater
Var; > // and then using $myVar > } > > or > > myFunction > { > $myVar = $GLOBAL['myVar'] > // and then using $myVar > } But presumably these are not *quite* equivalent, as modifying $myVar will change the global in the first but not in the second. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Local variable protection

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

Re: [PHP] PHP 5.2 and Apache 2.2 are really compatible?

2011-10-19 Thread Tim Thorburn
Could also try running a Linux distro in a VM on your computer - many will come pre-configured with Apache and PHP, or provide an easy installer/command line to get you up and running. Ubuntu is very beginner friendly. HTH, -Tim

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

2011-10-19 Thread Tim Streater
text file. Resave it as > a plain text file. Sounds like you should also use a text editor rather that Word or similar for editing your program files. Use Notepad or whatever they have or Windows machines. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Friday Distraction

2011-10-21 Thread Tim Streater
On 21 Oct 2011 at 17:27, Daniel Brown 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 Ts&Cs and thought "S

Re: Re: [PHP] Friday Distraction

2011-10-21 Thread Tim Streater
has a royalty-free non-exclusive licence to all your data anyway. Once you put it up there, they can use it any way they like. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-10-25 Thread Tim Streater
on B (shows full details). Then click on Search, and scroll down to look at the results. You need to look at the inetnum object that contains the IP address of interest, then see Country. Be aware that what this tells you is where an IP block is registered. Nothing to stop the entity using

Re: Re: [PHP] Execute permission question

2011-10-28 Thread Tim Streater
following: #!/usr/bin/php then you can run it at the command line by typing its name at the prompt - but wiggy will need to have execute permission set. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What is an information_id in directory

2011-10-29 Thread Tim Streater
email with images to this list. That is a waste of time (images are stripped). You'll need to send another email formatted as text-only. As it stands your mail made no sense at all. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Safari and PDF

2011-11-15 Thread Tim Streater
ally, which it does but not always (sometimes goes straight to disk). But if it shows in the browser window then there are buttons to save or open in Preview. I've not needed Acrobat on a Mac for years. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] Think I found a PHP bug

2011-11-15 Thread Tim Streater
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. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: RE: [PHP] Safari and PDF

2011-11-16 Thread Tim Streater
es when I can't be bothered to fire up Elements. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-11-16 Thread Tim Streater
you to download this PDF and "needs Acrobat Reader" which is complete cock. > Anyway, I realize this topic is now slightly off list. True but I think you needed a rant :-) -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] {} forms

2011-11-16 Thread Tim Streater
there any particular benefit to using that form? Or if not, what do they mean? (I've read up about variable variables). Thanks, -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] {} forms

2011-11-16 Thread Tim Streater
> Oh. I've fixed the layout bug for > http://docs.php.net/manual/en/language.types.string.php#example-70. Ah *that's* where it was hiding. Thanks - got it now. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-11-17 Thread Tim Streater
On 16 Nov 2011 at 16:30, Geoff Shang 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

[PHP] socket_recv

2011-11-17 Thread Tim Streater
omplete, I wouldn't expect there to be any data if the client hasn't sent any. Is there a way to wait with timeout on data showing up at a socket? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Sniping on the List

2011-11-18 Thread Tim Streater
ientific creationism". > Thus before the big bang > is perfectly valid whether we could perceive it or not. Not really. It's as meaningless as asking what's north of the North Pole. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] include

2011-11-19 Thread Tim Streater
refore take it that there is none? Failing that, is there a good way to dynamically replace parts of a PHP program, possibly using runkit? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] include

2011-11-20 Thread Tim Streater
no way to do this then that is a data point. And here's another question. Can a child forked by pcntl_fork() use a socket that the parent obtained? Reading the socket stuff in the PHP doc, there are a number of user-supplied notes hinting this might be problematic. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] include

2011-11-21 Thread Tim Streater
On 20 Nov 2011 at 23:46, Tamara Temple wrote: > Tim Streater 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 havi

Re: [PHP] include

2011-11-21 Thread Tim Streater
On 21 Nov 2011 at 11:10, Tommy Pham wrote: > On Mon, Nov 21, 2011 at 2:56 AM, Tim Streater wrote: >> I'm looking for confirmation that: >> >>  include $fn; >> >> is an allowed form of the include statement. >> > > RTFM [1] example #6 ;)

[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 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 () >> { >> $

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

2012-01-04 Thread Tim Streater
run on the user's machine) don't use anything except what comes with the standard OS X distribution, so to fix the date time issue I do: date_default_timezone_set (@date_default_timezone_get ()); systematically in my scripts. -- Cheers -- Tim -- PHP General Mailing List (http:/

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 wrote: > On 1/4/12 13:33, "Tim Streater" 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, such as turning

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 wrote: > On 1/4/12 14:34, "Tim Streater" 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

[PHP] Strange foreach reference issue

2012-01-07 Thread Tim Behrendsen
hange the name of the reference variable from '$row' to '$rowx' (for example), things will work. So clearly there's some issue with $row being previously used as a reference that's "contaminating" the subsequent use of $row in the foreach. If there's some logic to this, it's escaping me. Any insight on this would be appreciated. Regards, Tim Behrendsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strange foreach reference issue

2012-01-07 Thread Tim Behrendsen
On 1/7/2012 4:18 PM, Matijn Woudt wrote: On Sun, Jan 8, 2012 at 12:29 AM, Tim Behrendsen wrote: Hello, This sure looks like a bug, but maybe there's some subtlety going on that I don't understand, so I would appreciate some insight. After much debugging, I tracked down a bug in

Re: [PHP] Strange foreach reference issue

2012-01-07 Thread Tim Behrendsen
On 1/7/2012 4:44 PM, Stephen wrote: On 12-01-07 07:30 PM, Tim Behrendsen wrote: When you use an ampersand on the variable, that creates a reference to the array elements, allowing you to potentially change the array elements themselves (which I'm not doing here). http://www.php.net/m

Re: [PHP] Strange foreach reference issue

2012-01-09 Thread Tim Behrendsen
On 1/9/2012 10:35 AM, David Harkness wrote: On Sat, Jan 7, 2012 at 5:01 PM, Tim Behrendsen <mailto:t...@behrendsen.com>> wrote: The first loop is leaving a reference to the final element. But then the second foreach is doing a straight assignment to the $row variable, but

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

2012-01-12 Thread Tim Streater
what? What you should be doing is putting http://localhost/your-file.html in the IE address bar. What is your document-root? Is the Q:\thingy part of it? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-01-13 Thread Tim Streater
r other browser) open and put http://localhost/your-webpage.html into the browser's address bar. Further, both the webpage and PHP file need to be in your document-root. Look in your apache config file for that). -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[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

Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
tion and goto-ing to that. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
ough obviously I'll have to put up with it. Anyway, discussions of this sort tend to be, or become, futile. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 09:48, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson wrote: > >> On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: >> I disagree that the nested function is a straw-man. I (just as the other >> authors I'd linked to d

[PHP] Re: Long Live GOTO

2012-02-06 Thread Tim Streater
ong to the app. So I have to check: a) whether this file is an SQLite database b) whether it has the two tables I expect to find there Last time I checked the SQLite API in question, it looked as though try/catch was my only option. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Tim Streater
t you're playing Mornington Crescent (q.v.), on a non-standard board. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-08 Thread Tim Streater
et a simpler intro. [1] In June 1982 (or was it '83?) I visited PARC with a small group from SLAC. We saw the Star or whatever it was, with bit-mapped display and mouse pointer. Whoosh !! (Well, to be fair, we'd gone along to look into XNS). -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Variable number of arguments problem

2012-02-12 Thread Tim Streater
nce? There is some reference to this in the docs and the user notes but it's a little unclear. Or is there another reason? Thanks, -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Variable number of arguments problem

2012-02-12 Thread Tim Streater
t; PHP5. > > All the relevant details are here: http://php.net/functions.arguments Thanks, I do see an example now, although it's not stated explicitly. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] questions about $_SERVER

2012-03-11 Thread Tim Streater
ditionally, main script variables are not accessible out of scope (such as > in a function) unless one uses $GLOBALS to retrieve those values. In the following, $x is a global but not a super-global (AFAIK). -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Tim Streater
On 12 Mar 2012 at 20:07, Tedd Sperling wrote: > Tim: > > I read somewhere that using: > > global $x; > > is not recommended. Whereas, it is recommended to use: > > $x = $GLOBALS['x']; > echo $x; Tedd, That may well be, although as I write I can'

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Tim Streater
amp;$x) -- or -- return $x by value. I would not have used a global, > > In any event, I seldom use globals anyway. This was more an academic > discussion. As was my example - and yes, it had a typo. Worse, trying it in a shell it doesn't exhibit the failure mode I thought I'

Re: [PHP] Got HTML5 History API + caching LICKED, I think,

2012-03-18 Thread Tim Streater
ould have to sick to activate a menu. b) bright flashy distracting items on a website. Like the OP's menus. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Got HTML5 History API + caching LICKED, I think,

2012-03-18 Thread Tim Streater
On 18 Mar 2012 at 17:06, Tim Streater wrote: > I don't like: > > a) menus that just spring into life because you happen to mouse near them. You > should have to sick to activate a menu. Damned autocorrect. s/sick/click/ -- Cheers -- Tim -- PHP General Mailing List (http:/

[PHP] Parse errors

2012-03-18 Thread Tim Streater
he function I supply to it doesn't appear to be called. I was just surprised that the initial echo statement's output made it back to the JavaScript side. (I obviously don't expect to have parse errors show up in production, but having them nicely visible and logged during tes

Re: [PHP] Parse errors

2012-03-18 Thread Tim Streater
t places where an error might occur. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    4   5   6   7   8   9   10   11   12   >