Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread Tom Worster
On 8/17/09 5:24 AM, "Ashley Sheridan" wrote: > On Mon, 2009-08-17 at 02:17 -0700, nashrul wrote: >> This is a newbie question... >> Let's say there are 3 php files, page1.php, page2.php and page3.php. Form >> submission from page1.php or page2.php will take user to page3.php. >> I know that we ca

Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread Tom Worster
On 8/17/09 5:17 AM, "nashrul" wrote: > This is a newbie question... > Let's say there are 3 php files, page1.php, page2.php and page3.php. Form > submission from page1.php or page2.php will take user to page3.php. > I know that we can use parameter that is appended in the action attribute of > th

Re: [PHP] Help on pregreplace

2009-08-18 Thread Tom Worster
On 8/18/09 10:56 AM, "Merlin Morgenstern" wrote: > > > Ashley Sheridan wrote: >> On Tue, 2009-08-18 at 16:00 +0200, Merlin Morgenstern wrote: >>> Hi there, >>> >>> I am highlighting keywords with the help of pregreplace. This works >>> great with one limitation. If the word that has to be repl

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Tom Worster
On 8/19/09 3:55 AM, "Dengxule" wrote: > I have a crontab command to execuate my php-script every half an hour. > > The mission of the php-script is to open a file(log file), examine it. > > The target file(log file) is transported to local every half an hour. > > I've no idea how much time it

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-20 Thread Tom Worster
On 8/19/09 9:56 PM, "Clancy" wrote: > I gather from this discussion that PHP allows two users to open a file for > R/W? I had assumed it wouldn't. i think php does allow this. but i'm not sure all file systems do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] unset() something that doesn't exist

2009-08-24 Thread Tom Worster
is it the case that unset() does not trigger an error or throw an exception if it's argument was never set? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Tom Worster
7; > in >>> C:\wamp\www\TinyCreator\testCrapp6.php on line 42 >> >> This is a syntax error, not a runtime error. You've clearly done >> something wrong. >> >>> "Tom Worster" wrote in message >>> news:c6b87877.11463%...@thefsb.or

Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Tom Worster
ax error, not a runtime error. You've clearly done > something wrong. > >> "Tom Worster" wrote in message >> news:c6b87877.11463%...@thefsb.org... >>> is it the case that unset() does not trigger an error or throw an >> exception >>> if it

[PHP] Why aren't you rich? (was Re: unset() something that doesn't exist)

2009-08-26 Thread Tom Worster
On 8/26/09 10:08 AM, "tedd" wrote: > I had a client say to me once "If you're so smart, then why aren't > you rich?" how about: "i'm smart enough that i know not to waste my allotted time on this planet amassing riches." i know plenty of rich people, many of whom earned their wealth. i envy the

Re: [PHP] Re: Best way to test for form submission?

2009-08-29 Thread Tom Worster
On 8/29/09 9:29 AM, "tedd" wrote: > At 1:18 AM -0700 8/29/09, Warren Vail wrote: >> To test a form I usually send the form contents to a php file that contains >> the following; >> >> foreach($_POST as $nm => $val) echo "_POST[".$nm."] [".$val."]"; >> foreach($_GET as $nm => $val) echo "_GET[".$

[PHP] mysql user session handler

2009-09-08 Thread Tom Worster
questions for those of you with a user session handler using mysql: did you write your own handler, write one based off some other you found (if so, which?), or are you using some available library (if so, which?)? and how do you feel about your implementation? satisfied? or are there improvement

Re: [PHP] mysql user session handler

2009-09-08 Thread Tom Worster
ns-in-a-Database/ > > > On Tue, Sep 8, 2009 at 10:53 PM, Tom Worster wrote: > >> questions for those of you with a user session handler using mysql: >> >> did you write your own handler, write one based off some other you found >> (if >> so, which?), or a

Re: [PHP] mysql user session handler

2009-09-09 Thread Tom Worster
On 9/9/09 4:16 AM, "Ford, Mike" wrote: >> -Original Message----- >> From: Tom Worster [mailto:f...@thefsb.org] >> Sent: 09 September 2009 02:29 >> >> thanks, Devendra, that's pretty much the same as my handler. (though >> i can't &g

Re: [PHP] Renaming a Directory

2009-09-09 Thread Tom Worster
On 9/9/09 12:08 AM, "Paul M Foster" wrote: > On Tue, Sep 08, 2009 at 05:39:43PM -0400, Floyd Resler wrote: > >> How can I rename a directory with files in it? The rename function >> gives me a "directory not empty" error. I know I could do it be >> creating the directory, moving the files, and

Re: [PHP] mysql user session handler

