[PHP] Re: for loop inside a switch

2007-09-02 Thread M. Sokolewicz
jekillen wrote: On Aug 31, 2007, at 6:26 PM, Robert Cummings wrote: On Fri, 2007-08-31 at 15:56 -0700, Dan wrote: Sanjeev is right. You're thinking about the problem backwards. You're trying to build a Switch inside a loop. Remember, if you ever have to do some operating multiple times you

Re: [PHP] what is my dns ip address

2007-09-02 Thread Olav Mørkrid
the source of the problem is gethostbyaddr(). it seems to have a 4,5 second timeout, so some lookups time out after 4,5 seconds, while most of them are resolved in < 0.1 second; a radically performance difference. the user written gethostbyaddr_timeout() on the gethostbyaddr man page overcomes thi

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-02 Thread Chris
tedd wrote: At 6:14 PM -0400 9/2/07, brian wrote: tedd wrote: Hi to the original poster: Snip -- a lot of discussion Use the following code at your own peril. $dbQuery = "ALTER TABLE $dbtable "; $dbQuery .= "DROP id, "; $dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,"; $dbQuery .=

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-02 Thread tedd
At 6:14 PM -0400 9/2/07, brian wrote: tedd wrote: Hi to the original poster: Snip -- a lot of discussion Use the following code at your own peril. $dbQuery = "ALTER TABLE $dbtable "; $dbQuery .= "DROP id, "; $dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,"; $dbQuery .= "AUTO_INCREME

[PHP] Hey Php-general@lists.php.net ;)

2007-09-02 Thread Jose Ramirez
http://www.hi5.com/register/XlneT?inviteId=A_90991ca_0C09xs.2txp151622090 Jose -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail() takes too much time

2007-09-02 Thread brian
shiplu wrote: Hello everybody, I am maintaining a social network site. there each user can send other mail. these mails are not real mail rather message entry to database. I added a new feature so that every message is sent to me (admin/webmaster) via email (real e-mail). I used mail function. T

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-02 Thread brian
tedd wrote: Hi to the original poster: Snip -- a lot of discussion Use the following code at your own peril. $dbQuery = "ALTER TABLE $dbtable "; $dbQuery .= "DROP id, "; $dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,"; $dbQuery .= "AUTO_INCREMENT = 1"; $result = mysql_query($dbQuery

Re: [PHP] mail() takes too much time

2007-09-02 Thread Gavin M. Roy
You might want to consider a few things: Queueing your email in a database table and sending it out in a separate process. or Finding a mail daemon that will queue quickly for you and not send directly on adding to the queue. I use the first of the two options and it works quite well for us. G

[PHP] Re: for loop inside a switch

2007-09-02 Thread Jonesy
On Fri, 31 Aug 2007 22:05:11 -0700, jekillen wrote: >You can run a switch inside a for loop and when a case is matched set >a variable to true. >the break statement will break out of the switch, then inside the >iteration code, after the switch block, test the variable for true. If >it is true

[PHP] PHP-VOX Project Advancement (PHP Text-To-Speech)

2007-09-02 Thread Daniel Brown
For those of you who aren't hosted with me at PilotPig (http://www.pilotpig.net/) but may be interested in the advancement of the PHP TTS module that I've been working on (if you're not aware, search the list archives ~May, 2007), we're unofficially at version 0.6.6 right now. In the lates

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-02 Thread tedd
Hi to the original poster: Snip -- a lot of discussion Use the following code at your own peril. $dbQuery = "ALTER TABLE $dbtable "; $dbQuery .= "DROP id, "; $dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,"; $dbQuery .= "AUTO_INCREMENT = 1"; $result = mysql_query($dbQuery) or die("Cou

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-02 Thread Graham Cossey
If I've understood correctly your record/Id number relates to a message/post. Let's say the PHP list has message numbers and this post is number 456. If I have a list of posts and sort them by user and provide the user with a numbered list of posts from 1 to N in user sequence there's VERY little

[PHP] Re: mail() takes too much time

2007-09-02 Thread Colin Guthrie
Stut wrote: > Unless your script is actually hanging for the 4-6 hours this problem > has nothing to do with PHP. > > How mail is delivered depends on the OS you are using, but usually it > will get passed to a local MTA which then handles delivering it, at > which point PHP involvement ends. > >

Re: [PHP] mail() takes too much time

2007-09-02 Thread Stut
shiplu wrote: I am maintaining a social network site. there each user can send other mail. these mails are not real mail rather message entry to database. I added a new feature so that every message is sent to me (admin/webmaster) via email (real e-mail). I used mail function. THis is a simple ma

[PHP] mail() takes too much time

2007-09-02 Thread shiplu
Hello everybody, I am maintaining a social network site. there each user can send other mail. these mails are not real mail rather message entry to database. I added a new feature so that every message is sent to me (admin/webmaster) via email (real e-mail). I used mail function. THis is a simple

Re: [PHP] what is my dns ip address

2007-09-02 Thread Richard Heyes
Stut wrote: Richard Heyes wrote: Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. The DNS resolver?

Re: [PHP] what is my dns ip address

2007-09-02 Thread Stut
Richard Heyes wrote: Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. The DNS resolver? What? If DNS

Re: [PHP] what is my dns ip address

2007-09-02 Thread Richard Heyes
Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. The DNS resolver? What? If DNS servers are assigned

Re: [PHP] what is my dns ip address

2007-09-02 Thread Per Jessen
Richard Heyes wrote: >> Or read the contents of /etc/resolv.conf > > Faster for static DNS servers, but if you're using DHCP assigned > servers, they aren't likely to be in there. > Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. /Per Jessen, Zürich