php-general Digest 2 Feb 2009 15:22:12 -0000 Issue 5936

2009-02-02 Thread php-general-digest-help
php-general Digest 2 Feb 2009 15:22:12 - Issue 5936 Topics (messages 287518 through 287538): Re: [PHP-QA] problem code 287518 by: David Swenson PHP Linux/Windows Outlook 2003 HTML email problem 287519 by: German Geek 287520 by: Chris Re: PHP Enclosing Tags? Do You

Re: [PHP] Re: Switch statement Question

2009-02-02 Thread Frank Stanovcak
tedd tedd.sperl...@gmail.com wrote in message news:p06240801c5aa0ed7d...@[192.168.1.101]... At 4:16 PM +0100 1/30/09, Jochem Maas wrote: tedd schreef: At 4:43 PM -0500 1/29/09, Frank Stanovcak wrote: yes...that is legal. as long as the statment resolves to a boolean it will work.

Re: [PHP] Weird url passing what does it mean, am I hacked?

2009-02-02 Thread clive
If your using firefox, are you sure its not some addon, does this URL appear in the HTML source? Clive Terion Miller wrote: I noticed yesterday that sometimes I was seeing a strange url passing at the bottom of the browser when clicking around my site I'm working on while watching the page

RE: [PHP] Boolean Assignment Operator

2009-02-02 Thread Steven Buehler
-Original Message- From: farn...@googlemail.com [mailto:farn...@googlemail.com] On Behalf Of Edmund Hertle Sent: Monday, February 02, 2009 7:03 AM To: Gavin Hodge Cc: php-general@lists.php.net Subject: Re: [PHP] Boolean Assignment Operator 2009/2/2 Gavin Hodge

Re: [PHP] Re: More questions about SESSION use

2009-02-02 Thread Terion Miller
Show the code where your session vars are written and I would prefer using isset() instead of empty() if you want to check if this var is set or not. -eddy Hi All, here is the index page where users login and the sessions are set: ?php //start session session_start(); //db connection include

Re: [PHP] Blank page of hell..what to look for

2009-02-02 Thread Jason Pruim
On Feb 2, 2009, at 12:02 PM, Terion Miller wrote: Is there a certain thing that should be suspected and looked at first when getting the php blank page of hell I have errors on and nothing is being output anywhere to lead me in the right direction, I have a VariableReveal script (one

Re: [PHP] Blank page of hell..what to look for

2009-02-02 Thread Richard Heyes
I have errors on Including E_NOTICE ? -- Richard Heyes HTML5 Graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated January 31st) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Blank page of hell..what to look for

2009-02-02 Thread Terion Miller
I just use error_reporting(E_ALL); that would include the E_NOTICE right? On Mon, Feb 2, 2009 at 11:27 AM, Richard Heyes rich...@php.net wrote: I have errors on Including E_NOTICE ? -- Richard Heyes HTML5 Graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated

Re: [PHP] Blank page of hell..what to look for

2009-02-02 Thread Jim Lucas
Terion Miller wrote: Is there a certain thing that should be suspected and looked at first when getting the php blank page of hell I have errors on and nothing is being output anywhere to lead me in the right direction, I have a VariableReveal script (one of you provide and THANK YOU IT

[PHP] IP to location / XML

2009-02-02 Thread Jônatas Zechim
Hi there, I want do discover the location from a IP, I use this url ' http://www.onflex.org/geo/xml/ ', that's does a XML file, it's ok on my browser, but when i try to read this file with php: $myxml = simplexml_load_file ('http://www.onflex.org/geo/xml/'); That's gives a error: Warning:

[PHP] RES: IP to location / XML

2009-02-02 Thread Jônatas Zechim
Hi Nathan, i'll try max minds geo ip, that's what i want. -Mensagem original- De: Nathan Rixham [mailto:nat...@gmail.com] Enviada em: segunda-feira, 2 de fevereiro de 2009 16:13 Para: php-general@lists.php.net; Jônatas Zechim Cc: 'PHP General' Assunto: Re: IP to location / XML Jônatas

[PHP] Re: Blank page of hell..what to look for

2009-02-02 Thread Frank Stanovcak
Terion Miller webdev.ter...@gmail.com wrote in message news:37405f850902020902j624356ccp4ea869bc45161...@mail.gmail.com... Is there a certain thing that should be suspected and looked at first when getting the php blank page of hell I have errors on and nothing is being output anywhere to

[PHP] Re: Blank page of hell..what to look for

2009-02-02 Thread Lupus Michaelis
Terion Miller a écrit : Is there a certain thing that should be suspected and looked at first when getting the php blank page of hell Did you check error logs from Apache or the one you configured in php.ini ? -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org Seeking for a

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Nitsan Bin-Nun
It actually will return FATAL ERROR or something like that since you didn't echo'ed variables or string ;) On Mon, Feb 2, 2009 at 3:03 PM, Edmund Hertle edmund.her...@student.kit.edu wrote: 2009/2/2 Gavin Hodge gavin.ho...@gmail.com Hi, I'm fairly new to PHP, having migrated from the

