Re: [PHP] Change displayed file name to download

2010-03-14 Thread Peter Lind
You can set the name to display as you see fit, just change $filename to your liking right before the header() call. If you just want to cut the path, use basename($filename) Regards Peter On 14 March 2010 21:29, Php Developer wrote: > Hi, > > I'm using the following code: >

Re: [PHP] ldap_bind() connectivity

2010-03-15 Thread Peter Lind
You might want to check what the function outputs with: var_dump($ldapbind); after the call to ldap_bing(). That way you'll know what actually got returned from the function. On 15 March 2010 09:54, Ashley M. Kirchner wrote: > Thanks to Jochem Mass for helping earlier to the string splitting.  

Re: [PHP] Need routine to tell me number of dimensions in array.

2010-03-16 Thread Peter Lind
This is one example where references actually decrease memory usage. The main reason is the recursive nature of the function. Try wrote: > > > Richard Quadling wrote: >> >> On 15 March 2010 23:45, Daevid Vincent wrote: >>> >>> Anyone have a function that will return an integer of the number of >

Re: [PHP] Need routine to tell me number of dimensions in array.

2010-03-16 Thread Peter Lind
it's own internal pointer, that isn't touched. Or maybe I've gotten this completely backwards ... Regards Peter On 16 March 2010 17:12, Robert Cummings wrote: > Peter Lind wrote: >> >> This is one example where references actually decrease memory usage. >>

Re: [PHP] web sniffer

2010-03-19 Thread Peter Lind
You should be able to do that by setting context options: http://www.php.net/manual/en/context.http.php On 19 March 2010 08:53, Jochen Schultz wrote: > Btw., when you use file_get_contets, is there a good way to tell the script > to stop recieving the file after let's say 2 seconds - just in case

Re: [PHP] Re: PHP in HTML code

2010-03-19 Thread Peter Lind
On 19 March 2010 10:17, Michael A. Peters wrote: > > I don't care what people do in their code. > I do not like released code with short tags, it has caused me problems when > trying to run php webapps that use short tags, I have to go through the code > and change them. > > So what people do with

Re: [PHP] no svn checkout of the current PHP development repo?

2010-03-20 Thread Peter Lind
You should probably have a look at the internals list - there's a lot of discussion going on as to what should happen in terms of SVN structure. Regards Peter On 20 March 2010 12:32, Robert P. J. Day wrote: > >  just for fun, i figured i'd check out the current PHP development > stream.  however

Re: [PHP] Filtering all output to STDERR

2010-03-22 Thread Peter Lind
You could consider suppressing errors for the duration of the problematic call - if indeed you're looking at a warning that doesn't grind everything to a halt. On 22 March 2010 18:01, Marten Lehmann wrote: > Hello, > > we have a strange problem here: > > - Our ISP is merging STDERR and STDOUT to

Re: [PHP] Filtering all output to STDERR

2010-03-22 Thread Peter Lind
Have you tried with http://dk2.php.net/manual/en/function.error-reporting.php or just the @ operator? On 22 March 2010 23:56, Marten Lehmann wrote: > Hello, > >> You could consider suppressing errors for the duration of the >> problematic call > > yes, but how? > > Regards > Marten > > -- > PHP G

Re: [PHP] Filtering all output to STDERR

2010-03-23 Thread Peter Lind
Ahh, I see why my suggestions had no effect - I assumed you were dealing with normal php errors, not something done customly by the code. I'm afraid the only option I see is that of debugging the problem script to find out where it opens STDERR - if you're certain that the script specifically outp

Re: [PHP] PHP to access shell script to print barcodes

2010-03-23 Thread Peter Lind
You can create a .php script that sets a proper header to make the browser download the file rather than display it. That also allows you to set the filename for the download. What you'd need to do is include something like: header("Content-Disposition: attachment; filename: 'barcodemerge.ps'");

Re: [PHP] PHP to access shell script to print barcodes

