Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Peter Ford
igit.php An important note: This function expects a string to be useful, so for example passing in an integer may not return the expected result. However, also note that HTML forms will result in numeric strings and not integers. See also the types section of the manual. -- Jim Integers can be n

[PHP] PHP + PostgreSQL: pg_query not returning the expected result for this (edge) case:

2013-02-06 Thread Peter Ford
&& pg_numrows($result)) { echo pg_numrows($result).PHP_EOL; echo pg_fetch_result($result, 0, 0).PHP_EOL; ) ?> Tells me there that although the $result resource is valid, there are no rows and therefore no result to fetch (PHP Warning: pg_fetch_result(): Unable to

Re: [PHP] securing a script that exec()s

2012-03-30 Thread Peter Bauer
) and run your script from console or with textmode browser lynx. But the best solution would be to secure the exec call. -- Regards, Peter Bauer PHP developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Preferred Syntax

2011-12-14 Thread Peter Ford
ime, and mix various styles, as long as it's readable! Cheers Pete -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kin

Re: [PHP] PHP run from console - automatic password input

2011-11-29 Thread Peter
l :) Cheers 2011/11/29 Peter > passin and passout are not userd during "-revoke" > They are used to give parameters to create the certificate and give it > the above parameters. > > 2011/11/29 shiplu > >> Did you try -passin, -passout options of openssl com

Re: [PHP] PHP run from console - automatic password input

2011-11-29 Thread Peter
; >> For example, i want to automatically manage revoking self-signed >> certificates, but when i exec("command") then system asks me to give the >> pass phrase. I dont want to do that. Instead, I want my script to input >> the >> password automatically. >&

[PHP] Building PHP on Windows 7 using Visual Studio 10

2011-10-12 Thread Peter Roth
I am trying to build PHP from source code on Windows 7 using Visual Studio 10. I have tried to follow the procedure at https://wiki.php.net/internals/windows/stepbystepbuild I did not get very far and suspect that this procedure may need to be updated for people in my situation. In particul

[PHP] php_bcompiler.dll dependencies?

2011-10-12 Thread Peter Roth
I am trying to build php_bcompiler.dll on Windows 7 using Visual Studio 10. I can compile it OK, but it will not link. I have posted the build output error messages in a previous post. I am wondering if building PHP from source code would produce some files that would help me get past the link e

[PHP] creating php_bcompiler.dll

2011-10-12 Thread Peter Roth
\Peter\Documents\Data\Development\Ponderosa Innovative Solutions\Code\php-5.3.8\main\../main/config.w32.h(189): warning C4005: 'PHP_COMPILER_ID' : macro redefinition command-line arguments : see previous definition of 'PHP_COMPILER_ID' php_bcompiler.c(702): warning C

Re: [PHP] phpsadness

2011-06-03 Thread Peter Lind
On 3 June 2011 20:42, tedd wrote: > At 4:23 PM +0200 6/3/11, Peter Lind wrote: >> >> On Jun 3, 2011 3:48 PM, "tedd" >> <<mailto:tedd.sperl...@gmail.com>tedd.sperl...@gmail.com> wrote: >>  >>    That's correct.  If it causes too much user

Re: [PHP] phpsadness

2011-06-03 Thread Peter Lind
On 3 June 2011 17:36, Stuart Dallas wrote: > On Fri, Jun 3, 2011 at 4:14 PM, Peter Lind wrote: >> >> On Jun 3, 2011 4:52 PM, "Paul M Foster" wrote: >> > >> > On Fri, Jun 03, 2011 at 04:23:54PM +0200, Peter Lind wrote: >> > >> > >

Re: [PHP] phpsadness

2011-06-03 Thread Peter Lind
On Jun 3, 2011 4:52 PM, "Paul M Foster" wrote: > > On Fri, Jun 03, 2011 at 04:23:54PM +0200, Peter Lind wrote: > > > On Jun 3, 2011 3:48 PM, "tedd" wrote: > > > > > > At 1:02 PM -0400 6/2/11, Daniel Brown wrote: > >

