php-general Digest 25 Jul 2006 07:43:51 -0000 Issue 4257

2006-07-25 Thread php-general-digest-help
php-general Digest 25 Jul 2006 07:43:51 - Issue 4257 Topics (messages 239736 through 239754): PHP Developer Needed in San Jose, CA w/ Occasional Travel to Palo Alto 239736 by: Franco Pawlisz 239753 by: Paul Scott Re: database connections 239737 by: Kilbride, James

php-general Digest 25 Jul 2006 19:55:59 -0000 Issue 4258

2006-07-25 Thread php-general-digest-help
php-general Digest 25 Jul 2006 19:55:59 - Issue 4258 Topics (messages 239755 through 239778): captcha and blacklist 239755 by: nicolas figaro 239771 by: Jon Anderson convert byte to MB 239756 by: weetat 239757 by: André Medeiros 239758 by: Andrew

Re: [PHP] Re: Comparing Strings

2006-07-25 Thread Nils Holland
Nils Holland wrote: My guess is that PHP only sees / compares the strings up to a certain position. Is this possible? And if so, is there any way around this, so that my whole string is seen? Greetings and thanks in advance, Nils Maybe it's interpreting something as a number somewhere. Did

[PHP] captcha and blacklist

2006-07-25 Thread nicolas figaro
Hi, I'd like to set a captcha on my web server(s). The code works quite fine, but I'd like to blacklist (for an amount of time) the ips that failed with the captcha x times. The web server works with an SQL server, but I cannot ask the page to check for each IP with a request to the

[PHP] convert byte to MB

2006-07-25 Thread weetat
Hi all , I have data which have value in bytes for example , $bytes = 33554432; How to convert this to MB ? THanks - weetat (PHP Novice) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] convert byte to MB

2006-07-25 Thread André Medeiros
divide by 1024, and you'll get KB divide again by 1024 and you'll get MB same for GB, TB, etc On 7/25/06, weetat [EMAIL PROTECTED] wrote: Hi all , I have data which have value in bytes for example , $bytes = 33554432; How to convert this to MB ? THanks - weetat (PHP Novice)

Re: [PHP] convert byte to MB

2006-07-25 Thread Andrew Brampton
Divide by 1024 and you get KiB Divide by 1000 and you get KB Read: http://physics.nist.gov/cuu/Units/binary.html Andrew - Original Message - From: André Medeiros [EMAIL PROTECTED] To: weetat [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, July 25, 2006 12:41 PM

Re: [PHP] convert byte to MB

2006-07-25 Thread cajbecu
weetat wrote: Hi all , I have data which have value in bytes for example , $bytes = 33554432; How to convert this to MB ? THanks - weetat (PHP Novice) 1GB = 1024 * 1MB = 1024 * (1024 * 1KB) = 1024 * (1024 * (1024 * 1byte)) -- PHP General Mailing List

[PHP] [on the wrong end of someone else's bad day] Re: [PHP] convert byte to MB

2006-07-25 Thread Jochem Maas
weetat wrote: Hi all , I have data which have value in bytes for example , $bytes = 33554432; How to convert this to MB ? how to read the manual thanks. http://php.net/filesize no doubt you won't bother to read any of the user notes and therefore miss *at least* 4

Re: [PHP] convert byte to MB

2006-07-25 Thread Andrei
So what u'r trying to say is that we should use KiB and not KB for kilobytes? That's funny! Andrei Andrew Brampton wrote: Divide by 1024 and you get KiB Divide by 1000 and you get KB Read: http://physics.nist.gov/cuu/Units/binary.html Andrew - Original Message

Re: [PHP] convert byte to MB

2006-07-25 Thread Austin Denyer
Andrei wrote: So what u'r trying to say is that we should use KiB and not KB for kilobytes? That's funny! I know a lot of people who do just that. Regards, Austin. signature.asc Description: OpenPGP digital signature

Re: [PHP] select option and php

2006-07-25 Thread Jochem Maas
weetat wrote: Hi Jay , I am not in the javascript group. 'the javascript group' ?? document.forms['listfrm'].submit; document.forms['listfrm'].submit(); ^^--- i.e. actually call the method -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Re: Stumped! 4.x to 5.1 problem!!

2006-07-25 Thread Jochem Maas
markw@mohawksoft.com wrote: [snip] seems the perceived problem is being caused by something else? Sorry, I have to respectfully disagree. ok :-). I was converting all indexes to string indexes, and simply using zend_hash_update to re-constitute the objects and they simply did not

Re: [PHP] Re: Stumped! 4.x to 5.1 problem!!

2006-07-25 Thread markw
markw@mohawksoft.com wrote: [snip] seems the perceived problem is being caused by something else? Sorry, I have to respectfully disagree. ok :-). Men of integrity must be able to disgree peacefully. :-) I was converting all indexes to string indexes, and simply using zend_hash_update

Re: [PHP] xml v php question

2006-07-25 Thread David Tulloh
Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: a) Use PHP to print out the XML declaration as a string: ?php

Re: [PHP] xml v php question

2006-07-25 Thread tedd
At 11:01 PM -0500 7/24/06, Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: Bingo ! That works : ) Apparently the better

[PHP] Re: convert byte to MB