2010-03-24 Thread Peter Lind
arepro.com/kiosk/fast/shell/serveps.php.zip > > It's not clear to me if the server is parsing the postscript first and then > serving it, or if the server is server the postscript as-is and the browser > sends it to Preview which interprets it. > > I basically want to replicate

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 10:38, Rene Veerman wrote: > and if threading and shared memory aren't implemented, then hey, the > php dev team can build something else in that these naysayers DO need > eh... > > lol... Do you have any idea how sad and pathetic you come across? I'm very sorry to say this, but

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 11:53, Tommy Pham wrote: > On Wed, Mar 24, 2010 at 3:44 AM, Per Jessen wrote: >> Tommy Pham wrote: >> >>> On Wed, Mar 24, 2010 at 3:20 AM, Per Jessen wrote: Tommy Pham wrote: > What I find funny is that one of opponents of PHP threads earlier > mentioned that h

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 12:04, Tommy Pham wrote: > On Wed, Mar 24, 2010 at 3:52 AM, Lester Caine wrote: >> Tommy Pham wrote: How exactly will threading in PHP help with the size of the database? That makes no sense to me, please help me understand how you think threading will h

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 12:14, Tommy Pham wrote: > On Wed, Mar 24, 2010 at 4:09 AM, Peter Lind wrote: >> On 24 March 2010 12:04, Tommy Pham wrote: >>> On Wed, Mar 24, 2010 at 3:52 AM, Lester Caine wrote: >>>> Tommy Pham wrote: >>>>>> >>>>&g

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
Hmmm, that looks to me like you're trying to solve a problem in PHP with a c/c++c/# overloading solution. I'd give the builder pattern a try instead: http://en.wikipedia.org/wiki/Builder_pattern On 24 March 2010 13:01, Richard Quadling wrote: > Hi. > > I have a scenario where I would _like_ to ha

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
ct in different ways while documenting it properly and avoid the huge switch inside your constructor that Nilesh proposed. On 24 March 2010 13:35, Richard Quadling wrote: > On 24 March 2010 12:06, Peter Lind wrote: >> Hmmm, that looks to me like you're trying to solve a problem in P

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
One of the main points of the OP was that you can document the code properly. Your example doesn't allow for nice docblocks in any way, as you'll either have to param points or a whole lot of noise. Quick note: __ prefixed functions are "reserved", you shouldn't use that prefix for any of your own

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 15:33, Robert Cummings wrote: > Peter Lind wrote: >> >> One of the main points of the OP was that you can document the code >> properly. Your example doesn't allow for nice docblocks in any way, as >> you'll either have to param points or a w

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 16:09, Robert Cummings wrote: > > > Peter Lind wrote: >> >> On 24 March 2010 15:33, Robert Cummings wrote: >>> >>> Peter Lind wrote: >>>> >>>> One of the main points of the OP was that you can document the code >

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 16:23, Robert Cummings wrote: > Peter Lind wrote: >> >> On 24 March 2010 16:09, Robert Cummings wrote: >>> >>> Peter Lind wrote: >>>> >>>> On 24 March 2010 15:33, Robert Cummings wrote: >>>>> >>>

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 16:48, Robert Cummings wrote: > Peter Lind wrote: >>>>> >>>>> The ,... is a supported syntax. Then I'd add the appropriate docblock >>>>> for >>>>> the alternate constructors. >>>> >>>> I

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 19:37, Tommy Pham wrote: > On Thu, Mar 25, 2010 at 3:55 AM, Per Jessen wrote: >> Tommy Pham wrote: >> >>> On Thu, Mar 25, 2010 at 1:46 AM, Per Jessen wrote: > * If you could implement threads and run those same queries in 2+ > threads, the total time saved from queries e

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 20:09, Tommy Pham wrote: > On Thu, Mar 25, 2010 at 12:02 PM, Peter Lind wrote: >> On 25 March 2010 19:37, Tommy Pham wrote: >>> On Thu, Mar 25, 2010 at 3:55 AM, Per Jessen wrote: >>>> Tommy Pham wrote: >>>> >>>>> On Thu,

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 20:19, Tommy Pham wrote: > Aren't all feature requests must be analyzed the same way?  Example, > namespace, how many of us actually uses it now when there is an > alternative solution- subfolders - that we've been using since who > knows how long.  I don't know if threads was ask

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 20:59, Tommy Pham wrote: > On Thu, Mar 25, 2010 at 12:28 PM, Peter Lind wrote: >> On 25 March 2010 20:19, Tommy Pham wrote: >>> Aren't all feature requests must be analyzed the same way?  Example, >>> namespace, how many of us actua

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 22:51, Lester Caine wrote: > Per Jessen wrote: >> >> Tommy Pham wrote: >> >>> I'm presenting the argument for threading.  Per is presenting the work >>> around using asynchronous queries via mysqlnd.  I did read that link a >>> few days ago, "Although the user can send multiple qu

Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 23:23, Tommy Pham wrote: > > There's the code example from that same link.  You may have executed > the queries asynchronously, but the process of the results are still > serial.  Let's face it, all of our processing of queries are not a > simple echo.  We iterate/loop through the