Re: [PHP] phpsadness

2011-06-03 Thread Peter Lind
On Jun 3, 2011 3:48 PM, "tedd" wrote: > > At 1:02 PM -0400 6/2/11, Daniel Brown wrote: >> >> On Tue, May 31, 2011 at 22:13, Bill Guion wrote: >>> >>> >>> So if I understand, you want an explode() with empty parameters to explode >>> the host machine? >> >> >>That's correct. If it causes to

Re: [PHP] phpsadness

2011-05-28 Thread Peter Lind
On May 28, 2011 11:27 AM, "Andre Polykanine" wrote: > > Hello Lester, > > Actually, many of the points are not important for me so far, however > this one really drives me mad: > http://phpsadness.com/?page=sad/35 (can't explode() by an empty > string) http://www.php.net/manual/en/functio

Re: [PHP] context when calling non static method of class in a static way

2011-05-22 Thread Peter Lind
anual/en/language.oop5.late-static-bindings.php Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Check the byte sequence of a file to tell if it is UTF-8 without the BOM using PHP ?

2011-05-22 Thread Peter Lind
On 22 May 2011 09:03, Eli Orr (Office) wrote: > Dear Peter, > > But my point was different. > > If you DO NOT have any BOM of a File does > > mb_detect_encodin > > can detect the file type by scanning the whole file ?? > A few points: 1. top-posting on this list

Re: [PHP] Check the byte sequence of a file to tell if it is UTF-8 without the BOM using PHP ?

2011-05-21 Thread Peter Lind
n/function.mb-detect-encoding.php - the first comment should be interesting to you. * If you try to use mb_detect_encoding to detect whether a string is valid UTF-8, use the strict mode, it is pretty worthless otherwise. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind Be

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
On 21 May 2011 18:42, Stuart Dallas wrote: > On Sat, May 21, 2011 at 5:33 PM, Peter Lind wrote: >> >> On 21 May 2011 18:26, Stuart Dallas wrote: >> >> *snip* >> >> > http://en.wikipedia.org/wiki/Defensive_programming >> > You do things your

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
On 21 May 2011 18:26, Stuart Dallas wrote: *snip* > http://en.wikipedia.org/wiki/Defensive_programming > You do things your way and I'll do things my way. Best of luck to you. Thank you for your condescending tone. Best of luck to you too. Regards Peter -- WWW: plphp.dk / plind.

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
On 21 May 2011 18:05, Stuart Dallas wrote: > On Sat, May 21, 2011 at 4:57 PM, Peter Lind wrote: >> >> On 21 May 2011 17:34, Stuart Dallas wrote: >> > On Sat, May 21, 2011 at 4:24 PM, Peter Lind >> > wrote: >> >> >> >> On 2

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
On 21 May 2011 17:34, Stuart Dallas wrote: > On Sat, May 21, 2011 at 4:24 PM, Peter Lind wrote: >> >> On 21 May 2011 17:18, Stuart Dallas wrote: >> >> *snip* >> >> >> Again, this depends upon what your url scheme looks like - and without >> &g

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
always do - it's __FILE__ ) and you're using a one-to-one request-to-script scheme. Then just grab the part of the url up to and including your scriptname. Note I used the word good - doing several str_replace() and other calls is not what I consider a good solution if there's some

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
On 21 May 2011 17:01, Stuart Dallas wrote: > On Sat, May 21, 2011 at 3:35 PM, Peter Lind wrote: >> >> On 21 May 2011 16:18, Stuart Dallas wrote: >> > On Sat, May 21, 2011 at 3:11 PM, tedd wrote: >> > >> >> Hi gang: >> >> >> >&g

Re: [PHP] Script ID?

2011-05-21 Thread Peter Lind
what you're looking for. Apart from that, there is no single solution to the issue: if you're doing url rewrites, then you could use your route-to-url function instead of relying on any server variables. If your script is called directly instead, then use the part of the request uri up till and including the match for __FILE__. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Date validation