2006-07-25 Thread zerof
weetat escreveu: Hi all , I have data which have value in bytes for example , $bytes = 33554432; How to convert this to MB ? THanks Please see: http://www.unc.edu/~rowlett/units/index.html http://www.unc.edu/~rowlett/units/dictM.html - zerof -- PHP General Mailing List

Re: [PHP] PAYMENT TRANSACTION

2006-07-25 Thread BBC
Hi, We r using the paypal secure transaction.if u want i will send u the code and the tutorials Hi Suresh Kumar, I'm sorry I don't reply email directly. I've been a kind of busy lately... If you want to send the code and tutorial of pay pal secure transaction, I will love to. And thank you

Re: [PHP] SQL Result Set - HTML Table Fragment (but Simple)

2006-07-25 Thread tedd
At 12:46 AM -0400 7/25/06, Michael B Allen wrote: Ok, I've been tinkering a little. This isn't simple but it's not a lot of code either. Granted, and no offense, it isn't simple the way you've attempted it. You simply have three columns with these conditions: 1. Is gray if odd; 2. Is a time

Re: [PHP] captcha and blacklist

2006-07-25 Thread Jon Anderson
So you want a blacklist that bans IPs for some amount of time, and that's capable of sharing the blacklist between multiple HTTP servers... Seems to me that you need some sort of central or shared database...I'm not quite sure why SQL wouldn't be an option, but it seems to me that it should

[PHP] Error Reporting for file commands

2006-07-25 Thread James Nunnerley
We've created a file manager which allows users to access their web space on a server. It's working brilliantly, except that it would seem there are some caching issues, either by the system cache or the web server cache that are causing us a headache. When the script tries to delete a file, we

Re: [PHP] Error Reporting for file commands

2006-07-25 Thread Jon Anderson
You could try prefixing the unlink function call with an @: if (file_exists($fn)) { @unlink($fn); } The @ should suppress any errors. jon James Nunnerley wrote: We've created a file manager which allows users to access their web space on a server. It's working brilliantly, except that it

[PHP] RE: Spam:[PHP] Error Reporting for file commands

2006-07-25 Thread James Nunnerley
[snip] When the script tries to delete a file, we always check (using file_exists) to see whether the file exists before it's deleted. The check comes back true, but the unlink then fails, saying no file or directory there! [/snip] Could you please post the code you are using to check and

Re: [PHP] RE: Spam:[PHP] Error Reporting for file commands

2006-07-25 Thread Jochem Maas
James Nunnerley wrote: [snip] When the script tries to delete a file, we always check (using file_exists) to see whether the file exists before it's deleted. The check comes back true, but the unlink then fails, saying no file or directory there! [/snip] Could you please post the code you

[PHP] Lots of queries!

2006-07-25 Thread Philip Thompson
Hi all. I have a list of people in a database who live in particular rooms. Next semester, they may live somewhere else, so I need to update my database. (I know the data becomes stale, but not that often.) Here's what I'm doing to update: 1. Pull list of IDs from database A - store in

Re: [PHP] xml v php question

2006-07-25 Thread Kevin Waterson
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin -- Democracy is two wolves and a

Re: [PHP] xml v php question

2006-07-25 Thread Larry Garfield
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly

RE: [PHP] xml v php question

2006-07-25 Thread Jim Moseby
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be

Re: [PHP] Lots of queries!

2006-07-25 Thread Jochem Maas
Philip Thompson wrote: Hi all. I have a list of people in a database who live in particular rooms. Next lucky them, back when I was a kid you were lucky if you had a cardboard box, and a wet one at that ok let's not go down that road ;-) semester, they may live somewhere else, so I need

[PHP] mail headers

2006-07-25 Thread Schalk
Greetings Everyone, What in the piece of code below might be causing the headers for from and reply-to to be set incorrectly? ' $headers = MIME-Version: 1.0\r\n. Content-type: text/html; charset=iso-8859-1\r\n. From: .$email.\r\n. Reply-to: .$email.\r\n. Date: .date(r).\r\n; ' Using

Re: [PHP] Lots of queries!

2006-07-25 Thread Philip Thompson
Well, we figured out. Jochem, thanks for your input... a few minutes too late! =D We discovered that it *was* timing out at 30 seconds, which is how it was set in the php.ini file. We upped that and now it works. THANKS!! ~Philip On Jul 25, 2006, at 3:34 PM, Jochem Maas wrote: Philip

Re: [PHP] SQL Result Set - HTML Table Fragment (but Simple)

2006-07-25 Thread tedd
At 10:55 AM -0400 7/25/06, tedd wrote: At 12:46 AM -0400 7/25/06, Michael B Allen wrote: Ok, I've been tinkering a little. This isn't simple but it's not a lot of code either. Granted, and no offense, it isn't simple the way you've attempted it. You simply have three columns with these

[PHP] Efficiency question

2006-07-25 Thread Paul Scott
I have googled around a bit, but not really found anything useful... Which is more efficient? A case switch or a $$method style method? An example: switch($action) { case 'edit': //do some stuff ... return edit_tpl.php; case 'whatever': //blah

Re: [PHP] mail headers

2006-07-25 Thread Chris
Schalk wrote: Greetings Everyone, What in the piece of code below might be causing the headers for from and reply-to to be set incorrectly? ' $headers = MIME-Version: 1.0\r\n. Content-type: text/html; charset=iso-8859-1\r\n. From: .$email.\r\n. Reply-to: .$email.\r\n. Date: .date(r).\r\n; '