Re: [PHP] Allowing multiple, simultaneous, non-blocking queries.

2010-03-26 Thread Peter Lind
Hi Richard At the end of discussion, the best bet for something that "approaches" a threaded version of multiple queries would be something like: 1. open connection to database 2. issue query using asynchronous call (mysql and postgresql support this, haven't checked the others) 3. pick up result

Re: [PHP] Re: optimizing PHP for microseconds

2010-03-29 Thread Peter Lind
That's impossible to answer given the brief layout of what you've described. However, rule of thumb: optimizing for microseconds only makes sense when the microseconds together make up a significant amount of time. An example might be in order: for ($i = 0; $i < count($stuff); $i++) { // do oth

Re: [PHP] Re: Logical reason for strtotime('east') and strtotime('west') returning valid results?

2010-04-07 Thread Peter Lind
On a related note: does anyone know why php -r "echo date('Y-m-d H:i:s', strtotime('a'));" happily outputs a valid timestamp? And why all other letters work as well (but only one character)? I'm sure there's a good reason for it, it just completely escapes me right now :) Regards Peter -- WWW

Re: [PHP] Little php code - error

2010-04-08 Thread Peter Lind
On 8 April 2010 16:30, David Otton wrote: > On 8 April 2010 15:21, Juan wrote: > >> The structure is pretty easy to understand, however I'm not able to >> solve this. Could you tell me why I'm not able to run this code. > > Your else has a condition on it > > } else (empty($b) and empty($c)) { >

Re: [PHP] another "useless" message.

2010-04-09 Thread Peter Lind
On 9 April 2010 12:20, Rene Veerman wrote: > lolz :)) u try to be nice, and this is what u get?!?! :-D > Rene, it's nice of you to post messages on the availability of some OS tools. However, you should also be aware that it's a minority of people on this list that use those tools - which in

Re: [PHP] 404 redirects "stolen" by provider

2010-04-09 Thread Peter Lind
On 9 April 2010 22:20, Merlin Morgenstern wrote: > This sounds like the best solution to me. The only problem is that my regex > knowledge is pretty limited. The command: > RewriteRule ^(.+) /subapp_members/search_user.php > The above rule will try to redirect everything to /subapp_members/search

Re: [PHP] 404 redirects "stolen" by provider

2010-04-09 Thread Peter Lind
On 9 April 2010 23:08, Merlin Morgenstern wrote: > > Am 09.04.2010 22:58, schrieb Peter Lind: >> >> On 9 April 2010 22:20, Merlin Morgenstern  wrote: >> >>> >>> This sounds like the best solution to me. The only problem is that my >>>

Re: [PHP] Mail Function Problem

2010-04-12 Thread Peter Lind
On 12 April 2010 05:22, Kevin Kinsey wrote: > > Thanks to the worldwide brotherhood of crooks known as spammers, > sending e-mail these days isn't nearly as easy as PHP makes it look. > You might wanna look into an "errors-to" header to help debug any > problems with sender authorization, bad port

Re: [PHP] Solution

2010-04-12 Thread Peter Lind
On 13 April 2010 00:04, Gary wrote: > For those that were looking to see a solution, this is what I have come up > with.  It was pointed out on another board (MySQL) that inserting multiple > in one script is probably prohibited because of security reasons. > > What I did was open the connection,

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Peter Lind
On 13 April 2010 15:20, Merlin Morgenstern wrote: > Hello everybody, > > I have form where users enter data to be saved in a db. > > How can I make php save the form data into a session before the user leaves > the page without pressing the submit button? Some members leave the page and > return a

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Peter Lind
On 13 April 2010 17:27, Paul M Foster wrote: > On Tue, Apr 13, 2010 at 03:20:23PM +0200, Merlin Morgenstern wrote: > >> Hello everybody, >> >> I have form where users enter data to be saved in a db. >> >> How can I make php save the form data into a session before the user >> leaves the page witho