2009-09-09 Thread Tom Worster
'm our case we opt for memcache to store the sessions > Mmc its soo much faster and you will have less net overhead because > the simple protocol > Also the configuration its easier. If you see in the php manual you > only need to touch two lines in the php.ini > > On 9/8/09

[PHP] get an object property

2009-09-11 Thread Tom Worster
if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value of one of the objects properties, is there a tidy way to get it without setting another variable? to illustrate, here's something that doesn't work, but it would be convenient if i

Re: [PHP] get an object property

2009-09-12 Thread Tom Worster
On 9/12/09 12:31 AM, "Paul M Foster" wrote: > On Fri, Sep 11, 2009 at 07:31:01PM -0400, Tom Worster wrote: > >> if i have an expression that evaluates to an object, the return value from a >> function, say, and i only want the value of one of the objects propertie

Re: [PHP] get an object property

2009-09-12 Thread Tom Worster
On 9/12/09 1:32 AM, "Lars Torben Wilson" wrote: > Tom Worster wrote: >> if i have an expression that evaluates to an object, the return value from a >> function, say, and i only want the value of one of the objects properties, >> is there a tidy way to get it w

Re: [PHP] get an object property

2009-09-12 Thread Tom Worster
On 9/12/09 9:50 AM, "Tom Worster" wrote: > On 9/12/09 1:32 AM, "Lars Torben Wilson" wrote: > >> Tom Worster wrote: >>> if i have an expression that evaluates to an object, the return value from a >>> function, say, and i only want the value of

[PHP] server name that the user agent used

2009-09-13 Thread Tom Worster
when using apache with one vhost that responds to a few different hostnames, e.g. domain.org, y.domain.org, x.domain.org, let's say the vhost's server name is y.domain.org and the other two are aliases, is there a way in php to know which of these was used by the user agent to address the server?

Re: [PHP] get an object property

2009-09-13 Thread Tom Worster
On 9/13/09 3:21 AM, "Lars Torben Wilson" wrote: >> On 9/12/09 9:50 AM, "Tom Worster" wrote: >> >> but let me give you a more different example: >> >> $a and $b are normally both objects, each with various members including a >> prop q, b

Re: [PHP] server name that the user agent used

2009-09-14 Thread Tom Worster
On 9/13/09 10:24 PM, "Tommy Pham" wrote: > --- On Sun, 9/13/09, Tom Worster wrote: > >> From: Tom Worster >> Subject: [PHP] server name that the user agent used >> To: "PHP General List" >> Date: Sunday, September 13, 2009, 8:21 PM >>

Re: [PHP] APC - Upload progress problem. apc

2009-09-14 Thread Tom Worster
On 9/14/09 5:39 AM, "Phred White" wrote: > > On Sep 13, 2009, at 8:50 PM, Eddie Drapkin wrote: > >> On Sun, Sep 13, 2009 at 9:38 PM, Phred White >> wrote: >>> >>> On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: >>> On Sun, Sep 13, 2009 at 8:29 PM, Phred White wrote: >

Re: [PHP] server name that the user agent used

2009-09-14 Thread Tom Worster
On 9/14/09 9:03 AM, "Tom Worster" wrote: > On 9/13/09 10:24 PM, "Tommy Pham" wrote: > >> --- On Sun, 9/13/09, Tom Worster wrote: >> >>> From: Tom Worster >>> Subject: [PHP] server name that the user agent used >>> To:

Re: [PHP] server name that the user agent used

2009-09-14 Thread Tom Worster
On 9/14/09 2:11 PM, "Lars Torben Wilson" wrote: > Tom Worster wrote: >> On 9/13/09 10:24 PM, "Tommy Pham" wrote: >> >>> --- On Sun, 9/13/09, Tom Worster wrote: >>> >>>> From: Tom Worster >>>> Subject: [PHP] server

Re: [PHP] moving to quad core

2009-09-15 Thread Tom Worster
On 9/15/09 10:54 AM, "Andres Gonzalez" wrote: > I have an application developed that uses alot of PHP. Currently, it is > running on a Ubuntu 8.04 , single core CPU host. We are moving to a > quad core host for this application. > > Is there anything special that I need to do to configure PHP t

[PHP] session.gc_maxlifetime

2009-09-22 Thread Tom Worster
i'm not 100% sure what the manual means when it says... session.gc_maxlifetime integer session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up. Garbage collection occurs during session start. what event exactly does the "after which" here r

Re: [PHP] Re: session.gc_maxlifetime

2009-09-22 Thread Tom Worster
so i don't think that's the source of the problem. On 9/22/09 4:17 PM, "Ralph Deffke" wrote: > Hi Tom, > > i did find this in the bug reports, its pretty new and should be an answer. > > http://news.php.net/php.doc.bugs/2653 > > ralph_def...@ya

Re: [PHP] Re: session.gc_maxlifetime

