[PHP] Re: Apache

2013-09-23 Thread Tim Streater
On 23 Sep 2013 at 11:37, Domain nikha.org wrote: > The problem is the weak PHP upload mechanism! I'd have said the problem is weak metadata provision - overloading the filename for other purposes. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

[PHP] Re: Friday's Question

2013-09-20 Thread Tim Streater
On 20 Sep 2013 at 18:20, Jen Rasmussen wrote: > -Original Message- > From: Tedd Sperling [mailto:t...@sperling.com] > 70Toothpaste, Deodorant, Aftershave, Minoxidil, Preparation-H, Bag > Bomb, Fixodent > LOL. What in the heck is a Bag Bomb? I have no idea what most of these items

[PHP] Re: Friday's Question

2013-09-20 Thread Tim Streater
On 20 Sep 2013 at 17:51, Tedd Sperling wrote: > Age: Fast approaching doddering old fossil stage > Mousepad: Yes. I use an Apple Mighty Mouse so that I can scroll my Excel > spreadsheet in two directions at once while moving the mouse pointer across > the screen. The optics works slightly bett

[PHP] Re: exec and system do not work

2013-08-26 Thread Tim Streater
On 26 Aug 2013 at 22:01, PhD Ethan Rosenberg wrote: >>> if( !file_exists("/var/www/orders.txt")); ^ | What's the semicolon doing there ---+ >>> { >>> echo system("touch /var/www/orders.txt", $ret);

[PHP] Re: PHP vs JAVA

2013-08-21 Thread Tim Streater
On 20 Aug 2013 at 23:59, PHP List wrote: > While I don't have any references to back it up - my guess would be that > Java may be seen as more versatile in general programming terms. A > staggering number of enterprise level web applications are built with > Java, add to that the possibility of

[PHP] Re: how to see all sessions sets in server

2013-08-04 Thread Tim Streater
On 04 Aug 2013 at 11:28, Ashley Sheridan wrote: > Like Matijn said, unless you're using some kind of client-side method to > continually poll the server, you can't know if they've just closed their > browser. There are Javascript events for exiting a page, but they don't > work correctly on Safa

[PHP] Re: Foreach and mydql_query problem

2013-07-22 Thread Tim Streater
On 22 Jul 2013 at 12:56, Karl-Arne Gjersøyen wrote: > Yes, i know that only one a singe row is updated and that is the problem. > What can I do to update several rows at the same time? Which several rows? The row that will be updated is that (or those) that match your WHERE clause. Seems to me

[PHP] Re: htaccess

2013-07-08 Thread Tim Streater
On 07 Jul 2013 at 21:22, Tedd Sperling wrote: > Confirmed. Those two lines cause the problem. > > However, commenting out those lines causes other problems. > > Are there similar statements to these: > > AddType application/x-httpd-php .php .htm .html This one tells apache to recognise .php,

[PHP] Re: mongo usage

2013-07-06 Thread Tim Streater
On 06 Jul 2013 at 23:27, Tim Dunphy wrote: > | You seem to spell the variable differently (1 'd' vs. 2 'd's)? > > Thanks! Fixed the type-o. Still no change. > > $connection = new Mongo(); > >$db = $connection->jfdb; > >//$collection = $db->addresses; > >$adresses = $connection->jfd

[PHP] Re: One more newbie question. About foreach..

2013-06-23 Thread Tim Streater
On 23 Jun 2013 at 16:11, Karl-Arne Gjersøyen wrote: > // Foreach get all given serialnumbers as I want it >foreach($serialnumber as $snr){ > > // I got the number of serialnumbers given in the array > $count = count($serialnumber); Why not do this *before* the foreach loop? > // I though

[PHP] Re: Undefined index....

2013-03-15 Thread Tim Streater
On 15 Mar 2013 at 13:10, Jay Blanchard wrote: > I have inherited a mess of a home-grown PHP framework that literally > fills the error_log with 100's of thousands of messages each day. First > order of business was rotating the logs, now we are working through each > error to solve them. This i