Re: [PHP] How define if javascript is on with php

2010-04-16 Thread Peter Lind
Javascript is client-side - only way to detect it is to have a page send back information (post/get). What might work easiest is to have jquery look for a given cookie upon page render, and if it doesn't find it, then do an ajax call to the server. On the server side, initiate a session for the use

Re: [PHP] How define if javascript is on with php

2010-04-16 Thread Peter Lind
On 16 April 2010 13:54, Ashley Sheridan wrote: > On Fri, 2010-04-16 at 12:50 +0100, Paulo-WORK wrote: > >> Hello and thanks for any replies that this message may get. >> I have a issue to solve regarding PHP. >> My website relies heavlly  on jquery and does not dowgrade properly. >> I use codeigni

Re: [PHP] limit to var_dump?

2010-04-16 Thread Peter Lind
There's a limit to how deep var_dump goes, at least if you're using xdebug. Compare the output with that of print_r which is not limited in the same way. On 16 April 2010 16:15, Ashley Sheridan wrote: > I'm seeing some strange behaviour with var_dump. Is there a limit to how > many levels deep th

Re: [PHP] Replacing a special character

2010-04-18 Thread Peter Lind
On 18 April 2010 16:40, Phpster wrote: > > > On Apr 18, 2010, at 8:59 AM, Michael Stroh wrote: > >> I have this form that people use to add entries into a MySQL database. >> Recently I've had some users insert − in their entries instead of - which is >> causing some issues with scripts down the l

Re: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
Consider checking out http://php.net/gettext - it's the set of functions in PHP for i18n. With regards to language switching, you should consider using a url hierarchy for it, instead of just serving all pages with changing content. Regards Peter -- WWW: http://plphp.dk / http://plind.dk Linke