2011-05-20 Thread Peter Lind
I inferred. > > With all that said, I still have no 'out of the box' method to > validate a user-input date string and I haven't been able to find the > code I used with PHP 3.something before my sojourn into the depths of > ASP to know how I used to do this! > My b

Re: [PHP] Re: Date validation

2011-05-20 Thread Peter Lind
2011/5/20 João Cândido de Souza Neto : > If you look carefully, you´ll notice that I´m using the DateTime object > (default from PHP 5.2.0 or higher) not the function date. If you look carefully, you'll notice that I replied to Geoff. Regards Peter -- WWW: plphp.dk / plind.

Re: [PHP] Re: Date validation

2011-05-20 Thread Peter Lind
;d M Y', '5/2/10') > fails ... (at least, it does on my system :( ) > I'm sorry for asking but what did you expect?? You're specifically calling a method that parses a string according to a given format. If it parsed the string according to any other format, that would be a huge WTF. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] A Review Request

2011-05-20 Thread Peter Lind
e great additions, would also be great to see some links of where to get info on the subjects that are not covered (such as security) so that people could find out more on those topics. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15

Re: [PHP] A Review Request

2011-05-18 Thread Peter Lind
On 18 May 2011 23:50, tedd wrote: > At 11:22 PM +0200 5/18/11, Peter Lind wrote: >> >> On 18 May 2011 23:12, tedd wrote: >> >>  > Thanks, but the point here *is* to get people involved using PHP. >> >> Good and noble intent. Does not in any way have anyt

Re: Re: [PHP] A Review Request

2011-05-18 Thread Peter Lind
On 18 May 2011 23:28, Tim Streater wrote: > On 18 May 2011 at 22:22, Peter Lind wrote: > >> On 18 May 2011 23:12, tedd wrote: > >>> This is just one way to give-back. >> >> Suggesting people that they copypaste your code is a very bad way of >>

Re: [PHP] A Review Request

2011-05-18 Thread Peter Lind
On 18 May 2011 23:12, tedd wrote: > At 10:55 PM +0200 5/18/11, Peter Lind wrote: >> >> On 18 May 2011 22:34, tedd wrote: >>> >>>  At 3:31 PM -0400 5/18/11, Joshua Kehn wrote: >>>> >>>>  On May 18, 2011, at 3:22 PM, tedd wrote: >&g

Re: [PHP] A Review Request

2011-05-18 Thread Peter Lind
nice option for copying it or suggest that "it will work if you just copy this and add a suffix". Plenty of people will mess things up somehow, you'll discover a bug somewhere, etc. etc. Copypasted code is one of the worst things the web has done. So please don't add to it :) Regar

Re: [PHP] Consistent Class Renaming (Simple Refactoring)

2011-05-17 Thread Peter Lind
On May 17, 2011 4:32 PM, "Daniel Brown" wrote: > > On Mon, May 16, 2011 at 18:46, Richard Quadling wrote: > > > > "2.7.2"? I'm guessing 5.7.2. > >Then you're guessing wrong, sir. There was no 2.7.2, and it's > highly unlikely there would ever be a 5.7.2 either. > >Closest I can guess is

Re: [PHP] An Invitation to Neuroscientists and Physicists: Singapore Citizen Mr. Teo En Ming (Zhang Enming) Reports First Hand Account of Mind Intrusion and Mind Reading

2011-05-17 Thread Peter Lind
On May 17, 2011 5:05 PM, "tedd" wrote: > > At 1:19 PM +0100 5/17/11, Richard Quadling wrote: >> >> On 17 May 2011 12:45, Singapore Citizen Mr. Teo En Ming (Zhang Enming) >> -snip- >> >> > Please remember what Singapore Citizen Mr. Teo En Ming (Zhang Enming) have >>> >>> said. Mark my words. You

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

