php-general Digest 2 Sep 2007 20:28:59 -0000 Issue 4996

Topics (messages 261611 through 261619):

Re: what is my dns ip address
        261611 by: Richard Heyes
        261612 by: Stut
        261613 by: Richard Heyes

mail() takes too much time
        261614 by: shiplu
        261615 by: Stut
        261616 by: Colin Guthrie

Re: Pragmatically changing a "Record Number"
        261617 by: Graham Cossey
        261618 by: tedd

PHP-VOX Project Advancement (PHP Text-To-Speech)
        261619 by: Daniel Brown

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
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 by DHCP how will they be in resolv.conf?

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
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 servers are assigned by DHCP how will they be in resolv.conf?

Because dhcpclient overwrites resolv.conf when it gets DNS details from a DHCP server.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
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? What? If DNS servers are assigned by DHCP how will they be in resolv.conf?

Because dhcpclient overwrites resolv.conf when it gets DNS details from a DHCP server.

I see. Didn't know that, (never used DHCP on *nix).

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
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 mail function. all it does sends mail with the message as
the mail body to my address.
Thats it. no extra complexity.
But the problem is I got the mail very late. after 4-6 hours. That is  huge
time difference.
I shouldn't take more than 3-5 mins.
Do you know the reason?
my mail code is here,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
list($myname,$mydomain)=preg_split("/\@/",$myemail,2);
$headers .= "From: $myname <$myemail>\r\n";
mail("[EMAIL PROTECTED]", "message from XXX to YYY", $message_content,
$headers);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
shout at http://shiplu.awardspace.com/

Available for Hire/Contract/Full Time

--- End Message ---
--- Begin Message ---
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 mail function. all it does sends mail with the message as
the mail body to my address.
Thats it. no extra complexity.
But the problem is I got the mail very late. after 4-6 hours. That is  huge
time difference.
I shouldn't take more than 3-5 mins.
Do you know the reason?
my mail code is here,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
list($myname,$mydomain)=preg_split("/\@/",$myemail,2);
$headers .= "From: $myname <$myemail>\r\n";
mail("[EMAIL PROTECTED]", "message from XXX to YYY", $message_content,
$headers);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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.

I suggest you look at the Received headers in the messages your getting. You should be able to see which server is causing the delay.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
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.
> 
> I suggest you look at the Received headers in the messages your getting.
> You should be able to see which server is causing the delay.

Yup, 100% agree that it's not PHP.

Reasons for delays can include a dodgy ISP just taking a long time to
process things, or more typically some form of "greylisting" e.g. one
MTA deliberately telling the delivering MTA to P*ss off for a while -
compliant servers will resend the mail after a while at which point it
will be accepted. This is a spam prevention technique. See:
http://en.wikipedia.org/wiki/Greylisting

Col

--- End Message ---
--- Begin Message ---
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 chance that if I was to quote message number 47
(or whatever number it had been assigned in the sorted list) that
someone else would be able to reliably find the post using number 47,
but give then number 456 that is always linked to this post and this
post only then they'll always be able to find it, until it's deleted
;-)

Help?

Graham

On 9/2/07, Bill Guion <[EMAIL PROTECTED]> wrote:
> I don't think you really want to do that, either. You don't need a
> field in the database to accomplish what you are trying to do.
> Execute your query to select the records you want, sorting them into
> what ever order you want. When you display the records on your web
> page, add a PHP variable, say $row_number, which starts at 1, and
> increments by one for each row you display.
>
>       -----===== Bill =====-----
>
> At 3:09 PM -0400 8/29/07, Jason Pruim wrote:
>
> >And what I'm looking for is away to take rows 4 and 5 and move them
> >to rows 2 and 3 so the next record inserted would be row 4 :)
> >
> >>
> >>it does not go back and fill in the holes/gaps
> >>
> >>--
> >>Jim Lucas
> >>
> >>    "Some men are born to greatness, some achieve greatness,
> >>        and some have greatness thrust upon them."
> >>
> >>Twelfth Night, Act II, Scene V
> >>     by William Shakespeare
> >>
> >
> >--
> >
> >Jason Pruim
> >Raoset Inc.
> >Technology Manager
> >MQC Specialist
> >3251 132nd ave
> >Holland, MI, 49424
> >www.raoset.com
> >[EMAIL PROTECTED]
>
>
> --
>
> Reality is the leading cause of stress, for those in touch with it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Graham

--- End Message ---
--- Begin Message ---
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("Could not renumber dB $dbQuery" . mysql_error());

The reason for not wanting to care about the auto_increment id is that it is something that the database uses and really should not be changed. If you want to have a sequential record number, then add that field and alter it as you will, but leave the internal workings of database alone.

However, if you wish not to understand how all that works, then use the code above -- it will renumber your auto_increment id leaving no gaps.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
    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 latest build, which so far is just on the PilotPig servers
(and actually live for customers right now), the speech synthesis
function works as follows:

    <? txt2wav($text,$fileout,$duration,$pitch,$stddev); ?>

    While only the first two parameters are required, here's a
breakdown of the parameters:
        $text          The text to be synthesized into "speech"
        $fileout       The name of the PCM Waveform file (*.wav) to write to
        $duration    The speech-point duration (lower numbers mean
faster speech)
        $pitch         The base pitch of the voice that will "speak" $text
        $stddev       The standard deviation to use from $pitch
                          (NOTE: $stddev dynamically builds an
algorithm for the synthesis
                          of more natural speech based upon its own
value combined with
                          $duration and $pitch, as well as
strlen($text).  Doing a negative number
                          will have the exact opposite effect as its
positive counterpart.)

    You can see the results by going to http://www.pilotpig.net/ and
turning the audio on.

    If anyone has any questions or anything, just let me know.  I just
wanted to apprise those on the list who were interested (some of which
were involved) in the progress.

    Also, if anyone else is interested in hosting with me (there are
actually a few members from the list who are now), just let me know.
For list members, I'm willing to cut the price as much as in half, for
life.

    That is all.  Thanks for listening.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished....

--- End Message ---

Reply via email to