Re: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Peter Lind
Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/pli

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 10:30, Gary . wrote: > Should I be able to do this: > > class X > { >  const FOO = 'foo'; >  const FOOBAR = X::FOO . 'bar'; > > ... > } > > ? > > Because I can't. I get "syntax error, unexpected '.', expecting ',' or > ';'". I assume this is because the constants are like statics

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 14:24, Gary . wrote: > On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: >> On 19 April 2010 10:30, Gary wrote: >>> Should I be able to do this: >>> >>> class X >>> { >>>  const FOO = 'foo'; >>>  const FOO

Re: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
On 19 April 2010 15:56, Robert Cummings wrote: > > > Unless you have namespaces (and I can't remember if they completed > namespaced based functions) then don't use something so commuon as a > function named underscore :/ > > Cheers, > Rob. > You might want to have a look at http://pl2.php.net/_

Re: Re[2]: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
On 19 April 2010 12:54, Andre Polykanine wrote: > Hello Peter, > > Regarding the URL switching suggested by you and Michiel, how do I do > this if I have a rather complicated .htaccess file? For instance, a > blog entry URL is formed as follows: > http://oire.org/menelion/entry/190/ which is phisi

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 16:18, Gary . wrote: > On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind wrote: >> On 19 April 2010 14:24, Gary wrote: >>> On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: > >>>> So no, you shouldn't be able to do that. >>> >>&

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Peter Lind
On 19 April 2010 17:00, Andrew Ballard wrote: > On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis > wrote: >> hallo there everyone.. >> i got an array from my database >> Help with Code >> Tags >> *PHP Synt

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Peter Lind
On 19 April 2010 17:40, Andrew Ballard wrote: > On Mon, Apr 19, 2010 at 11:14 AM, Peter Lind wrote: >> On 19 April 2010 17:00, Andrew Ballard wrote: >>> On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis >>>>   1. $save=split("[|;]",$listOfItems); >>

Re: [PHP] Directory permissions question

2010-04-19 Thread Peter Lind
On 19 April 2010 17:18, Al wrote: > > > On 4/19/2010 11:11 AM, Adam Richardson wrote: >> >> On Mon, Apr 19, 2010 at 10:59 AM, Al  wrote: >> >>> I'm working on a hosted website that was hacked and found something I >>> don't >>> fully understand. Thought someone here may know the answer. >>> >>> Th

Re: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Peter Lind
On 20 April 2010 20:17, Alice Wei wrote: > >> From: peter.e.l...@gmail.com >> Date: Mon, 19 Apr 2010 10:15:08 +0200 >> Subject: Re: [PHP] Mail Function Using PEAR Issues >> To: aj...@alumni.iu.edu >> CC: php-general@lists.php.net >> >> Most, if not all, mail servers keep log files. You should look

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Peter Lind
On 21 April 2010 04:25, Alice Wei wrote: > Well, from my experience with Ubuntu, looks like that it does not do that. > Unless, I am doing it wrong? So did you try using the 'smtp' backend and passing all the connection details rather than 'mail'? -- WWW: http://plphp.dk / http://plind.dk Link

Re: [PHP] replying to list

2010-04-21 Thread Peter Lind
On 21 April 2010 12:38, David McGlone wrote: > Maybe it's not how the list is set up, but instead how people are > replying to the list. One would think that in a tech world where most programmers/developers try to minimize the workload and "a good programmer is lazy" is seen as meaningful and/or

Re: [PHP] replying to list (I give up)

2010-04-21 Thread Peter Lind
On 21 April 2010 14:38, Hans Åhlin wrote: > Why change the way that has been around for years and adopted by > multiple e-mail lists? > It feels like it's more problem to change the way for thousands of > users just to satisfy a couple of few. David was venting based on a discussion in another th

Re: [PHP] replying to list (I give up)

2010-04-21 Thread Peter Lind
On 21 April 2010 15:41, Dan Joseph wrote: > When you hit reply all, just take out all the other addresses and leave the > list one in there.  The list was setup like this years ago on purpose, and > they've stated in the past they don't want to change it.. And waste time every single time you pos

Re: [PHP] replying to list (I give up)

2010-04-21 Thread Peter Lind
On 21 April 2010 14:56, Ashley Sheridan wrote: > On Wed, 2010-04-21 at 08:56 -0400, David McGlone wrote: > >> On Wed, 2010-04-21 at 14:42 +0200, Daniel Egeberg wrote: >> > On Wed, Apr 21, 2010 at 14:27, David McGlone wrote: >> > > I give up. trying to reply to messages on this list is tedious. I

Re: [PHP] Re: replying to list (I give up)

2010-04-21 Thread Peter Lind
On 21 April 2010 20:09, Michelle Konzack wrote: > Hello Peter Lind, Hi Michelle > Am 2010-04-21 15:47:54, hacktest Du folgendes herunter: >> And waste time every single time you post to the list ... why do >> people become programmers/developers again? To end creating tech

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Peter Lind
On 21 April 2010 18:44, Alice Wei wrote: > I have mentioned several posts earlier that I have done nothing about my > php.ini file. From what you said, since I use U-Verse, am I supposed to do > something as described here: > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf > > > > I th

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Peter Lind
On 21 April 2010 21:58, Alice Wei wrote: >> From: peter.e.l...@gmail.com >> Date: Wed, 21 Apr 2010 21:51:31 +0200 >> Subject: Re: [PHP] Mail Function Using PEAR Issues >> To: aj...@alumni.iu.edu >> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net >> >> On 21 April 2010 18:44, Alice Wei wr

Re: [PHP] Re: replying to list (I give up)[SOLVED TO A DEGREE]

2010-04-22 Thread Peter Lind
On 22 April 2010 12:14, Ashley Sheridan wrote: > I believe Dan Brown mentioned a very good reason why this is not as > simple an issue as just changing the reply-to. Not everyone who posts to > the list subscribes to the list, so being copied into the emails is good > for them. Suddenly changing t

Re: [PHP] Re: replying to list (I give up)[SOLVED TO A DEGREE]

2010-04-22 Thread Peter Lind
On 22 April 2010 17:05, Ashley Sheridan wrote: > > On Thu, 2010-04-22 at 17:06 +0200, Peter Lind wrote: > > On 22 April 2010 12:14, Ashley Sheridan wrote: > > I believe Dan Brown mentioned a very good reason why this is not as > > simple an issue as just changing the re

Re: [PHP] Structured PHP studying

2010-04-23 Thread Peter Lind
On 23 April 2010 13:15, David McGlone wrote: > Is there a good strategy to studying PHP? > > For instance, is there a way to break everything down into small managable > topics? The Zend study guide might be a place to start - not for free thought, so there may be better options (it's also direct

Re: [PHP] creating a PHP wrapper script?

2010-04-23 Thread Peter Lind
php.net/curl should be able to do what you want. file_get_contents with a proper stream context should also work (have a look at functions like http://dk.php.net/manual/en/context.http.php ) Regards Peter On 23 April 2010 17:18, Robert P. J. Day wrote: > >  i'm sure this isn't hard to do, but i

Re: [PHP] public readonly variables

2010-04-23 Thread Peter Lind
On 23 April 2010 18:10, Ashley Sheridan wrote: > I think for now I'll just resort to leaving it as a public variable. > I'll leave the specific set function for it in and just hope that is > used instead! As it's only me who'll be using it for the time being, I > can always yell at myself later if

Re: [PHP] public readonly variables

2010-04-23 Thread Peter Lind
On 23 April 2010 18:26, Ashley Sheridan wrote: > > On Fri, 2010-04-23 at 12:25 -0400, Adam Richardson wrote: > > On Fri, Apr 23, 2010 at 12:21 PM, Peter Lind wrote: > > > On 23 April 2010 18:10, Ashley Sheridan wrote: > > > I think for now I'll just resort

Re: [PHP] PHP not being read?

2010-04-24 Thread Peter Lind
On 25 April 2010 05:00, Gary wrote: > Karl > > On the laptop, the original machine, it has Vista, Firefox 3.6.3. Previewing > on testing server Apache (XAMPP )on the computer, not network > > On the tower, it is running XP Pro, Firefox 3.6.3. Previewing on local > testing server. > > Check that t

Re: [PHP] Weird problem with is_file()

2010-04-26 Thread Peter Lind
On 25 April 2010 22:14, Michelle Konzack wrote: > Hi, > > I have a code sniplet which does not work and I do not know why: > > 8<-- >  $isfile=shell_exec("ls /tmp/tdphp-vserver/SESSION_" . > $_SERVER['REMOTE_ADDR'] . "_" . $_COOK

Re: [PHP] getting content exceprts from the database

2010-04-26 Thread Peter Lind
On 26 April 2010 12:52, Ashley Sheridan wrote: > I've been thinking about this problem for a little while, and the thing > is, I can think of ways of doing it, but they're not very nice, and I > don't think they're going to be fast. > > Basically, I have a load of HTML formatted content in a datab

Re: [PHP] getting content exceprts from the database

2010-04-26 Thread Peter Lind
On 26 April 2010 13:23, Ashley Sheridan wrote: > > On Mon, 2010-04-26 at 13:20 +0200, Peter Lind wrote: > > On 26 April 2010 12:52, Ashley Sheridan wrote: > > I've been thinking about this problem for a little while, and the thing > > is, I can think of ways of d

Re: [PHP] Re: Weird problem with is_file()

2010-04-26 Thread Peter Lind
On 26 April 2010 18:58, Michelle Konzack wrote: > Hello Pete, > > Am 2010-04-26 17:04:32, hacktest Du folgendes herunter: >> Is it possible that the space is a new-line (or a carriage-return) ? > > grmpf!  --  That it was... > >>    preg_replace('/\s+$/','',$FILE); > > Works now! Consider a trim,

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 10:42, Gary . wrote: > How do you guys handle errors during, say, db insertions. > > Let's say you have an ongoing transaction which fails on the n-th > insert. Ok, you roll back the transaction, no problem. How do you then > inform the user? Just using the text from pg_result_err

Re: [PHP] Weird while issue

2010-04-27 Thread Peter Lind
On 27 April 2010 14:36, Juan Rodriguez Monti wrote: > Hi guys, > I have some issues with while. > > I have an HTML Form, that uses GET to process its contents. Then > there's a PHP Script that receives the data, and evaluates the fields. > > So, in some instance of the code, I do something like :

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 15:36, Paul M Foster wrote: > On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: > >> How do you guys handle errors during, say, db insertions. >> >> Let's say you have an ongoing transaction which fails on the n-th >> insert. Ok, you roll back the transaction, no problem. Ho

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 16:07, Paul M Foster wrote: > On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: > >> On 27 April 2010 15:36, Paul M Foster wrote: >> > On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: >> > >> >> How do you guy

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 16:24, Paul M Foster wrote: > On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote: > >> On 27 April 2010 16:07, Paul M Foster wrote: >> > On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: >> > >> >> On 27 April 2010 1

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 18:21, tedd wrote: > At 4:31 PM +0200 4/27/10, Peter Lind wrote: >> >> While I love to rant at stupid users, the truth is probably that >> programmers are the ones who should take courses in how users think. >> In the end, if I fail to understand my u

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Peter Lind
On 28 April 2010 08:39, Gary . wrote: > class Pg_Error > { >    private static $errors = >        array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint violated'); > ... >    public static function getMessage($ec) >    { >        $text = ''; >        if (array_key_exists($ec, Pg_Error::$errors))

Re: [PHP] What is wrong with this code?

2010-04-28 Thread Peter Lind
On 28 April 2010 10:57, Gary . wrote: > On 4/28/10, Jochem Maas wrote: >>>     >> class Pg_Error >>>     >> { >>>        const INTEGRITY_CONST_UNIQUE = '23505'; >> >> this is a class constant >> >>>     >>     private static $errors = >>>     >>         array(INTEGRITY_CONST_UNIQUE => 'uniqueness

Re: [PHP] Project TIME calculated, in PHP

2010-05-02 Thread Peter Lind
On 1 May 2010 22:02, Richard Quadling wrote: > On 1 May 2010 18:48, justino garcia wrote: >> tImeArrived = CDate(InputBox("Enter START time:", "Start time", "9:00 AM")) >> TimeLeft = CDate(InputBox("Enter END time:", "End time", "1:24 PM")) >> Minutes = DateDiff("n", TimeArrived, TimeLeft) >> Hou

Re: [PHP] strtotime woes

2010-05-05 Thread Peter Lind
On 5 May 2010 16:58, Philip Thompson wrote: > Hello all. > > Long time no see! Anyway, I'm having an issue with strtotime(). Why do the > following return valid timestamps? > > echo strtotime ('a').': '.date ("m/d/Y", strtotime ('a')).""; > echo strtotime ('a,a').': '.date ("m/d/Y", strtotime ('

Re: [PHP] Can't find my error

2010-05-05 Thread Peter Lind
On 5 May 2010 18:55, David McGlone wrote: > I've checked and checked and re-checked and I can't figure out what I've done > wrong. I'm getting a parse error: > > Parse error: syntax error, unexpected T_VARIABLE in > /home/david/www/Joe/current/presentation/smarty_plugins/function.load_products_lis

Re: [PHP] Getting source from remote file

2010-05-06 Thread Peter Lind
On 6 May 2010 10:47, Auto-Deppe C. Hänsel wrote: > Hi guys and girls, > > okay, this is a dumbnut question I wouldn't bother asking but I really > did hit a spot now where I am totally wedged up in my head and can't think > straight anymore... so the, I bet easy, answer to my question escapes

Re: [PHP] Getting source from remote file

2010-05-06 Thread Peter Lind
On 6 May 2010 14:20, Auto-Deppe C. Hänsel wrote: > > Hi all, and thanks a lot for your suggestions. It works well now. > The only problem I do have are german "Umlaute" [äöü] when receiving the > content of the remote page. > It#s formatted in iso-8859-1 and I'd rather have it in UTF-8. But > ut

Re: [PHP] simplexml choking on apparently valid XML

2010-05-08 Thread Peter Lind
On 8 May 2010 00:39, Nathan Nobbe wrote: > > hmm, both the strings seem to work fine on my laptop: > +1. Have no problem with either string -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchs

Re: [PHP] xpath help

2010-05-09 Thread Peter Lind
On 9 May 2010 10:31, Gary wrote: > If I have a document containing, say: > >   >   >   >     >     foo1 >     bar1 >     >     >     >      foo2 >     >     >      bar2 >     >     > ... > > How do I get at "bar2"? I tried everything, based on an xpath from > Firebug (Firefox plugin), but ke

Re: [PHP] __call and recursion

2010-05-09 Thread Peter Lind
On 9 May 2010 23:21, Daniel Kolbo wrote: > Hello, > > I've defined a __call() method inside a class.  Within the __call() > method (after testing that the method exists and is callable I am using: > > call_user_func_array(array($this,$method), $args); > > However, this seems to be an infinite loop

Re: [PHP] __call and recursion

2010-05-09 Thread Peter Lind
On 9 May 2010 23:56, Nathan Nobbe wrote: > On Sun, May 9, 2010 at 3:25 PM, Peter Lind wrote: >> >> On 9 May 2010 23:21, Daniel Kolbo wrote: >> > Hello, >> > >> > I've defined a __call() method inside a class.  Within the __call() >> > meth

Re: [PHP] PHP Encoder like IonCube

2010-05-10 Thread Peter Lind
On 10 May 2010 13:25, Ashley Sheridan wrote: > On Mon, 2010-05-10 at 12:42 +0600, shiplu wrote: > >> On Mon, May 10, 2010 at 6:28 AM, donald sullivan wrote: >> > bcompiler is available, but with the correct tools data can still be >> > extracted. >> > http://php.net/manual/en/book.bcompiler.php

Re: [PHP] PHP Application Structre

2010-05-10 Thread Peter Lind
On 10 May 2010 13:58, Ashley Sheridan wrote: > On Mon, 2010-05-10 at 13:15 +0200, Arno Kuhl wrote: > >> -Original Message- >> From: Alex Major [mailto:p...@allydm.co.uk] >> Sent: 10 May 2010 12:39 PM >> >> From what I've seen and used, there seem to be three distinct ways of going >> about

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Peter Lind
On 10 May 2010 18:17, Ashley Sheridan wrote: > > >> >> 3} Unless the site is small and has few pages and applications, it is almost >> impossible to maintain. >> > > I disagree here. As long as there are useful naming conventions for all > of the files (I've seen projects where files have been nam

Re: [PHP] PHP Application Structre

2010-05-12 Thread Peter Lind
On 12 May 2010 07:10, Kevin Kinsey wrote: > Ashley Sheridan wrote: >> >> On Tue, 2010-05-11 at 08:48 +0530, chetan rane wrote: >> >>> Hi all, >>> >>> mod rewrite was actually inrduced to have search engne frendly urls. >>> hnce if you want a seo site then you have to use options 1 & 2. using >>> s

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread Peter Lind
Output looks pretty typical for something encrypted/obfuscated. As the script will run, it needs to unpack itself ... so you can write automated unpackers for this kind of thing if you want. Best go with Phpsters advice of the contract, you'd be a lot better off (assuming the court system works).

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread Peter Lind
On 12 May 2010 12:50, shiplu wrote: > It just obfuscates. Long ago I created a decoder for this type of encoder. > Every day I got 100s of decoding requests. > After changing my domain and hosting company I didn't upload it yet. You of all people should know the futility in what you're asking the

Re: [PHP] PHP Application Structre

2010-05-12 Thread Peter Lind
On 12 May 2010 17:07, Paul M Foster wrote: > > Because your public internet server disables its use. > And once more I'm reminded of just how happy I am with my VPS and my dedicated server. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flic

Re: [PHP] PHP Application Structre

2010-05-12 Thread Peter Lind
On 12 May 2010 17:17, Kevin Kinsey wrote: > > Well, again, I'm not purporting to be an authority, but the > first thing that comes to mind is that my reasoning would be > much the same as my reasoning in building stuff:  I've got a nice > STIHL chainsaw, but I don't need it to cut two-by-fours, an

Re: [PHP] stristr query trouble

2010-05-13 Thread Peter Lind
On 13 May 2010 10:08, Lawrance Shepstone wrote: > -Original Message- > From: Ron Piggott [mailto:ron@actsministries.org] > Sent: 13 May 2010 06:02 AM > To: PHP General > Subject: [PHP] stristr query trouble > > I am not understanding why 'true' isn't the result of this syntax because >

  1   2   3   4   >