[PHP] pear:Auth invalid username/password

2009-02-02 Thread John Corry
I'm using Pear Auth on several sites and am looking for suggestions on the best way to implement error reporting on a failed log-in. Currently I'm using a function that checks if the posted username is in the users table...and if the password is a match. Auth logs the user on if so...but if not

Re: [PHP] pear:Auth invalid username/password

2009-02-02 Thread Chris
John Corry wrote: I'm using Pear Auth on several sites and am looking for suggestions on the best way to implement error reporting on a failed log-in. Currently I'm using a function that checks if the posted username is in the users table...and if the password is a match. Auth logs the user on

Re: [PHP] Re: More questions about SESSION use

2009-02-02 Thread Chris
Edmund Hertle wrote: 2009/2/1 Terion Miller webdev.ter...@gmail.com This is how it was originally written: if (empty($_SESSION['AdminLogin']) || $_SESSION['AdminLogin'] != true){ header (Location: LogOut.php); $_SESSION['user']=$UserName; $_SESSION['AdminID']=$AdminID; --*I

Re: [PHP] Includes only if required?

2009-02-02 Thread Eric Butera
On Mon, Feb 2, 2009 at 6:42 AM, Edmund Hertle farn...@googlemail.com wrote: Hey, normally I prefer to do all my includes (classes + config files) at the beginning if my php files. But recently I thought about including some classes only if they are needed later in my code (like pear Mail and

[PHP] Includes only if required?

2009-02-02 Thread Edmund Hertle
Hey, normally I prefer to do all my includes (classes + config files) at the beginning if my php files. But recently I thought about including some classes only if they are needed later in my code (like pear Mail and Mail_mime only if an e-mail is about to be sent) because of speed issues. So my

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Eric Butera
On Mon, Feb 2, 2009 at 7:49 AM, Gavin Hodge gavin.ho...@gmail.com wrote: Hi, I'm fairly new to PHP, having migrated from the Java / C# world. I wrote some code similar to the following: $success = true; $success = operation1(); $success = operation2(); if ($success === true) {

Re: [PHP] Includes only if required?

2009-02-02 Thread Richard Heyes
Hi, Mail_mime Ooh... only if an e-mail is about to be sent) because of speed issues. So my question: Is this something I should consider? Or is it something I normally will not notice? Depends on the load on your server. If you're getting a billion requests per second, then it may well be

Re: [PHP] Re: More questions about SESSION use

2009-02-02 Thread Edmund Hertle
2009/2/1 Terion Miller webdev.ter...@gmail.com This is how it was originally written: if (empty($_SESSION['AdminLogin']) || $_SESSION['AdminLogin'] != true){ header (Location: LogOut.php); $_SESSION['user']=$UserName; $_SESSION['AdminID']=$AdminID; --*I added this

Re: [PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?

2009-02-02 Thread Larry Garfield
On Mon, 2 Feb 2009 08:23:49 +0100, Yannick Mortier mvmort...@googlemail.com wrote: 2009/2/2 Alpár Török torokal...@gmail.com: 2009/2/1 Yannick Mortier mvmort...@googlemail.com I once read that this is even recommended by the PHP developers... Has anyone got a quote for me about this? I

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Gavin Hodge
Wow, thanks for the quick replies! I hadn't realised that was purely a bitwise operator. In the strongly-typed Java world, works as a non-lazy (exhaustive?) boolean operator so it has to return a boolean for boolean inputs. Thats the difference here, and Robert got it in one. Gavin. PS. A

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Edmund Hertle
2009/2/2 Robert Cummings rob...@interjinn.com On Tue, 2009-02-03 at 00:07 +1100, Gavin Hodge wrote: In Java / C# / C, $bool = $anotherBool; is shorthand for $bool = $bool $anotherBool; So = forces a reference assignment? No, = forces reference assignment. = works as you have

[PHP] Blank page of hell..what to look for

2009-02-02 Thread Terion Miller
Is there a certain thing that should be suspected and looked at first when getting the php blank page of hell I have errors on and nothing is being output anywhere to lead me in the right direction, I have a VariableReveal script (one of you provide and THANK YOU IT HAS BEEN A LIFESAVER) But

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Robert Cummings
On Mon, 2009-02-02 at 23:49 +1100, Gavin Hodge wrote: Hi, I'm fairly new to PHP, having migrated from the Java / C# world. I wrote some code similar to the following: $success = true; $success = operation1(); $success = operation2(); if ($success === true) { operation3(); //

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Edmund Hertle
2009/2/2 Gavin Hodge gavin.ho...@gmail.com Hi, I'm fairly new to PHP, having migrated from the Java / C# world. I wrote some code similar to the following: $success = true; $success = operation1(); $success = operation2(); if ($success === true) { operation3(); // depends on 1 and

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Robert Cummings
On Tue, 2009-02-03 at 00:07 +1100, Gavin Hodge wrote: In Java / C# / C, $bool = $anotherBool; is shorthand for $bool = $bool $anotherBool; So = forces a reference assignment? No, = forces reference assignment. = works as you have written. Cheers, Rob. -- http://www.interjinn.com

Re: [PHP] Re: Payment question in Canada

2009-02-02 Thread Edmund Hertle
2009/2/1 Michelle Konzack linux4miche...@tamay-dogan.net Am 2009-01-30 22:47:10, schrieb Edmund Hertle: Read this discussion. I think this will help you: http://marc.info/?t=12329898971r=1w=2 Address Not Found www.marc.info could not be found. Please check the name and try again.

[PHP] Boolean Assignment Operator

2009-02-02 Thread Gavin Hodge
Hi, I'm fairly new to PHP, having migrated from the Java / C# world. I wrote some code similar to the following: $success = true; $success = operation1(); $success = operation2(); if ($success === true) { operation3(); // depends on 1 and 2 being successful } This didn't work as expected.

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Gavin Hodge
In Java / C# / C, $bool = $anotherBool; is shorthand for $bool = $bool $anotherBool; So = forces a reference assignment? On Tue, Feb 3, 2009 at 12:03 AM, Edmund Hertle edmund.her...@student.kit.edu wrote: 2009/2/2 Gavin Hodge gavin.ho...@gmail.com Hi, I'm fairly new to PHP, having migrated

[PHP] Another matching question

2009-02-02 Thread Ron Piggott
How do I tell if words_from_the_well is not the value of $page (whether it is the entire value of $page OR within the value of $page) So far I have come up with the following, but it doesn't deal with when $page is only within the value of $page if ( $page words_from_the_well ) { Ron

Re: [PHP] Another matching question

2009-02-02 Thread Ashley Sheridan
On Mon, 2009-02-02 at 20:35 -0500, Ron Piggott wrote: How do I tell if words_from_the_well is not the value of $page (whether it is the entire value of $page OR within the value of $page) So far I have come up with the following, but it doesn't deal with when $page is only within

[PHP] How can I do the opposite of property_exists(), maybe a creat_property() in PHP5?

2009-02-02 Thread Daevid Vincent
Is there a way to create a new property via PHP 5.2.4? I get a hash back from an authentication server. I'm not guaranteed that someone in another department won't add new key/values to the returned hash/array. I'm trying to work around that part gracefully so that the code doesn't blow up on a

Re: [PHP] PHP Linux/Windows Outlook 2003 HTML email problem

2009-02-02 Thread German Geek
It seems like this solves the issue: http://pear.php.net/bugs/bug.php?id=12032 Sorry, just hadn't found this before. Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Feb 2, 2009 at 7:24 PM, Chris dmag...@gmail.com wrote: German Geek wrote: Hi All, We've got a problem with our Ubuntu

[PHP] Visibility of class constant

2009-02-02 Thread leledumbo
I got a weird behaviour of class constant. Suppose I have Index_Controller and Another_Controller classes, both extending Controller class. I define some constants (let's assume I only have one, call it MY_CONST) in Controller class to be used by its descendants. In Index_Controller, I can freely

[PHP] Throwing an exception seems to defeat output buffering

2009-02-02 Thread Leif Wickland
I would expect that if I turn on output buffering, echo something, throw an exception, and catch the exception, nothing will have been actually output. That doesn't seem to be the case. Throwing an exception seems to defeat output buffering. In the following code, I would not expect to see the

Re: [PHP] How can I do the opposite of property_exists(), maybe a creat_property() in PHP5?

2009-02-02 Thread Edmund Hertle
2009/2/3 Daevid Vincent dae...@daevid.com Is there a way to create a new property via PHP 5.2.4? I get a hash back from an authentication server. I'm not guaranteed that someone in another department won't add new key/values to the returned hash/array. I'm trying to work around that part