php-general Digest 8 Jul 2010 14:43:39 -0000 Issue 6836

2010-07-08 Thread php-general-digest-help
php-general Digest 8 Jul 2010 14:43:39 - Issue 6836 Topics (messages 306745 through 306761): Re: Multiple Access Question 306745 by: Bastien Koert 306746 by: Paul M Foster 306747 by: Robert Cummings 306748 by: Paul M Foster 306749 by: Robert Cummings

RE: [PHP] Multiple Access Question

2010-07-08 Thread Tommy Pham
-Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Wednesday, July 07, 2010 10:28 PM To: Paul M Foster Cc: php-general@lists.php.net Subject: Re: [PHP] Multiple Access Question Paul M Foster wrote: On Wed, Jul 07, 2010 at 11:28:56PM -0400, Robert

Re: [PHP] php -l - does it find *anything*?

2010-07-08 Thread Gary .
On 7/6/10, Per Jessen wrote: It really is _only_ the syntax. Same goes for e.g. the C lint - Sorry, but that's not what I remember from my C days, nor what wikipedia says lint was the name originally given to a particular program that flagged some suspicious and non-portable constructs (likely

[PHP] Simple XML - problem with errors

2010-07-08 Thread Gary .
Why am I still getting an exception when I do this: libxml_use_internal_errors(true); $this-xml = new SimpleXMLElement($this-htmlString); or this $this-xml = new SimpleXMLElement($this-htmlString, LIBXML_NOERROR|LIBXML_NOWARNING); ? The exception says Exception: String could not be parsed as

[PHP] Setting up a XDebug debugging environment for PHP / WAMP / Eclipse PDT

2010-07-08 Thread David Négrier
Hi list, After struggling a bit to set-up a debug environment in PHP, I decided to write a complete tutorial to explain how to set-up XDebug in a WAMP / Eclipse PDT environment. Everything was already available on the web but was squattered on several different sites. I've tried to write a

Re: [PHP] Multiple Access Question