2011-05-16 Thread Peter Lind
On 16 May 2011 22:14, Tim Streater wrote: > On 14 May 2011 at 15:05, Peter Lind wrote: > >> On 14 May 2011 12:33, Tim Streater wrote: >>> I would like, in my app, to recover from as many run-time errors as >>> possible, >>> so that I can tidy up.

Re: [PHP] Error recovery - fatal errors

2011-05-14 Thread Peter Lind
You can avoid all problems with error output by turning off error displays in php.ini (set display_errors = off) - use error logging instead. That's the recommended setting for production servers. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kaf

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:39, Richard S. Crawford wrote: > On Wed, May 11, 2011 at 1:30 PM, Peter Lind wrote: >> >> On 11 May 2011 22:23, Richard S. Crawford wrote: >> > I'm encountering what appears to be a bug in array_push when I try using >> > that function t

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
; [0] = B > [1] = B > > Can anyone enlighten me as to why this is happening? I've looked through bug > reports but haven't found anything, which leads me to think that perhaps my > own code is at fault. > If you could post some more of your code, it would be easier to check i

Re: [PHP] How to DUMP $_POST parameters to a log file? Very useful and missing in the php.net

2011-05-08 Thread Peter Lind
On May 8, 2011 1:57 PM, "Eli Orr (Office)" wrote: > > > Dear PHP Gurus, > > I need dump a $_POST parameters as part of debug process with a client. > Any know service to make this ? > > I know $_POST is an Array but I look for a service function that can save the parsed array into a file. > let s

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Peter Lind
On 30 April 2011 21:26, Andre Polykanine wrote: > Hello Peter, > > And what would you recommend as an Html sanitizing tool? > I go by htmlpurifier when I need to sanitize html. I generally try to avoid the issue though, by having users use other markup languages (I like markdown

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Peter Lind
ities/ before settling on any tool to do the job. Far as I can tell, HtmLawed isn't actually capable of sanitizing properly, according to the author - unless it's since been updated to fix the problems mentioned in the blog. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: pli

Re: [PHP] Re: Config files: what is best? (was: Re: [PHP] XML... Useful or another layer of complexity?)

2011-04-03 Thread Peter Lind
On 3 April 2011 22:35, Andre Polykanine wrote: > Hello Peter, > > Thanks a lot! And is there a way to set (write) custom values in files > other than php.ini? Sorry, didn't find such a function. > I haven't come across any, but then again, I haven't had the need so

[PHP] Re: Config files: what is best? (was: Re: [PHP] XML... Useful or another layer of complexity?)

2011-04-03 Thread Peter Lind
On 3 April 2011 21:41, Andre Polykanine wrote: > Hello Peter, > > Just because you mentioned config files. > What  would  you suggest me as better format for them? Database is not > available  yet  since  I  need to make a config file before creating a > database. For co

Re: [PHP] XML... Useful or another layer of complexity?

2011-04-03 Thread Peter Lind
your project can benefit from it. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] is there a static constructor?

2011-03-30 Thread Peter Lind
doesn't really make sense - a class that never gets instantiated never gets constructed, hence no static constructor (nor a static destructor). You'll have to call your "constructor" function at the top of the static methods you'll be using - just check inside the

Re: [PHP] session variable problem

2011-03-25 Thread Peter Lind
More info (including some code) would be needed to get to the bottom of this, I'd say. Hard to diagnose what's happening otherwise. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.ph

Re: [PHP] Deleting elements from the middle of an array

2011-03-15 Thread Peter Lind
On Mar 15, 2011 5:05 PM, "Paul M Foster" wrote: > > On Tue, Mar 15, 2011 at 07:08:28AM +0100, Peter Lind wrote: > > >On Mar 15, 2011 4:10 AM, "Paul M Foster" <[1]pa...@quillandmouse.com> > >wrote: > >> > >

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Peter Lind
On Mar 15, 2011 4:10 AM, "Paul M Foster" wrote: > > On Mon, Mar 14, 2011 at 10:14:53PM +0100, Peter Lind wrote: > > > On 14 March 2011 22:10, Paul M Foster wrote: > > [snip] > > > >> Remove the elements, then use sort(). > > > > >

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Peter Lind
On 14 March 2011 22:10, Paul M Foster wrote: > On Mon, Mar 14, 2011 at 09:34:33PM +0100, Peter Lind wrote: > >> On 14 March 2011 21:31, Paul M Foster wrote: >> > Here's what I need to do: I have an indexed array, from which I need to >> > delete elements

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Peter Lind
loop using current() and the like. But these array functions > return values, not references, so the array isn't actually modified. > > 5) array_walk() with unset() array_splice(). No effect on the array. > > Anyone know how to do this, or know of a reference on how to? > Remo