2009-09-23 Thread Tom Worster
of 6h I would bet, that this is the problem. I > would not trust such a long lifetime at all. > > If sessions have to be active such a long time, I would see only cooky based > solutions > > let me know, what u did investigate on this. > > ralph_def...@yahoo.de > > &g

Re: [PHP] Re: session.gc_maxlifetime

2009-09-24 Thread Tom Worster
connect to UMTS rigzt now, these > systems deconnect on idle lines and reconect without the users even know it. > Also a lot of lines change IP address at midnihgt. > > cheers > ralph_def...@yahoo.de > > "Tom Worster" wrote in message > news:c6e00521.12d98%...@th

[PHP] catch an iconv E_NOTICE

2009-09-24 Thread Tom Worster
i have this hack that works up to a point... function my_err_handler($errno, $errstr, $errfile, $errline) { if ( preg_match('/iconv/', $errstr) ) { throw new Exception('iconv error'); } else { // ? how to invoke default error handler ? } } set_error_handler("my_err_hand

Re: [PHP] catch an iconv E_NOTICE

2009-09-24 Thread Tom Worster
On 9/24/09 10:30 AM, "David Otton" wrote: > 2009/9/24 Tom Worster : > >> but i'd like proceed with default error handling in the branch with the >> question marks. how can i do that? > > An error handler that passes through to the previous err

[PHP] intl extension on os x

2009-09-27 Thread Tom Worster
does anyone know how to install intl on os x 10.5? it seems a libicu binary is included in os x but not with headers. fink has a package for installing the headers. maybe that would allow pecl to install the intl extension. has anyone done this successfully? or know any other way to get intl runn

Re: [PHP] Text similarity

2009-09-28 Thread Tom Worster
On 9/28/09 7:07 AM, "Merlin Morgenstern" wrote: > > > Ashley Sheridan wrote: >> On Mon, 2009-09-28 at 12:27 +0200, Merlin Morgenstern wrote: >>> Hi there, >>> >>> I am trying to find out similarity between 2 strings. Somehow the >>> similar_text function returns 33% similarity on strings that

Re: [PHP] intl extension on os x

2009-09-28 Thread Tom Worster
On 9/28/09 2:41 AM, "Tommy Pham" wrote: > - Original Message ---- >> From: Tom Worster >> To: PHP General List >> Sent: Sunday, September 27, 2009 5:34:45 PM >> Subject: [PHP] intl extension on os x >> >> does anyone know how to install i

Re: [PHP] intl extension on os x

2009-09-29 Thread Tom Worster
On 9/28/09 1:40 PM, "Tom Worster" wrote: > anyway, in the cli the command collator_create( 'en_US' ); did not provoke > an error, so maybe that works. > > but if i add extension=intl.so to php.ini and restart apache, php says: PHP > Warning: PHP Startup: Una

Re: [PHP] Self-Process php forms or not?

2009-10-01 Thread Tom Worster
On 10/1/09 8:00 AM, "MEM" wrote: > One last question about this: > > I've done a self submit form, after hearing all the advantages expressed > here. > But how could we relate, without using javascript, a self submit form with a > "success page" or a "confirmation page" that doesn't show the fo

Re: [PHP] Self-Process php forms or not?

2009-10-01 Thread Tom Worster
On 10/1/09 10:13 AM, "tedd" wrote: > At 1:00 PM +0100 10/1/09, MEM wrote: >> One last question about this: >> >> I've done a self submit form, after hearing all the advantages expressed >> here. >> But how could we relate, without using javascript, a self submit form with a >> "success page" or

Re: [PHP] Self-Process php forms or not?

2009-10-03 Thread Tom Worster
On 10/2/09 10:24 AM, "tedd" wrote: > At 1:55 PM +0530 10/2/09, kranthi wrote: >> and yes i forgot to mention... i avoid hidden form elements because >> they can be modified very easily and hence pose a security threat. > > That depends upon how sloppy you are in coding. > > NONE of my hidden va

Re: [PHP] Self-Process php forms or not?

2009-10-03 Thread Tom Worster
On 10/2/09 10:06 AM, "MEM" wrote: > I'm now understanding that even if the form is submitted to self, we can > still use a redirect to a "success_message_page.php". However, we must do > this redirect, AFTER the form has submitted to himself. It's the only thing > that we have to pay attention he

Re: [PHP] Re: A really wacky design decision

2009-10-03 Thread Tom Worster
On 10/3/09 9:53 AM, "Ralph Deffke" wrote: > this is a clear sign that somebody is on a sin TRAIL, I would not even spend > the time on what sin collections this guy got i see it more as ignorance than sin. to misunderstand the difference between $n++ and ++$n is a beginner error. as k&r made

Re: [PHP] A really wacky design decision

2009-10-03 Thread Tom Worster
On 10/3/09 7:21 AM, "clanc...@cybec.com.au" wrote: > However there is one feature of PHP which, to my mind, is really bad design. > How many of > you can see anything wrong with the following procedure to search a list of > names for a > particular name? > > $i = 0; $j = count ($names); while ($

Re: [PHP] A really wacky design decision

2009-10-03 Thread Tom Worster
On 10/3/09 12:25 PM, "Ashley Sheridan" wrote: > On Sat, 2009-10-03 at 11:57 -0400, Tom Worster wrote: > >> On 10/3/09 7:21 AM, "clanc...@cybec.com.au" wrote: >> >>> However there is one feature of PHP which, to my mind, is really bad design. >

Re: [PHP] A really wacky design decision

2009-10-04 Thread Tom Worster
On 10/4/09 6:36 AM, "clanc...@cybec.com.au" wrote: >> i might think it ok for (2260 == '226E1') to be true since php would be >> doing type juggling in a logical left-to-right manner: we start with an >> integer 2260, next is the juggling comparison operator, then a string, so it >> might reasona

Re: [PHP] Self-Process php forms or not?

2009-10-04 Thread Tom Worster
direct to success page. > } > else > { > Echo "Sorry, couldn't process the form"; > } > > > > I suppose that the echo message telling "we couldn't process the form" does > not appear when the form first loads, because the server side script

Re: [PHP] class to generate Javascript Object ??

2009-10-04 Thread Tom Worster
On 10/4/09 9:39 AM, "Michael A. Peters" wrote: > I wrote a php class to generate flowplayer/html5 media code for my site: > > http://www.shastaherps.org/xml_MMmediaClass.phps > > The "buildFlashvars()" function in it is really ugly and will be a pain > to update as I modify the class in the fut

Re: [PHP] Self-Process php forms or not?

2009-10-04 Thread Tom Worster
On 10/4/09 10:39 AM, "MEM" wrote: >> i don't think so. if the user requests the page "a_form.php" then the >> server >> will normally execute the a_form.php script regardless whether the form >> was >> submitted or not. >> >> to display a blank form, the user probably requests a_form.php with th

Re: [PHP] Self-Process php forms or not?

2009-10-04 Thread Tom Worster
On 10/4/09 10:55 AM, "tedd" wrote: > At 3:39 PM +0100 10/4/09, MEM wrote: >>> i don't think so. if the user requests the page "a_form.php" then the >>> server >>> will normally execute the a_form.php script regardless whether the form >>> was >>> submitted or not. >>> >>> to display a blank

Re: [PHP] Time Problem: always ten past xx

2009-10-06 Thread Tom Worster
On 10/6/09 4:16 AM, "Mert Oztekin" wrote: > My mistake, > > I thought it was date() now strftime() > Sorry > > (why do php developers create two different standarts for such similiar > functions???☺ ) > it's traditional to do so. it reminds me of the bit about subtly incompatible shells in un

Re: [Fwd: [PHP] Sessions in databases]

2009-10-06 Thread Tom Worster
On 10/6/09 10:26 AM, "Il pinguino volante" wrote: > I have to realize an authentication system for a lot of users. > > I heard that someone uses to store session states (?) into a database. I'd > like to know how and, expecially, WHY to do it and what's would be better > (considering that I CANN

Re: [PHP] Re: ternary operator sintax help

2009-10-06 Thread Tom Worster
just as ashley said it. On 10/6/09 3:26 PM, "MEM" wrote: > Sorry all, > It's ok. The sintax: > > class="mensagemErro">'.$erros['anexo'].'' :''); ?> > > Was right all the time. > > Anyway, I've learn something new: having a var with '' is not the same thing > as not been unset. So we must pa

Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo

2009-10-07 Thread Tom Worster
just yesterday i was reading through this wonderful and very funny presentation: http://talks.php.net/show/froscon08/0 for me it really drove home the message (among others) that it makes sense to find out where the real gains can be made before investing your efforts in optimization. --

Re: [PHP] FILTER_VALIDATE_INT - newbie question

2009-10-07 Thread Tom Worster
On 10/7/09 6:04 AM, "Ashley Sheridan" wrote: > On Wed, 2009-10-07 at 10:57 +0100, MEM wrote: >> Hello all, >> >> >> I'm having this strange behavior, and I do not understanding why... >> >> When I use FILTER_VALIDATE_INT I'm unable to get, on my input box, values >> starting with 0(zero), or v

[PHP] ext/mbstring compile time dependency

2012-01-04 Thread Tom Worster
What does this mean in the PHP Change Log: "Removed compile time dependency from ext/mbstring (Dmitry)" Does it mean that mbstring is available by default in PHP 5.4? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2