php-general Digest 7 May 2010 13:25:04 -0000 Issue 6731
Topics (messages 304969 through 304980):
Re: âäº-è¿-è´¯âè¡|æ-æ¿|å±-æ³
304969 by: Robert Cummings
Re: Can't find my error
304970 by: Jason Pruim
304971 by: David McGlone
304972 by: Robert Cummings
304975 by: Jim Lucas
304977 by: Paul M Foster
304978 by: David McGlone
304979 by: David McGlone
304980 by: Paul M Foster
Re: simplexml choking on apparently valid XML
304973 by: Dan Joseph
Connection error expected but ...
304974 by: Al Mangkok
304976 by: Nathan Rixham
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Ashley Sheridan wrote:
[/snip]
If only I could speak Chinese and was gullible I'd love to take them up
on the offer for whatever it is.
Thanks,
Ash
http://www.ashleysheridan.co.uk
My Chinese is a bit rusty, but I think it says, please reply on-list to
this spam message!
:|
Cheers,
Rob.
:)
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
On May 5, 2010, at 9:02 PM, David McGlone wrote:
On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote:
On Wed, May 5, 2010 at 1:06 PM, David McGlone <da...@dmcentral.net>
wrote:
On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote:
On Wed, May 5, 2010 at 12:55 PM, David McGlone
<da...@dmcentral.net>
wrote:
26. if(isset($_GET['ProductID']))
27. $this->mSelectedProduct = (init)
$_GET['ProductID'];
You've got (init) instead of (int). Its always those little
characters
causing trouble!
Tell me about it. I kept telling myself for the last 4 hours "I
can find
it, I
can find it I don't need to ask the list" Huh! I was wrong!
LOL sometimes a second set of eyes is required. We've all been in
your
shoes!
True. I need to learn to ask for help, but I don't want to fall into
the habit
of taking it for granted. I'm still learning so I need to try my
hardest
before I go getting an answer.
Hey David,
As a budding PHP developer (Been doing it off and on for the past 4
years now.. Mostly off though...) I got some great advice early on
from tedd sperling... When I have a problem that I can't fix... I sit
down and write the e-mail to the list... Thinking through all the info
that might be helpful to help debug it... What I've tried, what I"m
expecting... Things of that nature...
Usually by the time I'm done writing the e-mail I'e figured out the
problem... Not always but once I get done with writing it, if I still
can't figure it out I don't feel so bad hitting send and lighting up
everyones inboxes with my mindless drivel :P
--- End Message ---
--- Begin Message ---
On Thursday 06 May 2010 20:49:47 Jason Pruim wrote:
> On May 5, 2010, at 9:02 PM, David McGlone wrote:
> > On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote:
> >> On Wed, May 5, 2010 at 1:06 PM, David McGlone <da...@dmcentral.net>
> >>
> >> wrote:
> >>> On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote:
> >>>> On Wed, May 5, 2010 at 12:55 PM, David McGlone
> >>>> <da...@dmcentral.net>
> >>>
> >>> wrote:
> >>>>> 26. if(isset($_GET['ProductID']))
> >>>>> 27. $this->mSelectedProduct = (init)
> >>>>> $_GET['ProductID'];
> >>>>
> >>>> You've got (init) instead of (int). Its always those little
> >>>> characters
> >>>> causing trouble!
> >>>
> >>> Tell me about it. I kept telling myself for the last 4 hours "I
> >>> can find
> >>> it, I
> >>> can find it I don't need to ask the list" Huh! I was wrong!
> >>
> >> LOL sometimes a second set of eyes is required. We've all been in
> >> your
> >> shoes!
> >
> > True. I need to learn to ask for help, but I don't want to fall into
> > the habit
> > of taking it for granted. I'm still learning so I need to try my
> > hardest
> > before I go getting an answer.
>
> Hey David,
>
> As a budding PHP developer (Been doing it off and on for the past 4
> years now.. Mostly off though...) I got some great advice early on
> from tedd sperling... When I have a problem that I can't fix... I sit
> down and write the e-mail to the list... Thinking through all the info
> that might be helpful to help debug it... What I've tried, what I"m
> expecting... Things of that nature...
>
> Usually by the time I'm done writing the e-mail I'e figured out the
> problem... Not always but once I get done with writing it, if I still
> can't figure it out I don't feel so bad hitting send and lighting up
> everyones inboxes with my mindless drivel :P
>
That makes sense. If I carefully think about what Tedd said, I see it this
way: when writing the E-Mail it will take us mentally through the steps as we
are typing them and it will probably get us to realize where it went wrong.
I got sortof a joke I thought about a little while ago, it goes something like
this:
"This list works like a team, and there is no "i" in team."
I'm pretty sure the ones who helped me figure this one out will find the humor
in that one. :-)
--
Blessings,
David M.
--- End Message ---
--- Begin Message ---
David McGlone wrote:
On Thursday 06 May 2010 20:49:47 Jason Pruim wrote:
On May 5, 2010, at 9:02 PM, David McGlone wrote:
On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote:
On Wed, May 5, 2010 at 1:06 PM, David McGlone <da...@dmcentral.net>
wrote:
On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote:
On Wed, May 5, 2010 at 12:55 PM, David McGlone
<da...@dmcentral.net>
wrote:
26. if(isset($_GET['ProductID']))
27. $this->mSelectedProduct = (init)
$_GET['ProductID'];
You've got (init) instead of (int). Its always those little
characters
causing trouble!
Tell me about it. I kept telling myself for the last 4 hours "I
can find
it, I
can find it I don't need to ask the list" Huh! I was wrong!
LOL sometimes a second set of eyes is required. We've all been in
your
shoes!
True. I need to learn to ask for help, but I don't want to fall into
the habit
of taking it for granted. I'm still learning so I need to try my
hardest
before I go getting an answer.
Hey David,
As a budding PHP developer (Been doing it off and on for the past 4
years now.. Mostly off though...) I got some great advice early on
from tedd sperling... When I have a problem that I can't fix... I sit
down and write the e-mail to the list... Thinking through all the info
that might be helpful to help debug it... What I've tried, what I"m
expecting... Things of that nature...
Usually by the time I'm done writing the e-mail I'e figured out the
problem... Not always but once I get done with writing it, if I still
can't figure it out I don't feel so bad hitting send and lighting up
everyones inboxes with my mindless drivel :P
That makes sense. If I carefully think about what Tedd said, I see it this
way: when writing the E-Mail it will take us mentally through the steps as we
are typing them and it will probably get us to realize where it went wrong.
I got sortof a joke I thought about a little while ago, it goes something like
this:
"This list works like a team, and there is no "i" in team."
I'm pretty sure the ones who helped me figure this one out will find the humor
in that one. :-)
Maybe no 'i' but there's "me", "met", "meat", "eat", "at", and "am" :)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
David McGlone wrote:
On Thursday 06 May 2010 20:49:47 Jason Pruim wrote:
On May 5, 2010, at 9:02 PM, David McGlone wrote:
On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote:
On Wed, May 5, 2010 at 1:06 PM, David McGlone <da...@dmcentral.net>
wrote:
On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote:
On Wed, May 5, 2010 at 12:55 PM, David McGlone
<da...@dmcentral.net>
wrote:
26. if(isset($_GET['ProductID']))
27. $this->mSelectedProduct = (init)
$_GET['ProductID'];
You've got (init) instead of (int). Its always those little
characters
causing trouble!
Tell me about it. I kept telling myself for the last 4 hours "I
can find
it, I
can find it I don't need to ask the list" Huh! I was wrong!
LOL sometimes a second set of eyes is required. We've all been in
your
shoes!
True. I need to learn to ask for help, but I don't want to fall into
the habit
of taking it for granted. I'm still learning so I need to try my
hardest
before I go getting an answer.
Hey David,
As a budding PHP developer (Been doing it off and on for the past 4
years now.. Mostly off though...) I got some great advice early on
from tedd sperling... When I have a problem that I can't fix... I sit
down and write the e-mail to the list... Thinking through all the info
that might be helpful to help debug it... What I've tried, what I"m
expecting... Things of that nature...
Usually by the time I'm done writing the e-mail I'e figured out the
problem... Not always but once I get done with writing it, if I still
can't figure it out I don't feel so bad hitting send and lighting up
everyones inboxes with my mindless drivel :P
That makes sense. If I carefully think about what Tedd said, I see it
this way: when writing the E-Mail it will take us mentally through the
steps as we are typing them and it will probably get us to realize
where it went wrong.
I got sortof a joke I thought about a little while ago, it goes
something like this:
"This list works like a team, and there is no "i" in team."
I'm pretty sure the ones who helped me figure this one out will find
the humor in that one. :-)
Maybe no 'i' but there's "me", "met", "meat", "eat", "at", and "am" :)
Cheers,
Rob.
+ mate ate tea
--
Jim Lucas
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--- End Message ---
--- Begin Message ---
On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote:
<snip>
>
> I got sortof a joke I thought about a little while ago, it goes something
> like
> this:
>
> "This list works like a team, and there is no "i" in team."
>
> I'm pretty sure the ones who helped me figure this one out will find
> the humor
> in that one. :-)
Reminds me of a movie. And from that same movie, "You've got red on
you". ;-}
Paul
--
Paul M. Foster
--- End Message ---
--- Begin Message ---
On Friday 07 May 2010 00:42:38 Paul M Foster wrote:
> On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote:
>
> <snip>
>
> > I got sortof a joke I thought about a little while ago, it goes something
> > like
> > this:
> >
> > "This list works like a team, and there is no "i" in team."
> >
> > I'm pretty sure the ones who helped me figure this one out will find
> > the humor
> > in that one. :-)
>
> Reminds me of a movie. And from that same movie, "You've got red on
> you". ;-}
Shaun of the Dead wasn't it? :-)
--
Blessings,
David M.
--- End Message ---
--- Begin Message ---
On Thursday 06 May 2010 23:47:23 Jim Lucas wrote:
> Robert Cummings wrote:
> > David McGlone wrote:
> >> On Thursday 06 May 2010 20:49:47 Jason Pruim wrote:
> >>> On May 5, 2010, at 9:02 PM, David McGlone wrote:
> >>>> On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote:
> >>>>> On Wed, May 5, 2010 at 1:06 PM, David McGlone <da...@dmcentral.net>
> >>>>>
> >>>>> wrote:
> >>>>>> On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote:
> >>>>>>> On Wed, May 5, 2010 at 12:55 PM, David McGlone
> >>>>>>> <da...@dmcentral.net>
> >>>>>>
> >>>>>> wrote:
> >>>>>>>> 26. if(isset($_GET['ProductID']))
> >>>>>>>> 27. $this->mSelectedProduct = (init)
> >>>>>>>> $_GET['ProductID'];
> >>>>>>>
> >>>>>>> You've got (init) instead of (int). Its always those little
> >>>>>>> characters
> >>>>>>> causing trouble!
> >>>>>>
> >>>>>> Tell me about it. I kept telling myself for the last 4 hours "I
> >>>>>> can find
> >>>>>> it, I
> >>>>>> can find it I don't need to ask the list" Huh! I was wrong!
> >>>>>
> >>>>> LOL sometimes a second set of eyes is required. We've all been in
> >>>>> your
> >>>>> shoes!
> >>>>
> >>>> True. I need to learn to ask for help, but I don't want to fall into
> >>>> the habit
> >>>> of taking it for granted. I'm still learning so I need to try my
> >>>> hardest
> >>>> before I go getting an answer.
> >>>
> >>> Hey David,
> >>>
> >>> As a budding PHP developer (Been doing it off and on for the past 4
> >>> years now.. Mostly off though...) I got some great advice early on
> >>> from tedd sperling... When I have a problem that I can't fix... I sit
> >>> down and write the e-mail to the list... Thinking through all the info
> >>> that might be helpful to help debug it... What I've tried, what I"m
> >>> expecting... Things of that nature...
> >>>
> >>> Usually by the time I'm done writing the e-mail I'e figured out the
> >>> problem... Not always but once I get done with writing it, if I still
> >>> can't figure it out I don't feel so bad hitting send and lighting up
> >>> everyones inboxes with my mindless drivel :P
> >>
> >> That makes sense. If I carefully think about what Tedd said, I see it
> >> this way: when writing the E-Mail it will take us mentally through the
> >> steps as we are typing them and it will probably get us to realize
> >> where it went wrong.
> >>
> >> I got sortof a joke I thought about a little while ago, it goes
> >> something like this:
> >>
> >> "This list works like a team, and there is no "i" in team."
> >>
> >> I'm pretty sure the ones who helped me figure this one out will find
> >> the humor in that one. :-)
> >
> > Maybe no 'i' but there's "me", "met", "meat", "eat", "at", and "am" :)
We are surely a different breed ;-)
--
Blessings,
David M.
--- End Message ---
--- Begin Message ---
On Fri, May 07, 2010 at 06:23:35AM -0400, David McGlone wrote:
> On Friday 07 May 2010 00:42:38 Paul M Foster wrote:
> > On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote:
> >
> > <snip>
> >
> > > I got sortof a joke I thought about a little while ago, it goes something
> > > like
> > > this:
> > >
> > > "This list works like a team, and there is no "i" in team."
> > >
> > > I'm pretty sure the ones who helped me figure this one out will find
> > > the humor
> > > in that one. :-)
> >
> > Reminds me of a movie. And from that same movie, "You've got red on
> > you". ;-}
>
> Shaun of the Dead wasn't it? :-)
We have a winner!
Paul
--
Paul M. Foster
--- End Message ---
--- Begin Message ---
On Thu, May 6, 2010 at 8:02 PM, Brian Dunning <br...@briandunning.com>wrote:
> Hey all -
>
> I'm using simplexml-load-string just to validation a string of XML, and
> libxml-get-errors to return any errors. It's always worked before, but today
> it's choking on this line in the XML:
>
> <client_orderitem_number>Basketball Personalized Notebook -
> Jeff's</client_orderitem_number>
>
> It's returning "Premature end of data in tag client_orderitem_number line
> 90" but as far as I can tell, Jeff's is properly XML encoded. I can't
> debug this. Any suggestions?
>
> I have run the XML through a couple of online validators and it does come
> back as valid with no errors found. <http://www.php.net/unsub.php>
>
>
I had this problem.... It turned out to be some special characters in the
tags or data that I had to strip out first, then load it thru the simplexml
parser. I will have to check my code when I get back to the office in the
AM and I'll let you know what it was if you haven't figured it out by then.
But that might get you started in fixing it.
--
-Dan Joseph
www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo
Code "NEWTHINGS" for 10% off initial order
http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry
--- End Message ---
--- Begin Message ---
Code below from the manual. I changed $ldaphost to some fictitious name.
When I ran the script, I always get the message "Connection was successful
!" Why didn't the script bomb and give the could not connect message?
<?php
// LDAP variables
$ldaphost = "ldap.noname.com"; // your ldap servers
$ldapport = 389; // your ldap server's port number
// Connecting to LDAP
$ldapconn = ldap_connect($ldaphost, $ldapport)
or die("Could not connect to $ldaphost");
print "Connection was successful !";
?>
TIA.
--
al
--- End Message ---
--- Begin Message ---
Al Mangkok wrote:
Code below from the manual. I changed $ldaphost to some fictitious name.
When I ran the script, I always get the message "Connection was successful
!" Why didn't the script bomb and give the could not connect message?
<?php
// LDAP variables
$ldaphost = "ldap.noname.com"; // your ldap servers
$ldapport = 389; // your ldap server's port number
// Connecting to LDAP
$ldapconn = ldap_connect($ldaphost, $ldapport)
or die("Could not connect to $ldaphost");
print "Connection was successful !";
http://php.net/ldap_connect
"ldap_connect() will always return a resource as *it does not actually
connect but just initializes the connecting parameters.* The actual
connect happens with the next calls to ldap_* funcs, usually with
ldap_bind()."
:)
--- End Message ---