Re: RE: [PHP] Check for open file

2011-03-03 Thread Peter Lind
o /tmp and it happily did that for me without any indication that it was still being written to (which is was by the way.) So, that's not a good way of dealing with this. > >I think I'm going to have to go with a time delay function here ... > If on Linux, you can che

[PHP] Infosys FYI

2011-02-26 Thread Peter Lind
://archive.fastaval.dk/2009/infosys/ De samme adgangskoder skulle virke til både 2010 og 2011. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] HTTP Authenticaion Query

2011-02-20 Thread Peter Lind
TTP is a stateless thing: 1. you request the page, but you're not authorized, hence you hit the first part of the if. PHP does not wait for you to do anything, it just runs through the script and sends back a page to you. 2. You enter your auth details, once again requesting the same pa

Re: [PHP] Regex pattern for preg_match_all

2011-02-18 Thread Peter Lind
On 18 February 2011 22:36, Tommy Pham wrote: > Hi folks, > > This is not directly relating to PHP but it's Friday so I'm gonna give > it a shot :).  Would someone please help me figure out why my regex > pattern doesn't work.  Below is the code and sample data: > > $html = << href="http://images.

Re: [PHP] Custom function

2011-02-16 Thread Peter Lind
On 16 February 2011 22:04, Paul M Foster wrote: > On Wed, Feb 16, 2011 at 09:21:20PM +0100, Peter Lind wrote: > >> On 16 February 2011 21:00, Dan Schaefer wrote: >> > In my code, I set the optional parameter to NULL and check for triple >> equals >> > "

Re: [PHP] Custom function

2011-02-16 Thread Peter Lind
On 16 February 2011 21:45, Adam Richardson wrote: > On Wed, Feb 16, 2011 at 3:21 PM, Peter Lind wrote: > >> On 16 February 2011 21:00, Dan Schaefer wrote: >> > In my code, I set the optional parameter to NULL and check for triple >> equals >> > "===&

Re: [PHP] Custom function

2011-02-16 Thread Peter Lind
On 16 February 2011 21:45, Andre Polykanine wrote: > Hello Peter, > > So is > func_get_args() >     the unique way? > Not really sure what you mean by the unique way. Most things proposed so far in the thread would be fine for most purposes, I'd say. If you really need f

Re: [PHP] Custom function

2011-02-16 Thread Peter Lind
cluding defaults. That said, if you're making use of optional parameters and need to check if anything was passed in, you're almost certainly doing things wrong. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PH

Re: [PHP] Displaying Results

2011-02-15 Thread Peter Lind
How do I do it? Ask google you should Plenty of advice you'll find we won't do your homework Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: First PHP site - thanks - euca_phpmysql function library

2011-02-09 Thread Peter Lind
On 9 February 2011 17:22, Bob McConnell wrote: > From: Peter Lind > >> On 9 February 2011 14:57, Bob McConnell wrote: >>> From: Al >>> >>>> On 2/8/2011 4:58 PM, Donovan Brooke wrote: >>>>> Hello, >>>>> >>>

Re: [PHP] Re: First PHP site - thanks - euca_phpmysql function library

2011-02-09 Thread Peter Lind
hat makes it so much easier to find > those invisible problems. I can't count how many times it has pointed > right at a logic flaw in my code. > > Bob McConnell Or go with the more likely candidate for a future html standard: html 5. Has the added benefit of easing you in to the ne

