Re: [PHP] SMTP vs mail()

2008-01-15 Thread Per Jessen
Richard Lynch wrote: If there's any way to re-configure the MTA to queue the messages for later sending, that would save you a lot of overhead on the PHP end... The MTA will always queue the messages - well, that is certainly the case for postfix. /Per Jessen, Zürich -- PHP General

Re: [PHP] SMTP vs mail()

2008-01-15 Thread mike
i can vouch. postfix rocks. i send it non-stop 30,000+ emails at a time (a loop from a database that does a popen(/usr/sbin/sendmail) on the local machine (also postfix) which then relays it to my actual public smtp server (running postfix) - and it just throws it all into the queue and chews on

Re: [PHP] Closures in PHP

2008-01-15 Thread Jochem Maas
Nathan Nobbe schreef: when it comes to create_function(), id say its just as painful as building functions with html or writing queries by hand. namely, its prone to a lot of string escaping which produces awful hard to read code. i mean, the kind of code you write yourself and then look at a

Re: [PHP] Closures in PHP

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 6:51 AM, Jochem Maas [EMAIL PROTECTED] wrote: Nathan Nobbe schreef: when it comes to create_function(), id say its just as painful as building functions with html or writing queries by hand. namely, its prone to a lot of string escaping which produces awful hard to read

Re: [PHP] SimpleXML addChild() namespace problem

2008-01-15 Thread Nathan Nobbe
On Jan 14, 2008 11:21 PM, Carole E. Mah [EMAIL PROTECTED] wrote: Yes, I tried the following: http://us3.php.net/manual/en/function.dom-domdocument-createelementns.php Same results. based upon information from bug #43221, if you define the namespace beforehand it will work. ?php $xml =

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Richard Heyes
I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? Something like this: http://www.phpguru.org/date_preg/ ?php // Get this from where ever (format MM-DD-) echo

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to validate if there were 3 text input fields to collect the data, rather than 1, free-form field. -nathan

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Tom Chubb
On 15/01/2008, Adam Williams [EMAIL PROTECTED] wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 9:30 AM, Per Jessen [EMAIL PROTECTED] wrote: Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? A regular expression perhaps? you

[PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? A regular expression perhaps? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to validate if there were 3 text input fields to collect the data, rather than 1, free-form field. I would stick to one date field

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread clive
Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? explode() and checkdate() perhaps? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 10:02 AM, Per Jessen [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to validate if there were 3 text input fields to collect the data,

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 9:02 am, Per Jessen wrote: Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to validate if there were 3 text input fields to collect the data, rather than

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Daniel Brown
On Jan 15, 2008 10:38 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, January 15, 2008 9:02 am, Per Jessen wrote: Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about the best approach for collecting user data. it would be much easier to

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
Daniel Brown wrote: By only doing JavaScript validation, Just in case - I wasn't suggesting only doing javascript validation. I think I said a simple javascript validation _followed_ (as in at POST-time) by a semantic check. For which checkdate() seems pretty optimal. /Per Jessen,

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
clive wrote: Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? explode() and checkdate() perhaps? checkdate() sounds like just the thing. /Per

Re: [PHP] SimpleXML Bug question

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 12:34 am, Naz Gassiep wrote: What's the current status on this bug: http://bugs.php.net/bug.php?id=39164 Regardless of what the PHP developers say in those comments, the modification of data when it is read is not correct. If it is intended behavior, then the

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 10:46 AM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 15, 2008 10:38 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, January 15, 2008 9:02 am, Per Jessen wrote: Nathan Nobbe wrote: i think this ties into the thread tedd started a week or so ago about the

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Eric Butera
On Jan 15, 2008 9:27 AM, Adam Williams [EMAIL PROTECTED] wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] question about $_POST ['something'] array

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 1:27 am, Luká¹ Moravec wrote: I am trying to use a form and php in a same file and when I am using the form for the first time, Any $_POST index which I use in the form is not defined (which is logical)...how can I remove any warning about undefined index of $_POST

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 8:27 am, Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? Making the user type the 0 is just plain rude. :-) You could use a

Re: [PHP] Re: SMTP vs mail()

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 4:54 am, Stut wrote: Manuel Lemos wrote: Hello, on 01/14/2008 04:15 PM Richard Lynch said the following: If you have your sendmail equivalent program properly configured, no SMTP connection is used when queueing messages using the sendmail program. What about

Re: [PHP] MSSQL

2008-01-15 Thread Richard Lynch
On Tue, January 8, 2008 4:06 pm, Alexis wrote: I am pulling my hair out trying to set up PHP to connect to SQL Server. The office server, running Server 2003, has SQL Server on it. One of my computers is running XP with Apache 2.2 and PHP 5.2.3. Another one has Ubuntu Gusty Gibbon, Apache

Re: [PHP] Can't find .php3 files

2008-01-15 Thread Richard Lynch
If he's using a URL for the require: require 'http://exmaple.com/whatever.php3'; then Apache could be invovled. If it's just a plain file: require 'foo.php3'; then Apache is almost-for-sure not involved. I don't think PHP has ever had any kind of automated .php3 to .php converter for

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
Thanks, I think I have it: $dateexplode = explode(-, $_POST[date_entered]); if (!preg_match(/^(\d{2})$/, $dateexplode[0],$data1) || !preg_match(/^(\d{2})$/, $dateexplode[1],$data2) || !preg_match(/^(\d{4})$/, $dateexplode[2],$data3)) { die (you have entered an invalid date);

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-15 Thread Richard Lynch
On Tue, January 8, 2008 3:40 pm, Jack Mays wrote: funnily enough exit is even listed as a function. Sure it is: http://us2.php.net/manual/en/function.exit.php Unless I'm missing a point here or something. :) Technically, exit is language construct and not a function. It does not

Re: [PHP] Freebsd 6.2 amd64 PHP 5.2.5 Internal Server Error

2008-01-15 Thread Richard Lynch
Start looking here for info on how to generate a backtrace and get debugging info: http://bugs.php.net/ You probably have found an actual bug, and can help to get it fixed by documenting what blows up. On Mon, January 14, 2008 4:17 pm, Anjan Upadhya wrote: Hello, I have a freebsd 6.2 server

Re: [PHP] Can a php script authorize itself to a digest auth protected server?

2008-01-15 Thread Richard Lynch
http://php.net/curl Ask the user for the name/password up front, and be done with it. On Tue, January 8, 2008 4:56 pm, Steven Stromer wrote: Hi, I'm trying to edit a php application that generates postscript files from html pages pages, html2ps/pdf (http://www.tufat.com/ script19.htm), to

Re: [PHP] [FCK 2.5.1] - forbidden error 403 - XML request error

2008-01-15 Thread Richard Lynch
Perhaps you just added a / at the front of the URL where it doesn't belong... You almost for sure don't have an /fckeditor directory at the root of your hard drive... On Tue, January 8, 2008 3:53 pm, TS wrote: Hello, Any help would be immensely appreciated. Clicking on the Image upload

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Andrew Ballard
On Jan 15, 2008 11:25 AM, Adam Williams [EMAIL PROTECTED] wrote: Thanks, I think I have it: $dateexplode = explode(-, $_POST[date_entered]); if (!preg_match(/^(\d{2})$/, $dateexplode[0],$data1) || !preg_match(/^(\d{2})$/, $dateexplode[1],$data2) || !preg_match(/^(\d{4})$/,

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Per Jessen
Adam Williams wrote: Thanks, I think I have it: $dateexplode = explode(-, $_POST[date_entered]); if (!preg_match(/^(\d{2})$/, $dateexplode[0],$data1) || !preg_match(/^(\d{2})$/, $dateexplode[1],$data2) || !preg_match(/^(\d{4})$/, $dateexplode[2],$data3)) { die (you have

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
Andrew Ballard wrote: Just curious why you won't take 1-15-2008. Once you validate it, you can always assign it to a variable as either a timestamp or a DateTime object and then format it however you want when you display it, send it to a database, or whatever you are doing with the date.

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Daniel Brown
On Jan 15, 2008 11:51 AM, Adam Williams [EMAIL PROTECTED] wrote: Andrew Ballard wrote: Just curious why you won't take 1-15-2008. Once you validate it, you can always assign it to a variable as either a timestamp or a DateTime object and then format it however you want when you display

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Andrew Ballard
On Jan 15, 2008 11:51 AM, Adam Williams [EMAIL PROTECTED] wrote: Andrew Ballard wrote: Just curious why you won't take 1-15-2008. Once you validate it, you can always assign it to a variable as either a timestamp or a DateTime object and then format it however you want when you display

[PHP] Re: New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-15 Thread Colin Guthrie
Richard Lynch wrote: On Tue, January 8, 2008 3:40 pm, Jack Mays wrote: funnily enough exit is even listed as a function. Sure it is: http://us2.php.net/manual/en/function.exit.php Unless I'm missing a point here or something. :) Technically, exit is language construct and not a

Re: [PHP] First stupid post of the year. [SOLVED]

2008-01-15 Thread Richard Lynch
On Sat, January 5, 2008 4:04 pm, Nisse Engström wrote: On Sat, 5 Jan 2008 01:08:13 -0500, tedd wrote: At 1:41 AM +0100 1/5/08, Nisse Engström wrote: On Fri, 4 Jan 2008 09:16:54 -0500, tedd wrote: At 10:33 AM +0100 1/4/08, Nisse Engström wrote: On Thu, 3 Jan 2008 12:39:36 -0500, tedd

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Jim Lucas
Adam Williams wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? $utime = strtotime($_POST['input']); if ( $utime !== false $_POST['input'] == date('m-d-Y',

Re: [PHP] Closures in PHP

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 7:31 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: when i said a function would have to be loaded into the interpreter to avoid a runtime error upon invocation, i didnt mention that its best to programatically verify it can be called before letting the runtime error occur (of

[PHP] calling java within php setup?

2008-01-15 Thread Janet N
I'm trying to call java within php. I have JAVA JRE 1.6 installed. The php I'm using is distributed by our partner so I couldn't configure it to use JAVA. I've modified the php.ini file to add the JRE path to it: java.class.path=/usr/java/jre1.6.0_01 java.home=/usr/java/jre1.6.0_01/bin

Re: [PHP] PHP SOAP Client formats

2008-01-15 Thread Michael Gross
Hi I have a similar problem, only the other way round: the server is PHP, the client is C#. I found that the problem is that the xmlns=https://api.authorize.net/soap/v1/; in the AuthenticateTest-tag is needed. I tried to modify the PHP source code, but I had no success yet (it would be

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 1:31 PM, Adam Williams [EMAIL PROTECTED] wrote: Andrew Ballard wrote: All the more reason I would turn it into a timestamp or DateTime object in PHP first. That will prevent trying to insert something like what I used above. Then I would get rid of the MySQL STR_TO_DATE

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Brady Mitchell
I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? Why not use something like http://www.dynarch.com/projects/calendar/ to make it easier for the users? Along with being

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Andrew Ballard
On Jan 15, 2008 1:31 PM, Adam Williams [EMAIL PROTECTED] wrote: Andrew Ballard wrote: All the more reason I would turn it into a timestamp or DateTime object in PHP first. That will prevent trying to insert something like what I used above. Then I would get rid of the MySQL STR_TO_DATE

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
Andrew Ballard wrote: All the more reason I would turn it into a timestamp or DateTime object in PHP first. That will prevent trying to insert something like what I used above. Then I would get rid of the MySQL STR_TO_DATE function in the $mysqli_insert_sql value just replace it with something

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Andrew Ballard
On Jan 15, 2008 2:05 PM, Brady Mitchell [EMAIL PROTECTED] wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? Why not use something like

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Nathan Nobbe
On Jan 15, 2008 2:24 PM, Andrew Ballard [EMAIL PROTECTED] wrote: On Jan 15, 2008 2:05 PM, Brady Mitchell [EMAIL PROTECTED] wrote: I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of

Re: [PHP] calling java within php setup?

2008-01-15 Thread Stut
Janet N wrote: I've wrote a Basic java within php, but I get error: Fatal error: Class 'Java' not found. What am I missing? Can I import java in php? Have you installed it? From the manual page for the Java extension... This » PECL extension is not bundled with PHP. -Stut --

Re: [PHP] calling java within php setup?

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 12:39 pm, Janet N wrote: I'm trying to call java within php. I have JAVA JRE 1.6 installed. The php I'm using is distributed by our partner so I couldn't configure it to use JAVA. Modifying php.ini doesn't get the Java extension installed. They have to PECL install

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 12:31 pm, Adam Williams wrote: Andrew Ballard wrote: I don't see the point in needing to convert it to a timestamp. The length_start and length_end fields in MySQL are defined as date fields. All I care about is the date, not the hours/minutes/seconds. If I insert

Re: [PHP] Re: SMTP vs mail()

2008-01-15 Thread Manuel Lemos
Hello, on 01/15/2008 08:54 AM Stut said the following: If you have your sendmail equivalent program properly configured, no SMTP connection is used when queueing messages using the sendmail program. What about when you take into consideration this program could be sending 1000's of emails,

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Andrew Ballard
On Jan 15, 2008 2:38 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, January 15, 2008 12:31 pm, Adam Williams wrote: Andrew Ballard wrote: I don't see the point in needing to convert it to a timestamp. The length_start and length_end fields in MySQL are defined as date fields. All I

Re: [PHP] Re: SMTP vs mail()

2008-01-15 Thread Manuel Lemos
Hello, on 01/15/2008 01:41 PM Richard Lynch said the following: If you have your sendmail equivalent program properly configured, no SMTP connection is used when queueing messages using the sendmail program. What about when you take into consideration this program could be sending 1000's

Re: [PHP] calling java within php setup?

2008-01-15 Thread Janet N
Hi Richard, They didn't installed PECL. Is there a way to installed just PECL and not overwrite their php configuration? I noticed when I went to the PECL link I didn't see a PECL package download, but I had to search for packages I wanted to install, what am I looking for? Thanks! On Jan 15,

[PHP] How to take video embed codes and change all their widths/heights?

2008-01-15 Thread Rob Gould
Can anytime give me some insights on how to write a PHP script that could accept any of the below strings below and edit the strings to change their width and height settings dynamically? For instance, if I want all embedded videos to have a width of 320, and a height of 240, using PHP's

Re: [PHP] How to take video embed codes and change all their widths/heights?

2008-01-15 Thread Daniel Brown
On Jan 15, 2008 5:25 PM, Rob Gould [EMAIL PROTECTED] wrote: Can anytime give me some insights on how to write a PHP script that could accept any of the below strings below and edit the strings to change their width and height settings dynamically? For instance, if I want all embedded videos

Re: [PHP] SMTP vs mail()

2008-01-15 Thread Manuel Lemos
Hello, on 01/15/2008 07:16 AM Per Jessen said the following: If there's any way to re-configure the MTA to queue the messages for later sending, that would save you a lot of overhead on the PHP end... The MTA will always queue the messages - well, that is certainly the case for postfix.

Re: [PHP] SMTP vs mail()

2008-01-15 Thread Chris
Manuel Lemos wrote: Hello, on 01/15/2008 07:16 AM Per Jessen said the following: If there's any way to re-configure the MTA to queue the messages for later sending, that would save you a lot of overhead on the PHP end... The MTA will always queue the messages - well, that is certainly the

Re: [PHP] calling java within php setup?

2008-01-15 Thread Jochem Maas
Janet N schreef: Hi Richard, They didn't installed PECL. Is there a way to installed just PECL and not overwrite their php configuration? pecl is a wrapper/package manager for building/installing php extensions. I believe you can install it by following the guidelines for installing pear:

Re: [PHP] How to take video embed codes and change all their widths/heights?

2008-01-15 Thread Jochem Maas
Daniel Brown schreef: .. $embed_code = preg_replace('/height=([0-9]*)/U','height='.$height.'',preg_replace('/width=([0-9]*)/U','width='.$width.'',$embed_code)); I wouldn't have given him the complete regexp - how will they ever learn. :-) BUT $embed_code = preg_replace(

Re: [PHP] New years resolution: To get serious with my programming! Anyone wanna help? :)

2008-01-15 Thread Jochem Maas
Richard Lynch schreef: On Tue, January 8, 2008 3:40 pm, Jack Mays wrote: funnily enough exit is even listed as a function. Sure it is: http://us2.php.net/manual/en/function.exit.php Unless I'm missing a point here or something. :) Technically, exit is language construct and not a

[PHP] Encryption failing

2008-01-15 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Hey --- - - I am in the process of upgrading the encryption technology I am using from (64 bit) blowfish to (256 bit) rijndael. The code (and some explanations) is below, but the results are, um, unusual, and I can't see what I am doing wrong. For testing, I have a program that generates

Re: [PHP] Encryption failing

2008-01-15 Thread Casey
On Jan 15, 2008, at 4:54 PM, Ken Kixmoeller -- reply to [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey --- - - I am in the process of upgrading the encryption technology I am using from (64 bit) blowfish to (256 bit) rijndael. The code (and some explanations) is below, but the results

[PHP] [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
I wrote a class to send mail by remote mail server. But it was failed. So I captured the network packets by tcpdump, and found that there is a strange packet NOOP was sent. But in the source code I mean to send command DATA. I don't know why a NOOP packet was sent instead. Here is my php source

Re: [PHP] Encryption failing

2008-01-15 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
On Jan 15, 2008, at 7:06 PM, Casey wrote: Maybe you could echo the results of the failed ones and compare. I did that at first, thinking that something about these strings might cause the problem. But then I realized: I can't blame the data. I don't have any control over what users use

RE: [PHP] Encryption failing

2008-01-15 Thread Bastien Koert
are you base64 encoding the resultant encryption string? I have found that there are problems with certain characters that can result from the encryption, usually a combination of characters that approximate a null or end of line bastien From: [EMAIL PROTECTED] Date: Tue, 15 Jan 2008 21:41:45

[PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 01:38 AM Wang Chen said the following: I wrote a class to send mail by remote mail server. But it was failed. So I captured the network packets by tcpdump, and found that there is a strange packet NOOP was sent. But in the source code I mean to send command DATA. I don't

Re: [PHP] [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
Wang Chen said the following on 2008-1-16 11:38: I wrote a class to send mail by remote mail server. But it was failed. So I captured the network packets by tcpdump, and found that there is a strange packet NOOP was sent. But in the source code I mean to send command DATA. I don't know why a

[PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
Manuel Lemos said the following on 2008-1-16 11:55: Maybe you are accessing a SMTP server with a grey listing or anti-spam/anti-virus frontend that sits on the front of the actual SMTP server and only passes information to the backend server when it is ready. It is possible that your message

Re: [PHP] Encryption failing

2008-01-15 Thread mike
me too - it was a space. i changed it to + and it worked fine. $cookie = str_replace(' ', '+', $_COOKIE['foo']); On 1/15/08, Bastien Koert [EMAIL PROTECTED] wrote: are you base64 encoding the resultant encryption string? I have found that there are problems with certain characters that can

RE: [PHP] Encryption failing

2008-01-15 Thread Andrés Robinet
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 12:55 AM To: Ken Kixmoeller -- reply to [EMAIL PROTECTED]; php- [EMAIL PROTECTED] Subject: RE: [PHP] Encryption failing are you base64 encoding the resultant encryption string? I

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread mike
Why not look at phpmailer? Probably more robust than some random classes. http://phpmailer.codeworxtech.com/ Not to bash on Manuel, but I find phpclasses to be littered with lots of crappy code and is too ad-laden and hard to use for me to bother. On 1/15/08, Wang Chen [EMAIL PROTECTED] wrote:

Re: [PHP] Encryption failing

2008-01-15 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
On Jan 15, 2008, at 11:08 PM, Andrés Robinet wrote: -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 12:55 AM To: Ken Kixmoeller -- reply to [EMAIL PROTECTED]; php- [EMAIL PROTECTED] Subject: RE: [PHP] Encryption failing are you

Re: [PHP] Encryption failing

2008-01-15 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
On Jan 15, 2008, at 11:08 PM, Andrés Robinet wrote: I second that, you should base64 encode values before encrypting and base64 decode them after decrypting to be safe. Thanks for the idea. Like this? Fails 500/500 times on my test. if ($EorD == D)

Re: [PHP] Encryption failing

2008-01-15 Thread Ken Kixmoeller.com
On Jan 15, 2008, at 11:08 PM, Andrés Robinet wrote: I second that, you should base64 encode values before encrypting and base64 decode them after decrypting to be safe. Thanks for the idea. Like this? Fails 500/500 times on my test. if ($EorD == D) {

Re: [PHP] Encryption failing

2008-01-15 Thread Casey
On Jan 15, 2008 8:40 PM, Ken Kixmoeller -- reply to [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jan 15, 2008, at 11:08 PM, Andrés Robinet wrote: I second that, you should base64 encode values before encrypting and base64 decode them after decrypting to be safe. Thanks for the idea.

Re: [PHP] Encryption failing

2008-01-15 Thread mike
if ($EorD == D) { $text_out = mdecrypt_generic($cypher,$text); $text = base64_decode($text); shouldn't this be base64_decode($text_out) ? :) } else { $text= base64_encode($text); $text_out = mcrypt_generic($cypher,$text);

[PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 02:00 AM Wang Chen said the following: Maybe you are accessing a SMTP server with a grey listing or anti-spam/anti-virus frontend that sits on the front of the actual SMTP server and only passes information to the backend server when it is ready. It is possible that your

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 02:11 AM mike said the following: Why not look at phpmailer? Probably more robust than some random classes. I did not suggest any random classes. I developed those classes since 1999 and I know they work reliably because they are used by me and tens of thousands of users

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread mike
This list is democratic as well. Personal experience has led me there from many Google queries, and none of the code has been usable. I give you props for creating a site and classes on it and such, but this list is for people to ask and share opinions. I said it was not to badmouth you but my

RE: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Andrés Robinet
-Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 1:11 AM To: Wang Chen Cc: php-general@lists.php.net Subject: Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA Why not look at phpmailer? Probably more robust than some random

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 02:11 AM mike said the following: Why not look at phpmailer? Probably more robust than some random classes. I did not suggest any random classes. I developed those classes since 1999 and I know they work reliably because they are used by me and tens of thousands of users

[PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
Manuel Lemos said the following on 2008-1-16 13:14: But it's strange that php should send a DATA command out, but tcpdump didn't capture this packet. :( I don't know why you are using tcpdump, but maybe you are only capturing a network interface that is not the one that your code used to

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 03:25 AM mike said the following: This list is democratic as well. Personal experience has led me there from many Google queries, and none of the code has been usable. That does not give you the right to generalize and call all the code in the site crappy, including the

[PHP] re[PHP] gister_globals

2008-01-15 Thread tbt
Hi, I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:- index.php). Is there any way of doing this. Thanks -- View this message in context: http://www.nabble.com/register_globals-tp14868899p14868899.html Sent from the PHP - General mailing list

RE: [PHP] Encryption failing

2008-01-15 Thread Andrés Robinet
-Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 1:49 AM To: Ken Kixmoeller -- reply to [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Encryption failing if ($EorD == D) {

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread mike
On 1/15/08, Manuel Lemos [EMAIL PROTECTED] wrote: You are missing my point. One thing is disliking somebody's work for whatever reasons, another this is acting disrespectfully and call it crappy in a public forum. If you don't know how to act respectfully with other PHP developers, I have

Re: [PHP] Encryption failing

2008-01-15 Thread mike
On 1/15/08, Andrés Robinet [EMAIL PROTECTED] wrote: 1 - Mike is right about first encrypting and then doing a base64_encode (then saving results to DB, cookies, etc). I don't know why replacing to + for decrypting, though. we have an application which sets an encrypted cookie in .NET, and

RE: [PHP] re[PHP] gister_globals

2008-01-15 Thread Andrés Robinet
-Original Message- From: tbt [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 3:22 AM To: php-general@lists.php.net Subject: [PHP] re[PHP] gister_globals Hi, I'm a newbie to php and i would like to set register_globals to 'on' from my php script itself(eg:-

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
mike said the following on 2008-1-16 12:11: Why not look at phpmailer? Probably more robust than some random classes. http://phpmailer.codeworxtech.com/ Thanks Mike. I will try both and tell you guys I like which one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Closures in PHP

2008-01-15 Thread Larry Garfield
On Tuesday 15 January 2008, Nathan Nobbe wrote: when i said a function would have to be loaded into the interpreter to avoid a runtime error upon invocation, i didnt mention that its best to programatically verify it can be called before letting the runtime error occur (of course you can let

[PHP] Scripts are fast locally, but slow on remote server

2008-01-15 Thread Dave M G
PHP list, I have a set of PHP scripts that seem to be efficient and quick enough both on my home testing environment, and a few different web-hosting services I use. However, on one particular web-hosting service, there is often a very painful 10 second (!) lag when first loading up the

[PHP] Re: re[PHP] gister_globals

2008-01-15 Thread tbt
Hi I have two php files as follows session_register.php // sets the value of $refString ?php session_start(); session_register(refString); $refString = $_GET['refNo']; ? and session_data.php // retrieves the value of $refString ?php session_start(); echo $refString; ? This code works fine

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-15 Thread Per Jessen
Dave M G wrote: PHP list, I have a set of PHP scripts that seem to be efficient and quick enough both on my home testing environment, and a few different web-hosting services I use. However, on one particular web-hosting service, there is often a very painful 10 second (!) lag when

Re: [PHP] Re: re[PHP] gister_globals

2008-01-15 Thread Chris
tbt wrote: Hi I have two php files as follows session_register.php // sets the value of $refString ?php session_start(); session_register(refString); $refString = $_GET['refNo']; ? $_SESSION['refString'] = $_GET['refNo']; and session_data.php // retrieves the value of $refString ?php

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-15 Thread Dave M G
Per Jessen, Thank you for responding. Might this be a name-server issue? Maybe, but I don't think so. The reason I suspect that is not the case is because I can go first to a .html page on the server, and it loads up quickly. Then I go to one of my .php pages, and the slowdown occurs. If

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-15 Thread Chris
Dave M G wrote: Per Jessen, Thank you for responding. Might this be a name-server issue? Maybe, but I don't think so. The reason I suspect that is not the case is because I can go first to a .html page on the server, and it loads up quickly. Then I go to one of my .php pages, and the

Re: [PHP] Scripts are fast locally, but slow on remote server

2008-01-15 Thread Per Jessen
Dave M G wrote: Per Jessen, Thank you for responding. Might this be a name-server issue? Maybe, but I don't think so. The reason I suspect that is not the case is because I can go first to a .html page on the server, and it loads up quickly. Then I go to one of my .php pages, and the