2010-07-08 Thread Richard Quadling
On 7 July 2010 17:59, tedd t...@sperling.com wrote: Hi gang: I have *my way* of handling this problem, but I would like to hear how you guys do it. Here's the problem -- let's say you have a database containing names and addresses and you want approved users to be able to access the data.

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Richard Quadling
On 8 July 2010 08:07, Gary . php-gene...@garydjones.name wrote: Why am I still getting an exception when I do this: libxml_use_internal_errors(true); $this-xml = new SimpleXMLElement($this-htmlString); or this $this-xml = new SimpleXMLElement($this-htmlString,

Re: [PHP] interface name file

2010-07-08 Thread shiplu
I use naming convention for interface. If an object can be cached, I create an interface I+Cache+able = ICachable. So a sample class would be named as ASampleClass.php And the Interface would be ICachable.php This is a well known interface naming convention. Shiplu Mokadd.im My talks,

Re: [PHP] Multiple Access Question

2010-07-08 Thread tedd
At 11:48 AM +0100 7/8/10, Richard Quadling wrote: On 7 July 2010 17:59, tedd t...@sperling.com wrote: Hi gang: I have *my way* of handling this problem, but I would like to hear how you guys do it. -snip- I hope this is of some sense to you. It certainly is an interesting topic.

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Gary .
Richard Quadling writes: On 8 July 2010 08:07, Gary wrote: Why am I still getting an exception when I do this: libxml_use_internal_errors(true); $this-xml = new SimpleXMLElement($this-htmlString); or this $this-xml = new SimpleXMLElement($this-htmlString, LIBXML_NOERROR|LIBXML_NOWARNING);

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Marc Guay
libxml_use_internal_errors(true); $this-xml = new SimpleXMLElement($this-htmlString); Hi Gary, I have code that looks like this: libxml_use_internal_errors(true); $xml = simplexml_load_string($val); $errors = libxml_get_errors(); if ($errors) do this else do that which works

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Gary .
Marc Guay writes: libxml_use_internal_errors(true); $this-xml = new SimpleXMLElement($this-htmlString); I have code that looks like this: libxml_use_internal_errors(true); $xml = simplexml_load_string($val); Yeah. I tried simplexml_load_string and found that worked (in that it didn't cause

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Marc Guay
I wonder what the difference is between doing new SimpleXMLElement and calling simplexml_load_string which results in the libxml_use_internal_errors call being ineffective. Odd. The documentation for Dealing with XML errors only mentions simplexml_load_string() and this comment

[PHP] Re: Simple XML - problem with errors

2010-07-08 Thread Gary .
Okay. At least one of the problems with this so called HTML seems to be that the body tag looks like BODY vlink=#ff ... and xml_parse complains that required on that line (i.e. it is claiming it can't find the end of the tag!). I'm guessing that those attributes must be quoted in XML and

Re: [PHP] Re: Simple XML - problem with errors

2010-07-08 Thread Richard Quadling
On 8 July 2010 16:15, Gary . php-gene...@garydjones.name wrote: Okay. At least one of the problems with this so called HTML seems to be that the body tag looks like BODY vlink=#ff ... and xml_parse complains that required on that line (i.e. it is claiming it can't find the end of the

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Marc Guay
And yes, I'd rather use DOM, but I can't. Could you use this: http://simplehtmldom.sourceforge.net/? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Simple XML - problem with errors

2010-07-08 Thread Nisse Engström
On Thu, 8 Jul 2010 17:15:02 +0200, Gary . wrote: Okay. At least one of the problems with this so called HTML seems to be that the body tag looks like BODY vlink=#ff ... and xml_parse complains that required on that line (i.e. it is claiming it can't find the end of the tag!). I'm

[PHP] Login using just cookies, bad idea?

2010-07-08 Thread Michael Calkins
I right now have a complete user login and registration system however it uses cookies when you login to store information. Is this a bad thing?$_COOKIE vs $_SESSION for login systems From,Michael calkinsmichaelcalk...@live.com425-239-9952

Re: [PHP] Setting up a XDebug debugging environment for PHP / WAMP / Eclipse PDT

2010-07-08 Thread Adam Richardson
On Thu, Jul 8, 2010 at 6:40 AM, David Négrier d.negr...@thecodingmachine.com wrote: Hi list, After struggling a bit to set-up a debug environment in PHP, I decided to write a complete tutorial to explain how to set-up XDebug in a WAMP / Eclipse PDT environment. Everything was already

[PHP] MSSQL failing.

2010-07-08 Thread Paul Halliday
Is there something that needs to be tweaked or added to get this to work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see the connections fail in the servers event logs if I take away \domain from \domain\username (mixed auth is turned off) so the communication is somewhat working.

Re: [PHP] Login using just cookies, bad idea?

2010-07-08 Thread Ashley Sheridan
On Thu, 2010-07-08 at 09:53 -0700, Michael Calkins wrote: I right now have a complete user login and registration system however it uses cookies when you login to store information. Is this a bad thing?$_COOKIE vs $_SESSION for login systems From,Michael

Re: [PHP] Date Test...

2010-07-08 Thread Ashley Sheridan
On Wed, 2010-07-07 at 13:28 -0700, Don Wieland wrote: Hello all, I am processing an array to build an INSERT string in PHP. The code below I build an a separate array for the TARGET fields and the VALUES. I am trying to trap for a NULL ENTRY in a Date Input Field. Date fields are

Re: [PHP] Date Test...

2010-07-08 Thread Don Wieland
On Jul 8, 2010, at 10:09 AM, Ashley Sheridan wrote: thanks Ash, I figure it out. I was not entering the full year. date('y-m-d',strtotime($fval)) needed to be date('o-m-d',strtotime($fval)) Duh ;-) Thanks, Don On Wed, 2010-07-07 at 13:28 -0700, Don Wieland wrote: Hello all, I am

RE: [PHP] MSSQL failing.

2010-07-08 Thread Tommy Pham
-Original Message- From: Paul Halliday [mailto:paul.halli...@gmail.com] Sent: Thursday, July 08, 2010 10:01 AM To: php-general@lists.php.net Subject: [PHP] MSSQL failing. Is there something that needs to be tweaked or added to get this to work? I am trying to connect to server

Re: [PHP] Re: Simple XML - problem with errors

2010-07-08 Thread Gary .
On 7/8/10, Richard Quadling wrote: On 8 July 2010 16:15, Gary wrote: Okay. At least one of the problems with this so called HTML seems to be that the body tag looks like BODY vlink=#ff ... and xml_parse complains that required on that line (i.e. it is claiming it can't find the end of

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Gary .
On 7/8/10, Marc Guay wrote: And yes, I'd rather use DOM, but I can't. Could you use this: http://simplehtmldom.sourceforge.net/? Interesting. Although I can't use DOM or Tidy (because they're normally built in, but TPTB decided to recompile PHP and exclude them, and I am not allowed to

Re: [PHP] Re: Simple XML - problem with errors

2010-07-08 Thread Gary .
On 7/8/10, Nisse Engström wrote: On Thu, 8 Jul 2010 17:15:02 +0200, Gary . wrote: I'm guessing that those attributes must be quoted in XML and should be in HTML (but patently aren't)? For that attribute value, it's a must in both cases. Okay. Please tell L**! :) -- PHP General Mailing

Re: [PHP] MSSQL failing.

2010-07-08 Thread Andrew Ballard
On Thu, Jul 8, 2010 at 1:01 PM, Paul Halliday paul.halli...@gmail.com wrote: Is there something that needs to be tweaked or added to get this to work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see the connections fail in the servers event logs if I take away \domain from

Re: [PHP] Login using just cookies, bad idea?

2010-07-08 Thread Adam Richardson
On Thu, Jul 8, 2010 at 1:00 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Thu, 2010-07-08 at 09:53 -0700, Michael Calkins wrote: I right now have a complete user login and registration system however it uses cookies when you login to store information. Is this a bad

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Richard Quadling
On 8 July 2010 18:55, Gary . php-gene...@garydjones.name wrote: On 7/8/10, Marc Guay wrote: And yes, I'd rather use DOM, but I can't. Could you use this: http://simplehtmldom.sourceforge.net/? Interesting. Although I can't use DOM or Tidy (because they're normally built in, but TPTB

[PHP] validating form input

2010-07-08 Thread David Mehler
Hello, Got a form that takes in data to enter in to a database. I want to make it as secure and as invulnerable to sql injection and other attacks as possible. I'm wondering if mysqli_real_escape_string or stripslashes should be used or if the former does the latter. For example, I have a name

Re: [PHP] validating form input

2010-07-08 Thread Michael Shadle
On Jul 8, 2010, at 12:38 PM, David Mehler dave.meh...@gmail.com wrote: Hello, Got a form that takes in data to enter in to a database. I want to make it as secure and as invulnerable to sql injection and other attacks as possible. I'm wondering if mysqli_real_escape_string or stripslashes