Re: [PHP] Bilingual strtotime()

2011-02-06 Thread Peter Lind
gt; > Strtotime can read a number of formats, but does (from experience) have problems with some. It won't work with textual dates in anything but English, far as I know. Regards Peter

Re: [PHP] No SMTP server? Can't get mail()

2011-01-20 Thread Peter Lind
Probably not the solution you were looking for, but I've always found mail() very unstable and I tend to use a mail library instead. Like phpmailer or swiftmailer. Easier to configure and figure out problems with. Regards Peter

Re: [PHP] email address syntax checker

2011-01-19 Thread Peter Lind
> > I did a quick search of the archives and found a couple elaborate things.. > but > I'm looking for something simple. This job will have trusted users and > the checker is more to help them catch mistakes when registering. if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {

Re: [PHP] Class and interface location

2011-01-19 Thread Peter Lind
n't need to parse docblocks or anything like it). regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: email list 101

2011-01-16 Thread Peter Lind
et/> Considering that you've used the PHP list for some very inane questions yourself, perhaps you should keep the tone lighter and avoid flaming people? Just a thought. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] projectpier

2011-01-12 Thread Peter Lind
2011/1/12 Ashley Sheridan > On Wed, 2011-01-12 at 23:14 +0100, Peter Lind wrote: > > jeg har flyttet projectpier over paa fastaval.dk domaenet - > det koerer nu under pp.fastaval.dk. Der er ogsaa sat redirects op paa > fastaval.plphp.dk saa man skulle ikke kunne komme til det g

[PHP] projectpier

2011-01-12 Thread Peter Lind
Heads up: jeg har flyttet projectpier over paa fastaval.dk domaenet - det koerer nu under pp.fastaval.dk. Der er ogsaa sat redirects op paa fastaval.plphp.dk saa man skulle ikke kunne komme til det gamle site (og dermed ikke logge ind det forkerte sted). -- WWW: plphp.dk / plind.dk LinkedIn: pli

Re: [PHP] Re: First PHP job

2011-01-11 Thread Peter Lind
On Jan 11, 2011 4:32 PM, "Gary" wrote: > > Steve Staples wrote: > > or the ($needle, $haystack) vs ($haystack, $needle)... i still get it > > screwed up... > > Given that, for example, array_search and strstr take those arguments in > different orders, that's not really surprising. > Something te

Re: [PHP] Re: Re: Re: PHP extension for equivalen of "getent"?

2011-01-08 Thread Peter Lind
I won't go Off Topic and suggest you try compiling from > source :-) > > While you're busy being not off topic, perhaps it might be an idea to also not point to a proper place for questions about debian tools to read chm files? I'm sure there are plenty of resources like irc channels or such. Regards Peter

Re: [PHP] Global or include?

2011-01-06 Thread Peter Lind
On Jan 6, 2011 4:24 PM, "Sándor Tamás" wrote: > > In that case you should use include_once in every script. But if you are absolutely sure that all scripts will be processed, you can include it only in one of them, because PHP - in short terms - does a file include, so it will look like as the in

Re: [PHP] memory usage/release & GC

2010-12-31 Thread Peter Lind
1GB RAM in few minutes. BTW, gc_enabled() reports on. > > Thanks, > Tommy > > Are you storing or throwing away the passwords? Also, lots of code is missing from that post, no idea if you've got a memory leak in the rest of the code Regards Peter

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

2010-12-28 Thread Peter Lind
On 28 December 2010 22:06, Daniel Brown wrote: > On Tue, Dec 28, 2010 at 16:05, Dotan Cohen wrote: >> >> Did you know that when you type 'brown1' we see it as **? Your >> system does that automatically. > >    That's how I see it, too.  It took me fourteen years to realize > that my password

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

2010-12-28 Thread Peter Lind
pler and likely as safe or safer. I wouldn't waste my time on trying to come up with very clever schemes when tried and true technologies are out there. > But before all that goes on, I have to decide what to do about leading > and trailing spaces. As has been noted a couple of times: tr

