Re: [PHP] Odd Apache2/PHP Problem

2011-06-03 Thread Daniel P. Brown
On Fri, Jun 3, 2011 at 15:12, Floyd Resler wrote: > I am having a really odd Apache2/PHP problem.  My employer set up a new Web > server to migrate our Web sites to.  One site requires a log in and I have > the ability to log in a someone else.  However, when I do this, Apache throws > a Segmen

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:50 PM, Peter Lind wrote: > I'd say there's a problem in your code. Check where you might be using > references, chances are you're using one somewhere and not unsetting > it afterwards. > Also make sure that the code that receives the final array isn't modifying the obj

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 to add objects to an array. For example...

Re: [PHP] Odd array_push issue

2011-05-11 Thread Richard S. Crawford
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 to add objects to an array. For example... > > > > A = Object 1 > > B = Object 2 > > > > If I execu

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:23 PM, Richard S. Crawford wrote: > If I execute the following code: > > array_push(objectarray, A); > array_push(objectarray, B); > > ...I expect the contents of $objectarray to be: > > [0] = A > [1] = B > > Instead, the last object pushed onto the array is repeated thro

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
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 to add objects to an array. For example... > > A = Object 1 > B = Object 2 > > If I execute the following code: > > array_push(objectarray, A); > array_push(o

Re: [PHP] odd list bounces

2011-01-31 Thread Daniel Brown
On Mon, Jan 31, 2011 at 09:10, Nicholas Kell wrote: > > I received one too. > Message 310871 was the bouncer for me. Yeah, it's because most mail servers didn't like the number of suspicious terms coupled with the bounce. It was directed at Merlin (as in, "hey, your mailbox is full, so you w

Re: [PHP] odd list bounces

2011-01-31 Thread Nicholas Kell
On Jan 31, 2011, at 4:47 AM, Ashley Sheridan wrote: > Hiya, > > Is anyone else getting odd bounce messages? I just received one from the > list about a message that was returned as a bounce from my email > address. The fact that I was able to read an email about an email that > bounced from me s

Re: [PHP] odd list bounces

2011-01-31 Thread Richard Quadling
On 31 January 2011 10:52, Shreyas Agasthya wrote: > Ashley, > > I just got one with the subject line as : ' ezmlm warning' > * > * > > On Mon, Jan 31, 2011 at 4:17 PM, Ashley Sheridan > wrote: > >> Hiya, >> >> Is anyone else getting odd bounce messages? I just received one from the >> list about a

Re: [PHP] odd list bounces

2011-01-31 Thread Shreyas Agasthya
Ashley, I just got one with the subject line as : ' ezmlm warning' * * On Mon, Jan 31, 2011 at 4:17 PM, Ashley Sheridan wrote: > Hiya, > > Is anyone else getting odd bounce messages? I just received one from the > list about a message that was returned as a bounce from my email > address. The fa

Re: [PHP] odd while behavior...

2010-10-16 Thread a...@ashleysheridan.co.uk
I wouldn't really use a while statement for this, but a for loop instead, as it needs less code: "; for($i =1;$i<=12;$i++) {     $dateformat = date("M", mktime(0,0,0, $i,0,0));     echo <<$dateformat $i HTML; } echo ""; ?> The other code was starting from 0 and going to 12, which is 13 mo

Re: [PHP] odd while behavior...

2010-10-16 Thread Alexander Schrijver
On Sat, Oct 16, 2010 at 11:12:03AM -0400, Jason Pruim wrote: > Okay so I'm just playing around with some stuff trying to learn more > and expand my knowledge and I ran into something I don't > understand... Take the following code: > > > echo ""; > $i ="0"; > while($i <="12") { > > $dat

Re: [PHP] odd while behavior...

2010-10-16 Thread Simon J Welsh
This is because of your mktime() call. You're trying to get the zeroth day of the month, which is the last day of the preceding month. Using mktime(0, 0, 0, $i, 1) instead should give you the desired results, assuming you do start at 1, and not 0 as you have in your code. --- Simon Welsh On 17/

Re: [PHP] Odd Endless Loop with Explorer 8 (pc)

2009-09-12 Thread c...@hosting4days.com
On Sep 12, 2009, at 7:57 PM, kranthi wrote: '; ?> may b u should have '; ?> Thanks kranthi & HallMarc Websites url= ... - that did the trick! Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Odd Endless Loop with Explorer 8 (pc)

2009-09-12 Thread HallMarc Websites
> -Original Message- > From: c...@hosting4days.com [mailto:c...@hosting4days.com] > Sent: Saturday, September 12, 2009 10:39 PM > To: php-general@lists.php.net > Subject: [PHP] Odd Endless Loop with Explorer 8 (pc) > > I have many of these tags on a site... > > They work well with all b

Re: [PHP] Odd Endless Loop with Explorer 8 (pc)

2009-09-12 Thread kranthi
> '; ?> may b u should have '; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Odd performance problem

2008-05-09 Thread Joeri Sebrechts
was just a semprom 3k... didn't know they were that dif Thiago Henrique Pojda Desenvolvimento Web +55 41 3033-7676 [EMAIL PROTECTED] Excelência em Softwares Financeiros -Mensagem original- De: Robert Cummings [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 9 de maio de

Re: [PHP] Odd performance problem

2008-05-09 Thread Robert Cummings
On Wed, 2008-05-07 at 17:31 +0200, Joeri Sebrechts wrote: > Hello, > > While debugging a script that ran too slowly I came across something that I > can't explain. > > It is inactive code that when removed doubles the run time of the script. > > Specifically, the issue is a switch statement, w

Re: [PHP] Odd behavior

2006-12-25 Thread Martin Alterisio
2006/12/25, jekillen <[EMAIL PROTECTED]>: On Dec 25, 2006, at 7:21 AM, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2006-12-24 18:11:03 -0800: >> function display($list, $in, $out, $save, $req, $x) >> { >> for($i = 0; $i < count($in); $i++) >> {$j = $i + 1; >> // two sets

Re: [PHP] Odd behavior

2006-12-25 Thread jekillen
On Dec 25, 2006, at 7:21 AM, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-24 18:11:03 -0800: function display($list, $in, $out, $save, $req, $x) { for($i = 0; $i < count($in); $i++) {$j = $i + 1; // two sets of links displayed instead of one for($i = 0; $i <

Re: [PHP] Odd behavior

2006-12-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-24 18:11:03 -0800: > function display($list, $in, $out, $save, $req, $x) > { > for($i = 0; $i < count($in); $i++) > {$j = $i + 1; > // two sets of links displayed instead of one > for($i = 0; $i < count($out); $i++) > {$j = $i + 1;

Re: [PHP] Odd error after upgrading from Php4 to Php5

2006-11-29 Thread Jochem Maas
Ian Barnes wrote: > Hi, > > $sql1 = "UPDATE members SET $pass WHERE id = '$editid'"; you might consider that $editid is not what you think. use var_dump() et al to discover what is really in each var. > > Thats whats on 199. ON line 198 i have: $pass = $_POST['pass']; which means I can inject

Re: [PHP] Odd error after upgrading from Php4 to Php5

2006-11-28 Thread Ian Barnes
Hi, $sql1 = "UPDATE members SET $pass WHERE id = '$editid'"; Thats whats on 199. ON line 198 i have: $pass = $_POST['pass']; Thanks, Ian On 11/29/06, Jochem Maas <[EMAIL PROTECTED]> wrote: Ian Barnes wrote: > Hi, > > We recently upgraded our primary webserver to php 5 from php4 and we are

Re: [PHP] Odd error after upgrading from Php4 to Php5

2006-11-28 Thread Jochem Maas
Ian Barnes wrote: > Hi, > > We recently upgraded our primary webserver to php 5 from php4 and we are > now > getting the following errors on the site: > > *Catchable fatal error*: Object of class stdClass could not be converted to > string in /home/www/somesite/somfile.php on line *199 > > *Arou

RE: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Ford, Mike
On 17 November 2006 16:50, Stut wrote: > > > Your basic misunderstanding is that === is the opposite of !== > > > which it's not. Complete rubbish -- it so absolutely is! If $a===$b, then !($a===$b) is the same as $a!==$b, QED. > > >(INTEGER === true) will always be false because the type

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Stut
Ok, just to shut you all up, I managed to convince the OP earlier today, but it never made it to the list... Michael wrote: At 02:58 AM 11/17/2006 , Stut wrote: Michael wrote: This will be my last post on this thread of discussion. Thanks to all who replied, I have it figured out. I

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread tedd
At 2:54 AM -0700 11/17/06, Michael wrote: Logic dictates that if something evaluates to NOT FALSE it must be TRUE. Regardless of the type, regardless of the species, breed, flavor etc. Not true -- it depends upon your reference/environment. For example, NULL is neither true nor false in MySQL.

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Jochem Maas
Robert Cummings wrote: > On Fri, 2006-11-17 at 17:29 +0100, Jochem Maas wrote: >> Robert Cummings wrote: >>> On Fri, 2006-11-17 at 02:54 -0700, Michael wrote: This will be my last post on this thread of discussion. Thanks to all who replied, I have it figured out. I guess m

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Robert Cummings
On Fri, 2006-11-17 at 17:29 +0100, Jochem Maas wrote: > Robert Cummings wrote: > > On Fri, 2006-11-17 at 02:54 -0700, Michael wrote: > >> This will be my last post on this thread of discussion. > >> > >> Thanks to all who replied, I have it figured out. > >> > >> I guess my only problem with the wa

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Jochem Maas
Robert Cummings wrote: > On Fri, 2006-11-17 at 02:54 -0700, Michael wrote: >> This will be my last post on this thread of discussion. >> >> Thanks to all who replied, I have it figured out. >> >> I guess my only problem with the way the !== and === operators work in this >> situation is this: >> >

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Robert Cummings
On Fri, 2006-11-17 at 02:54 -0700, Michael wrote: > This will be my last post on this thread of discussion. > > Thanks to all who replied, I have it figured out. > > I guess my only problem with the way the !== and === operators work in this > situation is this: > > Logic dictates that if somet

RE: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Brad Fuller
iday, November 17, 2006 7:15 AM > To: Michael > Cc: php-general@lists.php.net > Subject: RE: [PHP] odd behavior of stripos() with === operator *LAST POST* > > On 17 November 2006 09:55, Michael wrote: > > > This will be my last post on this thread of discussion. > > &g

RE: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Ford, Mike
On 17 November 2006 09:55, Michael wrote: > This will be my last post on this thread of discussion. > > Thanks to all who replied, I have it figured out. > > I guess my only problem with the way the !== and === > operators work in this situation is this: > > Logic dictates that if something eva

Re: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Michael
This will be my last post on this thread of discussion. Thanks to all who replied, I have it figured out. I guess my only problem with the way the !== and === operators work in this situation is this: Logic dictates that if something evaluates to NOT FALSE it must be TRUE. Regardless of the typ

Re: [PHP] odd behavior of stripos() with === operator

2006-11-17 Thread Stut
Michael wrote: I understand that the integer 0 and FALSE are different and I read the manual so many times my head hurts, heh. There are a few ways to work around this, probably more than I know. (according to the documentation for strrpos() you could test the return from stripos() for is_bool

Re: [PHP] odd behavior of stripos() with === operator *UPDATE*

2006-11-17 Thread Stut
Please include the list in replies. Michael wrote: Why can't === realize that integer 0 means TRUE? whereas "" or a BOOLEAN false does not? === evaluates integer 0 to FALSE :( the !== operator recognizes the difference. "(integer) 0 !== FALSE" is TRUE yet "(integer) 0 === TRUE" is FALSE, bu

Re: [PHP] odd behavior of stripos() with === operator

2006-11-17 Thread Michael
At 02:33 AM 11/17/2006 , Stut wrote: >Michael wrote: >> I understand that the integer 0 and FALSE are different and I read the >> manual so many times my head hurts, heh. >> >> There are a few ways to work around this, probably more than I know. >> (according to the documentation for strrpos() yo

Re: [PHP] odd behavior of stripos() with === operator

2006-11-17 Thread Michael
At 02:10 AM 11/17/2006 , Stut wrote: >Michael wrote: >> Ok, picking gnits... >> I should have said NOT true and NOT false at the same time. >> As for the return of the integer 0.. >> The documentation indicates that the === and !== operators take this into >> account in fact there is a specific ex

Re: [PHP] odd behavior of stripos() with === operator *UPDATE*

2006-11-17 Thread Stut
Michael wrote: I'm not sure why the === operator does not handle this condition, since the wonderful people at PHP foresaw the problem and fixed !== to handle it, I would like to see the === fixed to handle this as well (if it is even possible, not sure about how this is implemented??) Th

Re: [PHP] odd behavior of stripos() with === operator

2006-11-17 Thread Stut
Michael wrote: Ok, picking gnits... I should have said NOT true and NOT false at the same time. As for the return of the integer 0.. The documentation indicates that the === and !== operators take this into account in fact there is a specific example in the manual. My point here is that if !==

Re: [PHP] odd behavior of stripos() with === operator *UPDATE*

2006-11-17 Thread Michael
At 12:24 AM 11/17/2006 , Michael wrote: >HEllo all, > >After pulling my hair out for several hours trying to figure out why my code >wasn't working I built this little test and ran it, the results are interesting >in the least, and to me, surprising. It is possible that I have done something >wrong

Re: [PHP] odd behavior of stripos() with === operator

2006-11-16 Thread Michael
At 12:29 AM 11/17/2006 , you wrote: >> I have underlined the output I am interested in... > >You did??? Where? > Ok, my bad, I sent the mail as plain text instead of styled :P oops >> How can the variable $found be both TRUE and FALSE at the same time? > >None of your output above indicates that

Re: [PHP] odd behavior of stripos() with === operator

2006-11-16 Thread Robert Cummings
On Fri, 2006-11-17 at 00:24 -0700, Michael wrote: > HEllo all, > > After pulling my hair out for several hours trying to figure out why my code > wasn't working I built this little test and ran it, the results are > interesting > in the least, and to me, surprising. It is possible that I have don

Re: [PHP] Odd PHP memory issue

2006-09-18 Thread Richard Lynch
On Sat, September 16, 2006 10:35 am, Matthew H. North wrote: >> So you are just visiting the nodes, and not doing anything with >> them? > > We're appending certain fields to put together a total result. Be very very very careful here... If you throw enough strings around, and append things enoug

Re: [PHP] Odd PHP memory issue

2006-09-16 Thread Matthew H. North
On 9/15/06, Richard Lynch <[EMAIL PROTECTED]> wrote: > On Fri, September 15, 2006 10:42 am, Matthew H. North wrote: > > We're developing a web application that involves traversal of a > > hierarchical database structure (MySQL, PEAR::DB, and > > PEAR::DB::DataObject). Currently that traversal is d

Re: [PHP] Odd PHP memory issue

2006-09-15 Thread Richard Lynch
On Fri, September 15, 2006 10:42 am, Matthew H. North wrote: > We're developing a web application that involves traversal of a > hierarchical database structure (MySQL, PEAR::DB, and > PEAR::DB::DataObject). Currently that traversal is done recursively, > and involves visiting thousands of nodes i

Re: [PHP] Odd PHP memory issue

2006-09-15 Thread Michael B Allen
On Fri, 15 Sep 2006 08:42:26 -0700 "Matthew H. North" <[EMAIL PROTECTED]> wrote: > 6) Resources (think database resources) are automatically freed by > garbage collection when there are no more references to them Resources can be "persistent". Try traversing a small tree and print memory usage af

RE: [PHP] odd behavior SOLVED - MORE & IMPORTANT

2006-01-20 Thread Jay Blanchard
[snip] >From the offices of "You Ain't Gonna' Beleeeve Dis, Inc." We barked up several trees, but there were no real squirrels. PHP 4.4.1, the version on the server in question, comes with 2 flavors of ini file, the dist and the recommended. I had copied the recommended and renamed it php.ini, wh

RE: [PHP] odd behavior SOLVED

2006-01-19 Thread Jay Blanchard
[snip] ...lots of valuable information [/snip] >From the offices of "You Ain't Gonna' Beleeeve Dis, Inc." We barked up several trees, but there were no real squirrels. PHP 4.4.1, the version on the server in question, comes with 2 flavors of ini file, the dist and the recommended. I had copi

RE: [PHP] odd behavior

2006-01-19 Thread Richard Lynch
On Thu, January 19, 2006 12:31 pm, Jay Blanchard wrote: > [snip] > If I recall, PHP on Windows will look for PHP.INI in your Windows > system > folder (in this case C:\WINNT) first, then in the folder where PHP is > installed. Deleting the PHP.INI under WINNT should be fine (sounds > like > removi

Re: [PHP] odd behavior

2006-01-19 Thread Richard Lynch
On Thu, January 19, 2006 11:53 am, Jay Blanchard wrote: > I had PHP installed on a web server, and all was working OK, save for > one > small thing. phpinfo() indicated that the path to the php.ini was > c:\WINNT, > which it was not. So I copy the file from the c:\php directory to the > c:\winnt di

RE: [PHP] odd behavior

2006-01-19 Thread Jay Blanchard
[snip] If I recall, PHP on Windows will look for PHP.INI in your Windows system folder (in this case C:\WINNT) first, then in the folder where PHP is installed. Deleting the PHP.INI under WINNT should be fine (sounds like removing that makes things work ok for you). I'd think phpinfo() would show

Re: [PHP] odd behavior

2006-01-19 Thread Rodolfo Andrade
I use PWS with Windows 98 for learning purposes. I just cut PHP.ini from C:\PHP and paste in %windir% then restart the server. Works fine for me and I can run ASP and PHP for learning. ^^ Regards, Rodolfo Andrade - Original Message - From: Jay Blanchard To: PHP General (E-mail) Sent: Th

Re: [PHP] odd behavior

2006-01-19 Thread tg-php
Ok.. now maybe a constructive answer :) If I recall, PHP on Windows will look for PHP.INI in your Windows system folder (in this case C:\WINNT) first, then in the folder where PHP is installed. Deleting the PHP.INI under WINNT should be fine (sounds like removing that makes things work ok for

Re: [PHP] odd behavior

2006-01-19 Thread John Nichel
Jay Blanchard wrote: and how do I fix http://distrowatch.com/ I have no idea, I don't do Windows. Sucks to be you. ;) -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] odd behavior

2006-01-19 Thread Austin Denyer
On Thu, 19 Jan 2006 11:53:04 -0600 Jay Blanchard <[EMAIL PROTECTED]> wrote: > > Has anyone experienced this behavior before, and how do I fix that > damned path to the ini? TIA! Personally, I'd fix it with a Debian install CD, but that's just me. #;-D Can't help with the Windoze issue - I don't

Re: [PHP] odd error

2005-03-14 Thread Stephen Johnson
It's Hebrew -- it means twice colon. On Mar 14, 2005, at 8:34 PM, Rob Agar wrote: hey all just got this error: Parse error: parse error, expecting `T_PAAMAYIM_NEKUDOTAYIM' The line that caused it was this: $db =& null; (yes I know it's wrong, it's a typo/brain spasm) I'm just curious - what langua

Re: [PHP] Odd Behaviour: DIE function

2004-11-25 Thread Jon-Eirik Pettersen
Andre Dubuc wrote: I've noticed some strange behaviour with respect to validation of user input. Normally, using Linux, the die function in user input validation works as expected. However, the same code in IE, the DIE function does not work as expected. I've noticed that fields, that should di

Re: [PHP] Odd behaviour of non-existent keys?

2004-08-26 Thread Geoff Caplan
Thanks for your help, everyone, especially Michael Sims. I've reported the bug: http://bugs.php.net/bug.php?id=29848 -- Geoff Caplan Vario Software Ltd (+44) 121-515 1154 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Odd behaviour of non-existent keys?

2004-08-26 Thread Michael Sims
Geoff Caplan wrote: > Michael Sims wrote: >> IMHO what you have described is a bug in PHP, and if I were you, >> I'd report it as such. If it's not a bug it at least has a very >> high WTF factor. > > Problem with reporting is that I am using Debian Test and the current > PHP version is too old to

Re: [PHP] Odd behaviour of non-existent keys?

2004-08-26 Thread Geoff Caplan
Hi folks, Michael Sims wrote: MS> IMHO what you have described is a bug in PHP, and if I were you, MS> I'd report it as such. If it's not a bug it at least has a very MS> high WTF factor. Problem with reporting is that I am using Debian Test and the current PHP version is too old to report. If

[PHP] Re [PHP] Odd behaviour of non-existent keys?

2004-08-25 Thread Geoff Caplan
Michael, MS> IMHO what you have described is a bug in PHP, and if I were you, I'd report it as MS> such. If it's not a bug it at least has a very high WTF factor. You are right - it does seem like a bug. But I assumed that something as basic as this would have been spotted by now. I don't suppos

Re: [PHP] Odd behaviour of non-existent keys?

2004-08-25 Thread John Holmes
From: "Geoff Caplan" <[EMAIL PROTECTED]> Getting a result I don't understand. Why does the non-existent key in the array below evaluate to the first char of the array value? $foo = '' ; $foo['one']['two'] = 'test-value' ; // Evaluates to: string(1) "t" var_dump( $foo['one']['two']['three'] ) ; // E

RE: [PHP] odd results with database string comparisons

2004-08-12 Thread Jay Blanchard
[snip] I have a database table with the column described as address_line_2 varchar(255) NOT NULL default '', if($row["address_line_2"]==' ') // there is a space between the quotes [/snip] address_line_2 varchar(255) NOT NULL default '', <--- no space between quotes so if('' == $row['address_

Re: [PHP] odd refresh error

2004-07-10 Thread Curt Zirzow
* Thus wrote Scott Taylor: > > Some people are complaining that when the visit one of my pages that the > pages refeshes over and over again. One person said that it was only > when he typed something in on one of the forms. How could an error like > this be caused? Could this be a bug in a

RE: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Michael Sims
Curt Zirzow wrote: > To simplify things: > > $a[2] = '1'; > $k = (double)2; > echo isset($a[$k]); > unset($a[$k]); > echo isset($a[$k]); > echo " -> expect 1\n"; > > > Result: > 11 -> expect 1 Yeah, my version was just a wee bit verbose. :) >> It's the behavior that is specific to u

Re: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Curt Zirzow
* Thus wrote Michael Sims: > Thomas Goyne wrote: > > On Thu, 17 Jun 2004 16:52:32 -0500, Michael Sims > > <[EMAIL PROTECTED]> wrote: > >> ceil() returns a variable of type double. In the above script I > >> expected $foo to become an empty array after calling unset(). But > > > However, > > arra

RE: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Michael Sims
Thomas Goyne wrote: > On Thu, 17 Jun 2004 16:52:32 -0500, Michael Sims > <[EMAIL PROTECTED]> wrote: >> ceil() returns a variable of type double. In the above script I >> expected $foo to become an empty array after calling unset(). But >> it seems that unset() will not remove an array element whe

Re: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Thomas Goyne
On Thu, 17 Jun 2004 16:52:32 -0500, Michael Sims <[EMAIL PROTECTED]> wrote: ceil() returns a variable of type double. In the above script I expected $foo to become an empty array after calling unset(). But it seems that unset() will not remove an array element when you refer to its key usi

Re: [PHP] odd acrobat reaction to streaming files

2004-03-10 Thread daniel
stuff i've added to my header class header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must- revalidate"); header("Cache-Control: post-check=0, p

Re: [PHP] odd, sporatic upload problem ...

2004-03-06 Thread Raditha Dissanayake
Hi, The most likely reason that one guy can't upload when everyone else can is because he is behind a proxy that limits the size of post data. Kenn Murrah wrote: Greetings. I have an odd (to me) problem ... from most computers, the upload code (shown, in part, below) works just fine bu

RE: [PHP] odd, sporatic upload problem ...

2004-03-05 Thread Sam Masiello
ints... --Sam -Original Message- From: Kenn Murrah [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 2:58 PM To: Sam Masiello Cc: php Subject: Re: [PHP] odd, sporatic upload problem ... No, it happens immediately upon click

Re: [PHP] odd, sporatic upload problem ...

2004-03-05 Thread Kenn Murrah
No, it happens immediately upon clicking the "submit" button on the previous page Sam Masiello wrote: How long is it before the "Page Not Found" error occurs? Is the browser possibly timing out? --Sam Kenn Murrah wrote: Greetings. I have an odd (to me) problem ... from most computers

RE: [PHP] odd, sporatic upload problem ...

2004-03-05 Thread Sam Masiello
How long is it before the "Page Not Found" error occurs? Is the browser possibly timing out? --Sam Kenn Murrah wrote: > Greetings. > > I have an odd (to me) problem ... from most computers, the upload > code (shown, in part, below) works just fine but from at least > one > computer, if

RE: [PHP] Odd Code Error.

2004-01-21 Thread Robert Cummings
On Thu, 2004-01-22 at 00:52, Martin Towell wrote: > > [EMAIL PROTECTED] wrote: > > >>Ok i found something very interesting > > >>, i have a session var setup to check for a groupID which is an > > >>integer, > > >> > > >>if ($_SESSION['groupID']==1) { this was working, then when > > i changed it >

RE: [PHP] Odd Code Error.

2004-01-21 Thread Martin Towell
> [EMAIL PROTECTED] wrote: > >>Ok i found something very interesting > >>, i have a session var setup to check for a groupID which is an > >>integer, > >> > >>if ($_SESSION['groupID']==1) { this was working, then when > i changed it > >>to > >> > >>if ($_SESSION['groupID']===1) { per recomendation

Re: [PHP] Odd Code Error.

2004-01-21 Thread John Nichel
[EMAIL PROTECTED] wrote: Ok i found something very interesting , i have a session var setup to check for a groupID which is an integer, if ($_SESSION['groupID']==1) { this was working, then when i changed it to if ($_SESSION['groupID']===1) { per recomendation, it does not now ! i was going through

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> Ok i found something very interesting > , i have a session var setup to check for a groupID which is an > integer, > > if ($_SESSION['groupID']==1) { this was working, then when i changed it > to > > if ($_SESSION['groupID']===1) { per recomendation, it does not now ! i > was going through my cod

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
Ok i found something very interesting , i have a session var setup to check for a groupID which is an integer, if ($_SESSION['groupID']==1) { this was working, then when i changed it to if ($_SESSION['groupID']===1) { per recomendation, it does not now ! i was going through my code and changing t

Re: [PHP] Odd Code Error.

2004-01-21 Thread Robert Cummings
On Wed, 2004-01-21 at 21:37, [EMAIL PROTECTED] wrote: > > On Wed, 2004-01-21 at 20:19, Chris W wrote: > >> Robert Cummings wrote: > > May i ask how you handle your error handling Robert ? I'm considering > moving my class error handling to pear but then it'll need a custom class > or function anyw

Re: [PHP] Odd Code Error.

2004-01-21 Thread John W. Holmes
Chris W wrote: $Key = "xyz"; lots more code here. if($key == "xyz"){ Notice: Undefined variable: key in \path\to\test.php on line X do this stuff; } lots more code here; If the language forces variable deceleration you simply get an error "variable $key not defined on line x" then there is n

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> On Wed, 2004-01-21 at 20:19, Chris W wrote: >> Robert Cummings wrote: May i ask how you handle your error handling Robert ? I'm considering moving my class error handling to pear but then it'll need a custom class or function anyway to handle the errors in different ways for different applicatio

Re: [PHP] Odd Code Error.

2004-01-21 Thread Robert Cummings
On Wed, 2004-01-21 at 20:19, Chris W wrote: > Robert Cummings wrote: > > >Hmmm, I don't think other programmer's sloppy coding practices are a > >good argument for having to declare variables or against loose typing. > >There are crappy coders in whatever language you use. The good coders > >will

Re: [PHP] Odd Code Error.

2004-01-21 Thread John Nichel
Chris W wrote: I challenge anyone to find a disadvantage in forcing decelerations of variables and functions, other than having to type more. Forcing declaration will create more list traffic... "I'm getting the error 'Variable $foo not declared on line 321', somebody fix my code..." And Jason

Re: [PHP] Odd Code Error.

2004-01-21 Thread Chris W
Robert Cummings wrote: Hmmm, I don't think other programmer's sloppy coding practices are a good argument for having to declare variables or against loose typing. There are crappy coders in whatever language you use. The good coders will do the right thing. If you are concerned about scripts on ho

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> > And $bar === true will only become true, if $bar is true, look at table > K-3 here http://www.php.net/manual/en/types.comparisons.php > Ok i tested it out function foo($bar = null) { if (isset($bar)) die("yes"); } foo("test"); will die where foo(); wont -- PHP General Mailing

Re: [PHP] Odd Code Error.

2004-01-21 Thread Martin Hjort Eriksen
[EMAIL PROTECTED] wrote: I dont understand, i assume that would check if name was set, i also set functions like function foo($name,$bar = null) { } so therefore bar doesnt need to be inputted, seeing as i set it to null would i check if $bar===true ? or just isset($bar ) ? when you have set

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> [EMAIL PROTECTED] wrote: > >> Hmm i was checking out a pear class, what about the variables within a >> function ? like function >> >> foo($name) { >> if ($name) { >> >> } >> } >> >> or >> >> foo($name) { >> if (isset($name)) { >> >> } >> } >> >> it uses isset on variables coming outside the

Re: [PHP] Odd Code Error.

2004-01-21 Thread Martin Hjort Eriksen
[EMAIL PROTECTED] wrote: Exactly how a variable should be set, well it could be for instance var $age:int; Where on the php site does it tell you to set it like that ? I've never seent that before ? It is also because you cannot do it... :) It was an idea on how it could be done, wi

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> Yes, if you want to examine if a variable is set or not, then you > should use isset(). Ok i'll start using it > Exactly how a variable should be set, well it could be for instance var > $age:int; > Where on the php site does it tell you to set it like that ? I've never seent that before ?

Re: [PHP] Odd Code Error.

2004-01-21 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hmm i was checking out a pear class, what about the variables within a function ? like function foo($name) { if ($name) { } } or foo($name) { if (isset($name)) { } } it uses isset on variables coming outside the function Those examples don't make much sense. Without

Re: [PHP] Odd Code Error.

2004-01-21 Thread Martin Hjort Eriksen
[EMAIL PROTECTED] wrote: So do you recommend using isset($name) instead of ($name) ? And what are you meaning by setting the var as in var $name ? i usually set them in classes but how about in normal scripts and functions ? Yes, if you want to examine if a variable is set or not, then you sh

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> > So do you recommend using isset($name) instead of ($name) ? And what > are you meaning by setting the var as in var $name ? i usually set them > in classes but how about in normal scripts and functions ? > Hmm i was checking out a pear class, what about the variables within a function ? like

Re: [PHP] Odd Code Error.

2004-01-21 Thread daniel
> I agree with Chris... > > In contrast you can also see a common problem in many of the > downloadable scripts from different collections on the net, like > hotscripts.com, where the programmers start building control structures > whitout having the different variables they use set. > > For insta

Re: [PHP] Odd Code Error.

2004-01-21 Thread Robert Cummings
Hmmm, I don't think other programmer's sloppy coding practices are a good argument for having to declare variables or against loose typing. There are crappy coders in whatever language you use. The good coders will do the right thing. If you are concerned about scripts on hotscripts.com where the c

Re: [PHP] Odd Code Error.

2004-01-21 Thread Martin Hjort Eriksen
I agree with Chris... In contrast you can also see a common problem in many of the downloadable scripts from different collections on the net, like hotscripts.com, where the programmers start building control structures whitout having the different variables they use set. For instance if($name

Re: [PHP] Odd Code Error.

2004-01-21 Thread Chris W
Luke wrote: yeah its strange, $test is equal to $test2, $test is equal to $test3 but $test2 is not equal to $test3, $test = "string"; $test2 = true; $test3 = 0; if($test == $test2){ echo "hi"; } somone tell me im wrong please? else thats seriously weird I'm sure many will disagree with me on t

Re: [PHP] Odd Code Error.

2004-01-21 Thread Robert Cummings
On Wed, 2004-01-21 at 15:38, Jonathan Pitcher wrote: > Thanks. It makes sense now. > > Now I have one more question. Not to confuse the issue more. :) > > $EA = 0 > > if ($EA == "NFH") // would work because the string is converted to an > integer and then compared correct ? > > And by using

Re: [PHP] Odd Code Error.

2004-01-21 Thread Jonathan Pitcher
Thanks. It makes sense now. Now I have one more question. Not to confuse the issue more. :) $EA = 0 if ($EA == "NFH") // would work because the string is converted to an integer and then compared correct ? And by using === I tell it to compare type and value ? If that is true would 0 == "0

RE: [PHP] Odd Code Error.

2004-01-21 Thread Ford, Mike [LSS]
On 21 January 2004 04:01, Luke contributed these pearls of wisdom: > ok, i read the section, but even so > > if $a == $b > and $a == $c > then $b should be equal to $c No, not necessarily! > but php is saying otherwise? Yes. > this sounds confusing i want to try n get my head round it > > a

  1   2   >