php-general Digest 16 Dec 2008 08:20:35 -0000 Issue 5848
Topics (messages 284640 through 284653):
Re: new xampp server problem w/mail
284640 by: Jim Lucas
284642 by: Bastien Koert
284643 by: Jim Lucas
284644 by: ceo.l-i-e.com
Re: header modify errors
284641 by: Jon Drukman
Re: Credit Card processing: Chase PaymenTech
284645 by: phphelp -- kbk
Create unique non-autoincrement key for 700,000 records?
284646 by: Rob Gould
284647 by: Bastien Koert
284648 by: Rob Gould
284649 by: German Geek
284650 by: Steve Edberg
284651 by: Ondrej Kulaty
284652 by: Robert Cummings
284653 by: franzemmanuel
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 ---
Ian Lin wrote:
> hi I have been searching for a way to get the php mail function to work and
> have had no luck. I was hoping you could address my situation:
>
> I have a fairly new xampp install and I need to know how to get mail() to
> work. I would like to know tha simplest way possible to get the mail function
> to work. I guess the major problem is that my xampp install doesn't have an
> email server. please advise my what I need to do to get one for a linux box.
>
> Please keep in mind that I am a newbie and need detailed instructions for
> installing any software and configuring any files that may need altered in
> the server's configuration files such as php.ini etc...
>
> email me at [email protected] if you can help.
>
> Thanks,
> Ian
Why is it a requirement to use mail() ?? Why not use a package like phpmailer
or some such email lib?
--
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
--- End Message ---
--- Begin Message ---
On Mon, Dec 15, 2008 at 2:49 PM, Jim Lucas <[email protected]> wrote:
> Ian Lin wrote:
> > hi I have been searching for a way to get the php mail function to work
> and have had no luck. I was hoping you could address my situation:
> >
> > I have a fairly new xampp install and I need to know how to get mail() to
> work. I would like to know tha simplest way possible to get the mail
> function to work. I guess the major problem is that my xampp install doesn't
> have an email server. please advise my what I need to do to get one for a
> linux box.
> >
> > Please keep in mind that I am a newbie and need detailed instructions for
> installing any software and configuring any files that may need altered in
> the server's configuration files such as php.ini etc...
> >
> > email me at [email protected] if you can help.
> >
> > Thanks,
> > Ian
>
> Why is it a requirement to use mail() ?? Why not use a package like
> phpmailer or some such email lib?
>
> --
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Getting email to work on a Windows installed local machine is a pain in the
ass...I usually just code it and test it online since I tend to use the same
code all the time
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
Lets keep things on the list!
Ian Lin wrote:
> Jim Lucas,
>
> Thank you for your advise!
>
> It is not necessarily crucia that I use the mail() function, but that
> is what I usually use when writing email scripts for my clients because
> thier servers all support it. I am a web designer and would like to be
> able to test these scripts on my server before moving the files to the
> customer's server. However if it is going to be a mjor pain in the rear
> to get the php mail() function to work, I still need some way to send
> emails from php scripts for my own sites, So what solution would you
> reccomend I try first?
>
>
>
>
>
>
> --- On Mon, 12/15/08, Jim Lucas <[email protected]> wrote:
> From: Jim Lucas <[email protected]>
> Subject: Re: [PHP] new xampp server problem w/mail
> To: [email protected]
> Cc: "[email protected]" <[email protected]>
> Date: Monday, December 15, 2008, 7:49 PM
>
> Ian Lin wrote:
>> hi I have been searching for a way to get the php mail function to work
> and have had no luck. I was hoping you could address my situation:
>>
>> I have a fairly new xampp install and I need to know how to get mail() to
> work. I would like to know tha simplest way possible to get the mail function
> to
> work. I guess the major problem is that my xampp install doesn't have an
> email server. please advise my what I need to do to get one for a linux box.
>>
>> Please keep in mind that I am a newbie and need detailed instructions for
> installing any software and configuring any files that may need altered in the
> server's configuration files such as php.ini etc...
>>
>> email me at [email protected] if you can help.
>>
>> Thanks,
>> Ian
>
> Why is it a requirement to use mail() ?? Why not use a package like phpmailer
> or some such email lib?
>
I would integrate a email lib like phpmailer [1] or swiftmailer [2] so that it
is surely to work from 99.9999% of the web hosts.
All you need is an outside POP3/SMTP service that allows you to send email and
your good to go.
1. http://sourceforge.net/projects/phpmailer/
2. http://sourceforge.net/projects/swiftmailer/
--
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
--- End Message ---
--- Begin Message ---
Assuming your local box is not wide open to the 'net for mail relaying, install
Pegasus/Mercury mail server and call it done.
--- End Message ---
--- Begin Message ---
Terion Miller wrote:
*Warning*: Cannot modify header information - headers already sent by
(output started at
C:\Inetpub\Xampp\htdocs\SNLeader\WOSystem\Welcome.php:31)
in *C:\Inetpub\Xampp\htdocs\SNLeader\WOSystem\inc\dbconn_openTest.php* on
line *3*
Line 32-36 are:
<?php
If (!empty($msg)){
echo "<div class=\"Error\">". $msg ."</div><BR><BR>";
}
?>
stick an ob_start(); at the beginning of the file and php will not
complain about output started any longer.
-jsd-
--- End Message ---
--- Begin Message ---
Thanks, Guys --
To those who say 'move providers' -- I can't. My client, which also
sells a bunch of other stuff on-line has an exclusive arrangement
with that processor.
How about using gateway providers? Any experience with that?
Ken
On Dec 15, 2008, at 1:06 AM, clive wrote:
phphelp -- kbk wrote:
Anybody have modules, code, tips, land mines, or any other
information for doing credit card processing with PaymenTech that
you would be willing to share?
Ken - I think your first step is to find another provider, support
is everything, your code can be 110% correct, but if there is 1
item wrong in the comms you have with PaymenTech, then you can
spend hours if not days with a broken application.
This recently happened with me and HSBC bank in the UK, rubbish
support, my code look right, but nothing worked, until after a
number of days I managed to get through to one of the developers of
there payment gateway system, he was able to a make a few changesto
the xml I sending and just like that I was able to process payments.
Move providers
Clive
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have a mySQL database with 700,000 records in it, which are presently keyed
with an "auto-increment" field.
What I'd like to do is create another field with a field where each and every
record number has a unique keyvalue. Example: "su5e23vlskd" for records 1, and
"34fdfdsglkdj4" for record 2. All that matters is that it's unique, and isn't
a number that can be guessed or an "autoincrement" number, where a hacker can
just figure out the keyvalue by incrementing numbers. It doesn't matter to me
if each keyvalue field is just numbers, or a number/letter combination - - -
all that matters is that each keyvalue field is unique. Is there an automatic
way that mySQL could do that, or would I need to write a php script to somehow
go through each record and create this unique value?
--- End Message ---
--- Begin Message ---
On Mon, Dec 15, 2008 at 9:29 PM, Rob Gould <[email protected]> wrote:
> I have a mySQL database with 700,000 records in it, which are presently
> keyed with an "auto-increment" field.
>
> What I'd like to do is create another field with a field where each and
> every record number has a unique keyvalue. Example: "su5e23vlskd" for
> records 1, and "34fdfdsglkdj4" for record 2. All that matters is that it's
> unique, and isn't a number that can be guessed or an "autoincrement" number,
> where a hacker can just figure out the keyvalue by incrementing numbers. It
> doesn't matter to me if each keyvalue field is just numbers, or a
> number/letter combination - - - all that matters is that each keyvalue field
> is unique. Is there an automatic way that mySQL could do that, or would I
> need to write a php script to somehow go through each record and create this
> unique value?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
update mytable set hash_field = md5(AutoIdField + unix_timestamp())
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
update mytable set hash_field = md5(AutoIdField + unix_timestamp())
I _think_ I understand that - - - - but what does the "AutoldField" variable
mean?
On Monday, December 15, 2008, at 09:37PM, "Bastien Koert" <[email protected]>
wrote:
>On Mon, Dec 15, 2008 at 9:29 PM, Rob Gould <[email protected]> wrote:
>
>> I have a mySQL database with 700,000 records in it, which are presently
>> keyed with an "auto-increment" field.
>>
>> What I'd like to do is create another field with a field where each and
>> every record number has a unique keyvalue. Example: "su5e23vlskd" for
>> records 1, and "34fdfdsglkdj4" for record 2. All that matters is that it's
>> unique, and isn't a number that can be guessed or an "autoincrement" number,
>> where a hacker can just figure out the keyvalue by incrementing numbers. It
>> doesn't matter to me if each keyvalue field is just numbers, or a
>> number/letter combination - - - all that matters is that each keyvalue field
>> is unique. Is there an automatic way that mySQL could do that, or would I
>> need to write a php script to somehow go through each record and create this
>> unique value?
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>update mytable set hash_field = md5(AutoIdField + unix_timestamp())
>
>--
>
>Bastien
>
>Cat, the other other white meat
>
--- End Message ---
--- Begin Message ---
If i had to guess, it would be the column/field in the table that has the
autoincrement value.
Tim-Hinnerk Heuer
http://www.ihostnz.com
On Tue, Dec 16, 2008 at 5:29 PM, Rob Gould <[email protected]> wrote:
>
>
> update mytable set hash_field = md5(AutoIdField + unix_timestamp())
>
> I _think_ I understand that - - - - but what does the "AutoldField"
> variable mean?
>
>
>
>
>
> On Monday, December 15, 2008, at 09:37PM, "Bastien Koert" <
> [email protected]> wrote:
> >On Mon, Dec 15, 2008 at 9:29 PM, Rob Gould <[email protected]> wrote:
> >
> >> I have a mySQL database with 700,000 records in it, which are presently
> >> keyed with an "auto-increment" field.
> >>
> >> What I'd like to do is create another field with a field where each and
> >> every record number has a unique keyvalue. Example: "su5e23vlskd" for
> >> records 1, and "34fdfdsglkdj4" for record 2. All that matters is that
> it's
> >> unique, and isn't a number that can be guessed or an "autoincrement"
> number,
> >> where a hacker can just figure out the keyvalue by incrementing numbers.
> It
> >> doesn't matter to me if each keyvalue field is just numbers, or a
> >> number/letter combination - - - all that matters is that each keyvalue
> field
> >> is unique. Is there an automatic way that mySQL could do that, or would
> I
> >> need to write a php script to somehow go through each record and create
> this
> >> unique value?
> >>
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >update mytable set hash_field = md5(AutoIdField + unix_timestamp())
> >
> >--
> >
> >Bastien
> >
> >Cat, the other other white meat
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
At 11:29 PM -0500 12/15/08, Rob Gould wrote:
update mytable set hash_field = md5(AutoIdField + unix_timestamp())
I _think_ I understand that - - - - but what does the "AutoldField"
variable mean?
He probably intends AutoIdField to be a stand-in for whatever your
current auto increment column is called. You probably want to create
a unique index -
http://dev.mysql.com/doc/refman/5.0/en/create-index.html
- on hash_value as well for (1) performance and (2) to ensure against
duplicate values (which are, admittedly, pretty unlikely).
Another alternative is to use the uuid() function -
http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_uuid
- instead of the md5() above, eg
update mytable set unique_field=uuid();
- steve
On Monday, December 15, 2008, at 09:37PM, "Bastien Koert"
<[email protected]> wrote:
On Mon, Dec 15, 2008 at 9:29 PM, Rob Gould <[email protected]> wrote:
I have a mySQL database with 700,000 records in it, which are presently
keyed with an "auto-increment" field.
What I'd like to do is create another field with a field where each and
every record number has a unique keyvalue. Example: "su5e23vlskd" for
records 1, and "34fdfdsglkdj4" for record 2. All that matters is that it's
unique, and isn't a number that can be guessed or an
"autoincrement" number,
where a hacker can just figure out the keyvalue by incrementing
numbers. It
doesn't matter to me if each keyvalue field is just numbers, or a
number/letter combination - - - all that matters is that each
keyvalue field
is unique. Is there an automatic way that mySQL could do that, or would I
need to write a php script to somehow go through each record and
create this
unique value?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
update mytable set hash_field = md5(AutoIdField + unix_timestamp())
--
Bastien
>Cat, the other other white meat
--
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg http://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center [email protected] |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+
--- End Message ---
--- Begin Message ---
I use md5(microtime());
--
Ondrej Kulaty
"Rob Gould" <[email protected]> píse v diskusním príspevku
news:[email protected]...
>I have a mySQL database with 700,000 records in it, which are presently
>keyed with an "auto-increment" field.
>
> What I'd like to do is create another field with a field where each and
> every record number has a unique keyvalue. Example: "su5e23vlskd" for
> records 1, and "34fdfdsglkdj4" for record 2. All that matters is that
> it's unique, and isn't a number that can be guessed or an "autoincrement"
> number, where a hacker can just figure out the keyvalue by incrementing
> numbers. It doesn't matter to me if each keyvalue field is just numbers,
> or a number/letter combination - - - all that matters is that each
> keyvalue field is unique. Is there an automatic way that mySQL could do
> that, or would I need to write a php script to somehow go through each
> record and create this unique value?
>
>
--- End Message ---
--- Begin Message ---
On Tue, 2008-12-16 at 07:35 +0100, Ondrej Kulaty wrote:
> I use md5(microtime());
I applaud the use of PHP on the "PHP" list... but I think the OP wants
an SQL query :)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
Hi Rob,
You can also use the PHP fonction Uniqid :
md5(uniqid(rand(),true));
http://fr3.php.net/manual/en/function.uniqid.php
Have a nice day.
Zeuf
Rob Gould a écrit :
I have a mySQL database with 700,000 records in it, which are presently keyed with an
"auto-increment" field.
What I'd like to do is create another field with a field where each and every record number has a unique keyvalue. Example: "su5e23vlskd" for records 1, and "34fdfdsglkdj4" for record 2. All that matters is that it's unique, and isn't a number that can be guessed or an "autoincrement" number, where a hacker can just figure out the keyvalue by incrementing numbers. It doesn't matter to me if each keyvalue field is just numbers, or a number/letter combination - - - all that matters is that each keyvalue field is unique. Is there an automatic way that mySQL could do that, or would I need to write a php script to somehow go through each record and create this unique value?
--- End Message ---