Re: [PHP] How to define a data range for graphing?

2010-12-17 Thread Peter Lind
>        $top = ($hits[0] + 1) * pow(10, strlen($hits) - 1); > } > > Basically, add one to the first digit and make the rest of the digits 0. > Depending on how you want to handle the cases ending in 0s, you may want an > extra check in there. > > General disclaimer about co

Re: [PHP] ORM doctrine

2010-12-12 Thread Peter Lind
On Sunday, 12 December 2010, Lester Caine wrote: > Peter Lind wrote: > > I may have misunderstood the topic, but a cache to me is more than > just storing views. It's also the db cache, memcache, apc, etc. You > have to think about how you use these - some of them can'

Re: [PHP] ORM doctrine

2010-12-12 Thread Peter Lind
On Sunday, 12 December 2010, Tommy Pham wrote: >> -Original Message- >> From: Lester Caine [mailto:les...@lsces.co.uk] >> Sent: Sunday, December 12, 2010 2:10 AM >> To: php-general List >> Subject: Re: [PHP] ORM doctrine >> >> Peter Lind wrote: &g

Re: [PHP] ORM doctrine

2010-12-12 Thread Peter Lind
On Sunday, 12 December 2010, Tommy Pham wrote: >> -Original Message- >> From: Lester Caine [mailto:les...@lsces.co.uk] >> Sent: Sunday, December 12, 2010 2:10 AM >> To: php-general List >> Subject: Re: [PHP] ORM doctrine >> >> Peter Lind wrote: &g

Re: [PHP] ORM doctrine

2010-12-12 Thread Peter Lind
On Sunday, 12 December 2010, Tommy Pham wrote: >> -Original Message- >> From: Peter Lind [mailto:peter.e.l...@gmail.com] >> Sent: Sunday, December 12, 2010 1:18 AM >> To: Tommy Pham >> Cc: php-general List >> Subject: Re: [PHP] ORM doctrine >&

Re: [PHP] ORM doctrine

2010-12-12 Thread Peter Lind
ing cache is doing it wrong. You shaving 10 secs off the request without cache is fine but you should have brought it much further down with a cache. Waiting 20 secs for the response is still useless. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitte

Re: [PHP] ORM doctrine

2010-12-11 Thread Peter Lind
e browser, it should take no more > than 3 seconds for the browser's status to be 'Done', provided that the user > isn't on some 56k modem connection ;). Always use a cache. Not using a cache means you've misunderstood some fundamental points. Regards Peter --

Re: [PHP] php mail() and sendmail/smtp

2010-12-02 Thread Peter Lind
to me: connect to port 25 on the mail server instead of going through sendmail. Plenty of good mail libraries out there (swiftmailer, phpmailer come to mind). Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (h

Re: [PHP] PHP Add +1 mysql updates by 2?

2010-11-26 Thread Peter Lind
And what difference will that make if the document is requested twice with every browser load? On Nov 27, 2010 6:39 AM, "Richard West" wrote: > I took that into consideration so I added the update at the very end of document... > Still the same, > RD > > > > > O

Re: [PHP] PHP Add +1 mysql updates by 2?

2010-11-26 Thread Peter Lind
On Saturday, November 27, 2010, Richard West wrote: > Hey Tommy, > > I get the same when seting it to a_downloads=a_downloads+1 > It still increments by 2 > I've never run into this before. > RD > > > On Nov 26, 2010, at 11:45 PM, Tommy Pham wrote: > >>> -Original Message- >>> From: Tamara

Re: [PHP] is this thing on??

2010-11-23 Thread Peter Lind
On 23 November 2010 20:52, Steve Staples wrote: > tap tap tap... testing testing... 1, 2, 3 > > Hello?    No activity since yesterday at like 6pm EST... am i not > getting messages, or has there not been any activity? > > Just curious... carry on about your business... :P > http://news.php.ne

Re: [PHP] Procedural Autoloader?

2010-11-22 Thread Peter Lind
o do with a procedural autoloader. Autoloading takes place if you try to instantiate an object of a class that PHP doesn't know about (yet). There is no such thing for functions. Either refactor your code so you don't have this problem (The Way To Go [tm]) or make an extension. End of di

Re: [PHP] DOMDocument/DOMElement problem

2010-11-17 Thread Peter Lind
een any updates to the DOM* extensions that would explain the change in behaviour and really find it weird - but, at least I found a solution to the problems :) Quick note, in case anyone has similar problems: make sure that the data you feed into DOMDocument is UTF8 encoded Regards Peter -- W

