Re: [PHP] Can't find my error

2010-05-06 Thread Paul M Foster
On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote: > > 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

[PHP] Re: Connection error expected but ...

2010-05-06 Thread Nathan Rixham
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? http://php.net/ldap_connect "ldap_connect() will always r

Re: [PHP] Can't find my error

2010-05-06 Thread Jim Lucas
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 wrote: On Wednesday 05 May 2010 12:59:07 Dan

[PHP] Connection error expected but ...

2010-05-06 Thread Al Mangkok
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? TIA. -- al

Re: [PHP] simplexml choking on apparently valid XML

2010-05-06 Thread Dan Joseph
On Thu, May 6, 2010 at 8:02 PM, Brian Dunning 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: > > Basketball Personalized Notebook -

Re: [PHP] Can't find my error

2010-05-06 Thread Robert Cummings
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 wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, M

Re: [PHP] Can't find my error

2010-05-06 Thread David McGlone
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 > >> > >> wrote: > >>> On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: > On Wed

Re: [PHP] “五-连-贯”股|权-激|励- 法

2010-05-06 Thread Robert Cummings
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. :

Re: [PHP] Can't find my error

2010-05-06 Thread Jason Pruim
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 wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone wrote: 26. if(isset(

[PHP] simplexml choking on apparently valid XML

2010-05-06 Thread Brian Dunning
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: Basketball Personalized Notebook - Jeff's It's returning "Premature end of data in tag client_or

Re: [PHP] Two color rows in table inside while iteration [X-PHP]

2010-05-06 Thread Michiel Sikma
On 6 May 2010 17:47, tedd wrote: > > > Michiel: > > Considerate? Being Inconsiderate is what the government does for a living. > > Additionally, what you said above is *your* opinion -- as *you* presented > in a public forum. Who's opinion is more appropriate for this list is > subject to debate.

[PHP] Using array_intersect with an unknown number of arrays

2010-05-06 Thread robert mena
Hi, I have a result set coming from a database that can be of the form below $lines = array(0 => array('idA' => 1, 'idU' => 1), 1 => array('idA' => 1, 'idU' => 2), 2 => array('idA' => 2, 'idU' => 1), 3 => array('idA' => 2, 'idU' => 2),

Re: [PHP] “五-连-贯”股|权-激|励-法

2010-05-06 Thread Dan Joseph
2010/5/6 Ashley Sheridan > [/snip] > > If only I could speak Chinese and was gullible I'd love to take them up > on the offer for whatever it is. > > > > I wonder if we're missing out on the billion $ prize... -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.

Re: [PHP] “五-连-贯”股| 权-激|励-法

2010-05-06 Thread Ashley Sheridan
[/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

[PHP] any major benefit in larger fread() blocks when reading STDIN?

2010-05-06 Thread Robert P. J. Day
i'm looking at some existing code that (obviously) reads from stdin: $fd = fopen("php://stdin", "r"); $source = ""; while (!feof($fd)) { $source .= fread($fd, 1024); } fclose($fd); it works fine, but is there any reason the original author would have chosen 1024 as the individual read

RE: [PHP] In need of CVS/SVN checkout script for Production servers [solved]

2010-05-06 Thread tedd
At 5:43 PM -0700 5/5/10, Daevid Vincent wrote: > -Original Message- > From: tedd [mailto:tedd.sperl...@gmail.com] > Sent: Wednesday, May 05, 2010 8:19 AM > To: Daevid Vincent; php-general@lists.php.net > Subject: RE: [PHP] In need of CVS/SVN checkout script for >-snip- stuff which f

Re: [PHP] Two color rows in table inside while iteration [X-PHP]

2010-05-06 Thread tedd
At 12:07 AM +0200 5/6/10, Michiel Sikma wrote: On 2 May 2010 19:11, tedd <tedd.sperl...@gmail.com> wrote: -snip- Yes, it would be nice if the people who work for the government also had to live under the same rules as the rest of us. As it is, they live in a

Re: [PHP] Re: Really impressive work

2010-05-06 Thread tedd
At 9:43 PM -0400 5/5/10, Robert Cummings wrote: Nathan Rixham wrote: tedd wrote: Hi gang: I found something that really impressed me -- please review this: http://palomarjewelry.com/product/id/19/collectionId/1/typeId/3 -snip- I would use PNGs with alpha transparencies. You have X images wi

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Fernando
I think Bob has a good idea here, split the string values and the concatenate them to make the whole value. If the data is really stored in strings, you need to break it down into substrings around the decimal and then convert both sides into integers and combine them into an integer value. It is

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Robert Cummings
Paul Waring wrote: I've got the following script which demonstrates a problem I'm having with floating point numbers and intval: $times100 = (-37.12 * 100); print $times100 . "\n"; $intval100 = intval($times100); print $intval100 . "\n"; print ($intval100 / 100) . "\n"; I expect the output t

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread David McGlone
On Thursday 06 May 2010 08:39:03 Bob McConnell wrote: > From: David McGlone > > >On Thursday 06 May 2010 07:19:48 Paul Waring wrote: > >> David Otton wrote: > >> > On 6 May 2010 11:52, Paul Waring wrote: > >> >> If I was designing the system from scratch, that's what I'd do. > >> >> Unfortunately

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Paul Waring
David McGlone wrote: On Thursday 06 May 2010 07:19:48 Paul Waring wrote: David Otton wrote: On 6 May 2010 11:52, Paul Waring wrote: If I was designing the system from scratch, that's what I'd do. Unfortunately this is an add-on to a legacy system where currency values are already stored as st

RE: [PHP] Converting floats to ints with intval

2010-05-06 Thread Bob McConnell
From: David McGlone >On Thursday 06 May 2010 07:19:48 Paul Waring wrote: >> David Otton wrote: >> > On 6 May 2010 11:52, Paul Waring wrote: >> >> If I was designing the system from scratch, that's what I'd do. >> >> Unfortunately this is an add-on to a legacy system where currency values >> >> are

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread David McGlone
On Thursday 06 May 2010 07:19:48 Paul Waring wrote: > David Otton wrote: > > On 6 May 2010 11:52, Paul Waring wrote: > >> If I was designing the system from scratch, that's what I'd do. > >> Unfortunately this is an add-on to a legacy system where currency values > >> are already stored as strings

Re: [PHP] Getting source from remote file

2010-05-06 Thread Peter Lind
On 6 May 2010 14:20, Auto-Deppe C. Hänsel wrote: > > Hi all, and thanks a lot for your suggestions. It works well now. > The only problem I do have are german "Umlaute" [äöü] when receiving the > content of the remote page. > It#s formatted in iso-8859-1 and I'd rather have it in UTF-8. But > ut

RE: [PHP] Getting source from remote file

2010-05-06 Thread Auto-Deppe C . Hänsel
> On 6 May 2010 10:55, Peter Lind wrote: > > You could parse the document with the DOM classes. Load as a > DOMDocument, then grab what's needed with the relevant methods (you > can use xpath to single out your divs with the right classes). > http://dk2.php.net/domdocument > > > Xpath is indeed th

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Paul Waring
David Otton wrote: On 6 May 2010 11:52, Paul Waring wrote: If I was designing the system from scratch, that's what I'd do. Unfortunately this is an add-on to a legacy system where currency values are already stored as strings in the database (yes, not ideal I know, but you have to work with wh

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread David Otton
On 6 May 2010 11:52, Paul Waring wrote: > If I was designing the system from scratch, that's what I'd do. > Unfortunately this is an add-on to a legacy system where currency values are > already stored as strings in the database (yes, not ideal I know, but you > have to work with what you've got)

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Pete Ford
On 06/05/10 11:52, Paul Waring wrote: Ashley Sheridan wrote: Why don't you store them as integer values and add in the decimal point with something like sprintf() afterwards? Store the values as pence and then you won't have any rounding problems. If I was designing the system from scratch, th

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Paul Waring
Ashley Sheridan wrote: Why don't you store them as integer values and add in the decimal point with something like sprintf() afterwards? Store the values as pence and then you won't have any rounding problems. If I was designing the system from scratch, that's what I'd do. Unfortunately this i

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Ashley Sheridan
On Thu, 2010-05-06 at 11:40 +0100, Paul Waring wrote: > Ashley Sheridan wrote: > > It's part of the rounding problem you get with most languages out there. > > Why can't you compare the floating point values though? Currency should > > only have one decimal place anyway. > > You can't compare flo

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Paul Waring
Ashley Sheridan wrote: It's part of the rounding problem you get with most languages out there. Why can't you compare the floating point values though? Currency should only have one decimal place anyway. You can't compare floating point values because if you have, for example, a user-entered v

Re: [PHP] Converting floats to ints with intval

2010-05-06 Thread Ashley Sheridan
On Thu, 2010-05-06 at 11:24 +0100, Paul Waring wrote: > I've got the following script which demonstrates a problem I'm having > with floating point numbers and intval: > > $times100 = (-37.12 * 100); > print $times100 . "\n"; > > $intval100 = intval($times100); > print $intval100 . "\n"; > > p

[PHP] Converting floats to ints with intval

2010-05-06 Thread Paul Waring
I've got the following script which demonstrates a problem I'm having with floating point numbers and intval: $times100 = (-37.12 * 100); print $times100 . "\n"; $intval100 = intval($times100); print $intval100 . "\n"; print ($intval100 / 100) . "\n"; I expect the output to be: -3712 -3712 -3

Re: [PHP] Getting source from remote file

2010-05-06 Thread Michiel Sikma
On 6 May 2010 10:55, Peter Lind wrote: > > > You could parse the document with the DOM classes. Load as a > DOMDocument, then grab what's needed with the relevant methods (you > can use xpath to single out your divs with the right classes). > http://dk2.php.net/domdocument > > > Xpath is indeed t

Re: [PHP] Really impressive work

2010-05-06 Thread Per Jessen
tedd wrote: > Now, I realize that this company did not take 15 factorial pictures > of this single piece of jewelry to present all these different > combinations but instead placed smaller images of each of the stones > at specific coordinates on the larger image of the jewelry. > > I imagine tha

Re: [PHP] In need of CVS/SVN checkout script for Production servers [solved]

2010-05-06 Thread David Otton
On 6 May 2010 04:14, Adam Richardson wrote: > Daevid asked the list for a an app that facilitated SVN/CVS, and when nobody > provided options, he crafted a solution of his own and then offered it back > to the list. Er... I suggested Phing. Phing/Ant/Gradle/Maven/Capistrano... a build tool is th

Re: [PHP] Getting source from remote file

2010-05-06 Thread Peter Lind
On 6 May 2010 10:47, Auto-Deppe C. Hänsel wrote: > Hi guys and girls, > > okay, this is a dumbnut question I wouldn't bother asking but I really > did hit a spot now where I am totally wedged up in my head and can't think > straight anymore... so the, I bet easy, answer to my question escapes

[PHP] Getting source from remote file

2010-05-06 Thread Auto-Deppe C . Hänsel
Hi guys and girls, okay, this is a dumbnut question I wouldn't bother asking but I really did hit a spot now where I am totally wedged up in my head and can't think straight anymore... so the, I bet easy, answer to my question escapes me. What I am trying to do is the following: Read the con