[PHP] Re: rather a HTML Q; however 2-FRAME

2013-03-15 Thread Tim Streater
On 15 Mar 2013 at 11:00, tamouse mailing lists wrote: > Frames are not only deprecated, they are unsupported entirely in HTML5 > (not that browsers won't continue to display them; just that they > won't validate). Meaning, in other words, that they *are* supported. It's unlikely in any case th

[PHP] Re: Populate input from another form

2013-03-08 Thread Tim Streater
On 08 Mar 2013 at 19:45, John Taylor-Johnston wrote: > I have a form > > target="_CRTP"> > > OnSubmit, I want to include data from another form (form="DPRform"). > > value=""> > > I should use a hidden identical field and use form="CRTP_Query": > > "> What purpose does this field serve? > B

[PHP] Re: Open form in new window

2013-03-04 Thread Tim Streater
On 04 Mar 2013 at 20:17, Paul M Foster wrote: > On Mon, Mar 04, 2013 at 05:39:00PM +0000, Tim Streater wrote: >> Personally I never submit forms. I use ajax to communicate with PHP >> scripts and do something with the data that is returned by the script. >> You can see a s

[PHP] Re: Open form in new window

2013-03-04 Thread Tim Streater
On 04 Mar 2013 at 17:10, John Taylor-Johnston wrote: > Submit will not > submit the form contents. Nothing to stop your OpenWindow() function doing a submit as in: Submit function OpenWindow (formPtr) { // Some actions formPtr.submit (); } Personally I never submit

[PHP] Re: Strip emails from a document

2013-01-26 Thread Tim Streater
On 26 Jan 2013 at 16:24, Tedd Sperling wrote: > I thought I had a function to strip emails from a document, but I can't find > it. > > So, before I start writing a common script, do any of you have a simple script > to do this? I have a function that will take a comma separated string consisting

[PHP] Re: Boolean type forced on string assignment inside if statement

2013-01-02 Thread Tim Streater
On 02 Jan 2013 at 16:05, Stephen wrote: > On 13-01-02 10:53 AM, Marc Guay wrote: >> Hi folks, >> >> if ($a = "foo" && $b = "bar"){ >> echo $a."".$b; >> } >> >> Returns: >> 1 >> bar >> >> I expect: >> foo >> bar >> >> Is this documented? >> > > && takes precedence over = > > http://php.net/m

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

2012-12-22 Thread Tim Streater
On 22 Dec 2012 at 16:50, Tedd Sperling wrote: > On Dec 21, 2012, at 8:06 PM, Jim Giner wrote: >>> That actually makes sense tho. Afterall, a string is truly only one memory >>> allocation whereas array elements are basically multiple vars having the >>> same name. So - how can you unset one c

[PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Tim Streater
On 18 Nov 2012 at 14:44, Jim Giner wrote: > 2. Using Switch {ALWAYS FIRST CASE!!!} > > //$boxes = 1; > //switch ($count) { > //case ($count > 14): > //$boxes = 3; > //break; > //case ($count >

[PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Tim Streater
On 17 Nov 2012 at 01:33, Iñigo Medina wrote: > On Fri, 16 Nov 2012, Jim Giner wrote: >> Maybe I'm way out of touch, but when I look at php.net for the syntax of the >> switch statement I see: >> switch($var){ >> case (value): >> (do something) >> case (other value): >>

[PHP] Re: Switch - Case Statement Questions

2012-11-16 Thread Tim Streater
On 16 Nov 2012 at 12:10, Omar Muhsin wrote: > Hello, > > I was just wondering after writting the code in version 2 here below, it turns > out in testing that it actually PHP is not validating the expressions instead > always I get the first case. > > 1.Using nested if statement {THE INTENDED BEH

[PHP] Re: appreciation

2012-10-12 Thread Tim Streater
On 12 Oct 2012 at 12:36, Maciek Sokolewicz wrote: > However, this is likely not what the OP wants. What he likely does want > is to check if the filename is not '.' or > '..'. Of course, there are numerous ways to do this. From very simple > things like: > if ( $filename != '.' && $filename != '

[PHP] Re: limiting

2012-10-10 Thread Tim Streater
On 10 Oct 2012 at 19:53, David McGlone wrote: > On Wednesday, October 10, 2012 07:36:00 PM Tim Streater wrote: >> On 10 Oct 2012 at 19:17, David McGlone wrote: >>>> BTW - in any of your other computer languages didn't they utilize a >>>> 'return'

[PHP] Re: limiting

2012-10-10 Thread Tim Streater
On 10 Oct 2012 at 19:17, David McGlone wrote: >> >> BTW - in any of your other computer languages didn't they utilize a >> 'return' statement? PHP's is no different. > > back in like '85, I learned Pascal that's the only language I learned and I > don't recall if it used return. Mmmm. There's

[PHP] Re: limiting

2012-10-09 Thread Tim Streater
On 09 Oct 2012 at 20:46, Matijn Woudt wrote: > For example your previous post, you > could have just looked up what the 'echo' and 'return' statements do > in the PHP manual, and they are probably explained pretty OK in those > books you own too. You probably could have answered the questions you

[PHP] Re: Differences

2012-10-04 Thread Tim Streater
On 04 Oct 2012 at 01:48, David McGlone wrote: > Hi everyone, I have been playing around with some code the list helped me with > a while back and I'm not grasping the concept between return and echo and the > PHP manual doesn't answer this, unless I'm missing something. There is an > example at t

[PHP] Re: problem with my login script

2012-10-02 Thread Tim Streater
On 02 Oct 2012 at 12:07, Maciek Sokolewicz wrote: > On 02-10-2012 11:59, Bálint Horváth wrote: >> The problem was already solved. I forgot to send a copy to the list... >> >> Rodrigo, break!? Ohh man, it's a crazy idea... A developer DOES NOT use >> break at all (in a loop)... (switch is an excep

[PHP] Re: PHP Re: PHP Bounce messages

2012-09-21 Thread Tim Streater
On 21 Sep 2012 at 20:56, tamouse mailing lists wrote: > On Fri, Sep 21, 2012 at 4:17 AM, Tim Streater wrote: >> On 21 Sep 2012 at 08:40, Lester Caine wrote: >> >>> I know that the php list are one of the 'reply to sender' email handling >>> ca

[PHP] Re: PHP Bounce messages

2012-09-21 Thread Tim Streater
On 21 Sep 2012 at 08:40, Lester Caine wrote: > I know that the php list are one of the 'reply to sender' email handling camp > rather than reply to list. I don't understand this. I reply (not that I mail that often) just to the list, if possible. Why would I do anything else? -- Cheers -- T

[PHP] Re: PHP Re: Programmers and developers needed

2012-09-19 Thread Tim Streater
On 19 Sep 2012 at 16:32, Matijn Woudt wrote: > "unless they were a majority" is the thing that bothers me. Getting a > majority is hard, take for example the Dutch Politics [1]. Our country > is now led by a parliament of 10 different political parties. Getting > things done now is really hard,

Re: [PHP] What do you call the end-user?

2012-07-20 Thread Tim Streater
On 19 Jul 2012 at 18:26, Tedd Sperling wrote: > First question: > > What do you call the people who ultimately use your code? I expect I'll call her "Dear". See, my app, a replacement for Eudora, is used by yours truly only at the mo. However, come time to upgrade SWMBO's Mini, which will run

Re: [PHP] Creating drop-down menus

2012-07-17 Thread Tim Streater
On 17 Jul 2012 at 21:58, Paul M Foster wrote: > On Wed, Jul 18, 2012 at 08:45:34AM +1200, James Newman wrote: > >> Just to put my 2cents in, you might want to try jQuery if you're going to >> go down the AJAX road. > > JQuery is a LOT of code to include if you're just going to do an AJAX > call

Re: [PHP] Creating drop-down menus

2012-07-16 Thread Tim Streater
On 16 Jul 2012 at 21:19, Jen Rasmussen wrote: > Sometimes I need to use javascript to fill a drop down box based on the > value of a previous drop down box. However, the information to fill the > latter is stored in mysql and can be a lot, what I have been doing is that, > using PHP, I create h

Re: [PHP] Unexpected Notice message

2012-07-04 Thread Tim Streater
On 04 Jul 2012 at 16:51, Marc Guay wrote: >> Notice: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in > > I would guess that it's asking you to add quotes around QUERY_STRING...? As in: if (strlen($_SERVER['QUERY_STRING']) > 0) { -- Cheers -- Tim -- PHP General Mailing

Re: [PHP] embedding php inside of php

2012-07-01 Thread Tim Streater
On 01 Jul 2012 at 01:00, Tim Dunphy wrote: > I am trying to get the hang of php using some examples that I found > in a book. I've been making progress lately, but one thing has me a > bit stumped. > > In an HTML form that I am echoing through PHP I would like to embed > smaller chunks of php in

Re: [PHP] Hungarian Notation interest with PHP

2012-06-04 Thread Tim Streater
On 04 Jun 2012 at 15:43, Mihamina Rakotomandimby wrote: > I have a colleague stuck with this thing named "Hungarian Notation" > http://goo.gl/xYv8O > > We try to define our internal coding standards, which is very close to > the Symfony ones http://goo.gl/f2rcO > > But we're in conflict because

Re: [PHP] Re: Function size

2012-06-03 Thread Tim Streater
On 03 Jun 2012 at 10:02, Tony Marston wrote: > "tamouse mailing lists" wrote in message > news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com... >> There is a point: if you are unfamiliar with code, wading through >> screens and screens of a function to find things like blo

Re: [PHP] url string being split

2012-04-27 Thread Tim Streater
On 27 Apr 2012 at 16:56, Chris Stinemetz wrote: > On Thu, Apr 26, 2012 at 12:58 PM, Stuart Dallas wrote: >> On 26 Apr 2012, at 18:37, Jim Giner wrote: >> >>> I"m no expert, but why would you expose a query to the world thru the use of >>> a GET?  Why not just collect the params and build the st

Re: [PHP] php in windows

2012-04-11 Thread Tim Streater
On 11 Apr 2012 at 03:13, Kirk Bailey wrote: > It means it does nothing. I have a small server in the computer that > works fine. I also installed python in this box- and it worked > perfectly without having to do anything to the server. Php on the > other hand merely occupies disk space. So you

Re: [PHP] strftime silliness

2012-04-11 Thread Tim Streater
On 11 Apr 2012 at 01:47, Geoff Shang wrote: > On Wed, 10 Apr 2012, Tim Streater wrote: > >> I want to format a date/time using a 12 hour representation of the time >> part. I can do this with, say, "%d %b %Y %l:%M %p", where the first time >> format specif

[PHP] Re: strftime silliness

2012-04-10 Thread Tim Streater
On Apr 10th, 2012 at 10:40pm, Tim Streater wrote: > I want to format a date/time using a 12 hour representation of the time part. > I can do this with, say, "%d %b %Y %l:%M %p", where the first time format > specifier is the lower-case L. But, this gives me a leading space

[PHP] strftime silliness

2012-04-10 Thread Tim Streater
I want to format a date/time using a 12 hour representation of the time part. I can do this with, say, "%d %b %Y %l:%M %p", where the first time format specifier is the lower-case L. But, this gives me a leading space in the case that the hour is less than 12. I don't want this space. Anyone kno

Re: [PHP] php in windows

2012-04-10 Thread Tim Streater
On 10 Apr 2012 at 03:05, Kirk Bailey wrote: > The edition of php for windows I instaklled does not work. Which > flavor of windows php DOES work properly in windows? What does "does not work" mean? You need to say which OS, which PHP version, what happens, and what you expect to happen. Not th

Re: [PHP] Websocket using php

2012-04-01 Thread Tim Streater
On 31 Mar 2012 at 16:14, Leandro Dardini wrote: > Hello, > I have the need to use websockets for the server part of an application I > am developing and I found with a big surprise no websocket class or > procedure is available on the net. Have I missed looking in some place? > > Being really in

Re: [PHP] Parse errors

2012-03-18 Thread Tim Streater
On 18 Mar 2012 at 17:46, Simon J Welsh wrote: > This is expected. The error doesn't occur to the second file is included, so > everything in the first included file is parsed and run before execution is > halted. Simon, Thanks for that. Looks like I should be able to catch most places where an

[PHP] Parse errors

2012-03-18 Thread Tim Streater
After recently omitting a semicolon from the end of a statement, and having the result be a JavaScript error in an odd place, I'm trying to pin down just what PHP does with such errors. I made a small test script to run at CLI, which does some echoes and then, after that, I miss out a semicolon.

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:/

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

2012-03-18 Thread Tim Streater
On 18 Mar 2012 at 16:39, Tamara Temple wrote: > On Fri, 16 Mar 2012 19:57:38 +0100, rene7705 sent: >> I could waste a lot of text on what I've accomplished during the last >> months, but the easiest thing is if you have a (another) look at (the >> source of) http://mediabeez.ws > > I seem a bit

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Tim Streater
On 13 Mar 2012 at 15:59, Tedd Sperling wrote: > I'm not sure what would have saved bacon in the above case. I don't see how > your example would work. I think it contained a typo. > > In what I think you were trying to demonstrate, I would just pass $x by > reference (&$x) -- or -- return $x by

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't recollect having seen that anywhere; so I don'

Re: [PHP] questions about $_SERVER

2012-03-11 Thread Tim Streater
On 11 Mar 2012 at 18:16, Tedd Sperling wrote: > On Mar 11, 2012, at 10:25 AM, Daniel Brown wrote: > >> On Sat, Mar 10, 2012 at 10:37, Tedd Sperling wrote: >>> As such, there are no "globals" in PHP other than SuperGlobals. As I said, >>> if I'm wrong, please show me otherwise. >> >>A superg

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

2012-02-12 Thread Tim Streater
On 12 Feb 2012 at 19:01, Stuart Dallas wrote: > Optional arguments must be given a default value... > > function my_func(&$arg1, $arg2, $arg3, $arg4 = null, $arg5 = null, &$arg6 = > null) > > Note that passing a default value by reference was not supported prior to > PHP5. > > All the relevant d

[PHP] Variable number of arguments problem

2012-02-12 Thread Tim Streater
I have a function defined thus: function my_func (&$arg1, $arg2, $arg3, $arg4, $arg5, &$arg6) { // code here } I call this with variously the first three arguments only, or all six, taking care that if I call it with fewer arguments then I don't try to acces $arg4, $arg5, or $a

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

2012-02-08 Thread Tim Streater
On 07 Feb 2012 at 22:31, Paul M Foster wrote: > Design Patterns are Way Nifty Kewl patterns of code which are supposed > to facilitate certain types of operations. (Was that sarcasm you > detected? Yes it was.) > > For example, the Singleton pattern. Let's say you had a configuration > class tha

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

2012-02-07 Thread Tim Streater
On 07 Feb 2012 at 19:34, Daniel Brown wrote: > On Tue, Feb 7, 2012 at 13:56, Mike Mackintosh > wrote: >> I was curious to see what everyones favorite design patterns were, if you use >> any, and why/when have you used it? >> >> Choices include slots and signals (observer), singleton, mvc, hmvc,

[PHP] Re: Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 20:51, Simon J Welsh 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 it >>>

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

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 15:05, Robert Cummings 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 projects, especia

Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 07:47, Adam Richardson 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: > > http://adamjonrichardson.com/2012

[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 (http://ww

[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

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

2012-01-13 Thread Tim Streater
On 13 Jan 2012 at 15:05, David Savage 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 > configuration"

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

2012-01-12 Thread Tim Streater
On 12 Jan 2012 at 18:51, David Savage 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 thinking > is there may

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

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: [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 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 scripts will have b

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

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

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 ;)

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: Re: [PHP] include

2011-11-20 Thread Tim Streater
On 20 Nov 2011 at 10:36, Tommy Pham 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 see how my new se

[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] Sniping on the List

2011-11-18 Thread Tim Streater
On 18 Nov 2011 at 05:40, Robert Cummings 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 creationism". > Thus b

[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 wouldn't

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

Re: Re: [PHP] {} forms

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 14:27, Richard Quadling 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. I've fixed the

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

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

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 12:13, HallMarc Websites 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 installed to begin > with) onl

Re: RE: [PHP] Safari and PDF

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 00:43, HallMarc Websites 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 detect if it is > Safari 5.

Re: [PHP] Think I found a PHP bug

2011-11-15 Thread Tim Streater
On 15 Nov 2011 at 22:34, Geoff Shang 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 this: date_defau

Re: Re: [PHP] Safari and PDF

2011-11-15 Thread Tim Streater
On 15 Nov 2011 at 22:36, Ashley Sheridan 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 initially, which it does bu

Re: [PHP] What is an information_id in directory

2011-10-29 Thread Tim Streater
On 29 Oct 2011 at 20:46, Ernie Kemp 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 the new conte

Re: Re: [PHP] Execute permission question

2011-10-28 Thread Tim Streater
On 28 Oct 2011 at 16:01, Tedd Sperling 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 the following: #!

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

2011-10-25 Thread Tim Streater
On 25 Oct 2011 at 02:36, DealTek wrote: > On Oct 24, 2011, at 6:23 PM, Bastien wrote: > >> On 2011-10-24, at 9:07 PM, DealTek 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 from a new range for a >>

Re: Re: [PHP] Friday Distraction

2011-10-21 Thread Tim Streater
On 21 Oct 2011 at 21:30, Govinda 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. FB already has a royalty-fr

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 "Sod that!" -- Cheers -- Tim -- PHP Gen

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

2011-10-19 Thread Tim Streater
On 19 Oct 2011 at 22:27, Simon J Welsh 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). >> >> >> Your name: >> Your age: >> >> >> >> as well as the following in a file "action.php", als

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: Re: [PHP] Local variable protection

2011-10-13 Thread Tim Streater
On 13 Oct 2011 at 16:25, Tedd Sperling 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 course, that's the

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: 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: [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: [PHP] Re: Oi , Portas/ Hello, Ports

2011-10-10 Thread Tim Streater
On 10 Oct 2011 at 19:30, Ashley Sheridan wrote: > Jim Giner wrote: > >> >> ""QI.VOLMAR QI"" wrote in message >> news:cab7l6ey9rkfwtmprpe0fk3doo5s1c5jyhpnbt5rjj0f_eb5...@mail.gmail.com... >>> Alguem sabe se, e como eu posso trabalhar com as portas do computador >> com >>> php no windows? >>> >>

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

Re: [PHP] Variable question

2011-10-01 Thread Tim Streater
On 01 Oct 2011 at 18:59, Ron Piggott 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 $trivia_answer_$correct_answer; > > $

Re: [PHP] Input variable from form help request

2011-09-29 Thread Tim Streater
On 29 Sep 2011 at 13:30, PHProg 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] > if(!@copy('http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirna > me']."/".$_POST['trakname']."')) This line:

Re: [PHP] Question about losing port number

2011-09-26 Thread Tim Streater
On 26 Sep 2011 at 23:45, vince chan 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 really want is > ht

[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: Fwd: [PHP] Bug?

2011-09-15 Thread Tim Streater
On 15 Sep 2011 at 22:43, tamouse mailing lists 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 limited precision has been

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 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 foreign machines and netw

  1   2   >