[PHP] DOMDocument/DOMElement problem

2010-11-16 Thread Peter Lind
ype out and had no difference) - on 5.2.9 it works on all documents, returning the proper nodeValue. Am I missing something basic? TIA Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] Template engines

2010-11-08 Thread Peter Lind
On 9 November 2010 06:20, Paul M Foster wrote: > On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: > >> I really like the idea of using a templating engine. Which one do you >> use? Why? For those that don't use templating engines, why don't you >> use them? >> > > Here's why I don't u

Re: [PHP] Template engines

2010-11-08 Thread Peter Lind
stem needs to be and what it needs to do. For smaller projects. smarty or phptal will get in the way and will likely get very annoying. For bigger projects they can be of great use. Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP Ge

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Peter Lind
That's not going to happen. My point was you could check in the original file if the function is defined and if not then define it. On Nov 3, 2010 11:55 AM, "David Nelson" wrote: > Hi Peter, :-) > > On Wed, Nov 3, 2010 at 18:44, Peter Lind wrote: >> You can check wi

Re: [PHP] include() and duplicate function definition

2010-11-03 Thread Peter Lind
You can check with function_exists to see if a function is already defined. If not, create it. Regards Peter On Nov 3, 2010 11:40 AM, "David Nelson" wrote: > Hi Thijs, :-) > > On Wed, Nov 3, 2010 at 18:18, Thijs Lensselink wrote: >> As far as I know it is not possible

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-23 Thread Peter Lind
On 23 October 2010 16:48, Jonathan Sachs <081...@jhsachs.com> wrote: > On Sat, 23 Oct 2010 08:34:27 +0200, peter.e.l...@gmail.com (Peter > Lind) wrote: > >>It is not a bug - somewhere before the foreach loop you've got, a >>variable is being referenced, and that&#x

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-22 Thread Peter Lind
behavior I described > is due to something I don't understand about PHP, or to a bug. If it's > something I don't understand, I want to understand it. If it's a bug, > I want to report it. It is not a bug - somewhere before the foreach loop you've got, a

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Peter Lind
ly the thread had ended there ... Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread Peter Lind
ld get duplicated a couple of times in some files. >> >> 3. Avoid the problem all together, use output buffering and completely >> forget about separation between application and presentation. >> >> I hope I make sense. >> >> Any thoughts on these kinds of problems? &g

Re: [PHP] Re: Buffering output to allow headers late in code?

2010-10-14 Thread Peter Lind
Just out of curiosity: why were you told to switch off output buffering? Regards Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] which one is faster

2010-10-06 Thread Peter Lind
they follow that form, but I've certainly seen it a lot of > places. > > -Alex > Xhtml documents are xml documents and thus must follow the specs for XML. Specifically, the following: http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue Regards Peter -- WWW: plphp.dk /

Re: [PHP] which one is faster

2010-10-06 Thread Peter Lind
n the second it would be looking for a simple >>> scaler called $arr, not the array value you wanted. >>> >> Ash: >> >> I understand what the {} does, but just like in HTML, it is more > proper >> to use lower case for the attributes/elements, and use

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Peter Lind
.0.0 is years old. B) your issue is with apache, not php - 403 is a "you have no permission to see this". Check permissions for the file you're trying to test, as well as for the folder. Also, seeing as you're naming the file test.php, make sure you're browsing for that file a

  1   2   3   4   5   6   7   8   9   10   >