php-general Digest 4 Jul 2011 19:03:53 -0000 Issue 7389

Topics (messages 313855 through 313866):

Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL
        313855 by: Stuart Dallas

Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL
        313856 by: Karl DeSaulniers

Re: PHP EOL
        313857 by: Tim Streater

Re: [PHP-DB] Re: [PHP] PHP EOL
        313858 by: Karl DeSaulniers

Re: vend-bot?
        313859 by: Robert Cummings

Installing PHP
        313860 by: Jim Giner
        313861 by: Richard Quadling
        313862 by: Alejandro Michelin Salomon (Hotmail)
        313863 by: Chris Stinemetz
        313864 by: Shawn McKenzie
        313865 by: Jim Giner

Re: Would like to subscribe to this mailing list
        313866 by: Jim Lucas

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers <k...@designdrumm.com>wrote:

> Hello Stuart,
> After some closer look at the RFC Compliant manuals you suggested,
> I have determined that the creator of that code was in fact RFC821
> Compliant.
> Being that this was a code I found several years ago, RFC822 may not have
> been in effect.
> This being the reason (I believe) that the creator went with a check for
> System OS when determining the end of line characters to use.
> Not substantiated in any way, but that is what it looks like to me. I could
> stand corrected.
>

RFC821: Simple Mail Transfer Protocol, dated August 1982 (
http://www.faqs.org/rfcs/rfc821.html)

RFC822: Standard for the Format of ARPA Internet Text Messages, dated August
13, 1982 (http://www.faqs.org/rfcs/rfc822.html)

So, unless you started using that code before PHP was created (1995 if we go
back as far as PHP/FI) then no, RFC822 predates that snippet of code.

Further, RFC821 defines the end of lines as CRLF, so the creator of that
code was not RFC821 compliant if it was being used to send commands to an
SMTP server.

>From RFC821, MAIL FROM command definition: MAIL <SP> FROM:<reverse-path>
<CRLF>

>From RFC822, general header field definition: field = field-name ":" [
field-body ] CRLF

Note the CRLF at the end of both definitions.

Now, technically speaking the body of email messages can use any line
endings they want to, but the headers should use CRLF, and commands sent to
servers should also use CRLF.

One final thing for you to consider... what we've been talking about is
commands and messages being sent to other computers, so what good does it do
to send them in a format that's dependent on the OS of the sending machine?
The standards exist so they are OS-independant, because you usually cannot
tell what OS the computer you're talking to is running.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
@Stuart
Ah, then you are right that they were not compliant. The code is not that old. Thank you so much for the links and information too. Much more than I expected. I did not know that they were sent OS-Independent, but that makes perfect sense.
Again, please excuse my lack of understanding.
My thought on why I would still use the code was that even though the SMTP server would not be OS specific, the email program or browser would be and that it would format
for the user depending on that program/browser and the OS it runs on.
IE: Thunderbird on PC or Mac Mail; viewing yahoo on Safari Mac or IE on PC.

Technically speaking, is it not possible to determine with a if {} to see which catches? This is probably not the best way to go about formating, just more for my intuit. With that code, I did not get any bounce backs or messages pertaining to ill formatting or "no send no show".
So it didn't seem to be a bad code. Thus I continued use.
But like what was said earlier in the thread, I agree PHP_EOL would be the best fit.

Thank you for all your input, help and resources.

Best,
Karl

On Jul 4, 2011, at 2:01 AM, Stuart Dallas wrote:

On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers <k...@designdrumm.com>wrote:

Hello Stuart,
After some closer look at the RFC Compliant manuals you suggested,
I have determined that the creator of that code was in fact RFC821
Compliant.
Being that this was a code I found several years ago, RFC822 may not have
been in effect.
This being the reason (I believe) that the creator went with a check for
System OS when determining the end of line characters to use.
Not substantiated in any way, but that is what it looks like to me. I could
stand corrected.


RFC821: Simple Mail Transfer Protocol, dated August 1982 (
http://www.faqs.org/rfcs/rfc821.html)

RFC822: Standard for the Format of ARPA Internet Text Messages, dated August
13, 1982 (http://www.faqs.org/rfcs/rfc822.html)

So, unless you started using that code before PHP was created (1995 if we go
back as far as PHP/FI) then no, RFC822 predates that snippet of code.

Further, RFC821 defines the end of lines as CRLF, so the creator of that code was not RFC821 compliant if it was being used to send commands to an
SMTP server.

From RFC821, MAIL FROM command definition: MAIL <SP> FROM:<reverse- path>
<CRLF>

From RFC822, general header field definition: field = field-name ":" [
field-body ] CRLF

Note the CRLF at the end of both definitions.

Now, technically speaking the body of email messages can use any line
endings they want to, but the headers should use CRLF, and commands sent to
servers should also use CRLF.

One final thing for you to consider... what we've been talking about is commands and messages being sent to other computers, so what good does it do to send them in a format that's dependent on the OS of the sending machine? The standards exist so they are OS-independant, because you usually cannot
tell what OS the computer you're talking to is running.

-Stuart

--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

Karl DeSaulniers
Design Drumm
http://designdrumm.com


--- End Message ---
--- Begin Message ---
On 04 Jul 2011 at 08:01, Stuart Dallas <stu...@3ft9.com> wrote: 

> On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers <k...@designdrumm.com>wrote:
>
>> Hello Stuart,
>> After some closer look at the RFC Compliant manuals you suggested,
>> I have determined that the creator of that code was in fact RFC821
>> Compliant.
>> Being that this was a code I found several years ago, RFC822 may not have
>> been in effect.
>> This being the reason (I believe) that the creator went with a check for
>> System OS when determining the end of line characters to use.
>> Not substantiated in any way, but that is what it looks like to me. I could
>> stand corrected.
>>
>
> RFC821: Simple Mail Transfer Protocol, dated August 1982 (
> http://www.faqs.org/rfcs/rfc821.html)
>
> RFC822: Standard for the Format of ARPA Internet Text Messages, dated August
> 13, 1982 (http://www.faqs.org/rfcs/rfc822.html)

There are more recent RFCs than these. RFC822 was obsoleted by RFC2822, for 
example, which was itself obsoleted by RFC 5322. See here:

http://tools.ietf.org/html/rfc5322

I always use this site for looking at RFCs as every line in the contents of an 
RFC is an internal link which makes finding things in the RFC rather easier. 
The following list of RFCs is the set I consulted when writing my own email 
client:

a)  RFC 5034 POP3
b)  RFC 2821 SMTP
c)  RFC 5322 Internet Message Format
d)  RFC 2045, 2046, 2047, 2048, 2049, (MIME), and 2183


--
Cheers  --  Tim

--- End Message ---
--- Begin Message ---

On Jul 4, 2011, at 2:34 AM, Tim Streater wrote:

On 04 Jul 2011 at 08:01, Stuart Dallas <stu...@3ft9.com> wrote:

On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers <k...@designdrumm.com>wrote:

Hello Stuart,
After some closer look at the RFC Compliant manuals you suggested,
I have determined that the creator of that code was in fact RFC821
Compliant.
Being that this was a code I found several years ago, RFC822 may not have
been in effect.
This being the reason (I believe) that the creator went with a check for
System OS when determining the end of line characters to use.
Not substantiated in any way, but that is what it looks like to me. I could
stand corrected.


RFC821: Simple Mail Transfer Protocol, dated August 1982 (
http://www.faqs.org/rfcs/rfc821.html)

RFC822: Standard for the Format of ARPA Internet Text Messages, dated August
13, 1982 (http://www.faqs.org/rfcs/rfc822.html)

There are more recent RFCs than these. RFC822 was obsoleted by RFC2822, for example, which was itself obsoleted by RFC 5322. See here:

http://tools.ietf.org/html/rfc5322

I always use this site for looking at RFCs as every line in the contents of an RFC is an internal link which makes finding things in the RFC rather easier. The following list of RFCs is the set I consulted when writing my own email client:

a)  RFC 5034 POP3
b)  RFC 2821 SMTP
c)  RFC 5322 Internet Message Format
d)  RFC 2045, 2046, 2047, 2048, 2049, (MIME), and 2183


--
Cheers  --  Tim

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Thank you for that Tim!

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com


--- End Message ---
--- Begin Message ---
On 11-07-03 04:17 PM, Kirk Bailey wrote:
ok, here's the deal; we sent someone to the paypal site for their
purchase; the site will use the palpal shopping cart. When they come
back, there needs to be a way to identify the product and the
transaction so they an get the product ONCE. Now for a single
purchase, we can just send them to (productname)thankyou.php and
attach a magic cookie to the url as a query string. this magic
cookie can only be used once. THIS WILL NOT WORK IF WE USE THE FULL
SHOPPING CART AND THERE IS MORE THAN ONE PRODUCT TO DOWNLOAD, it
only works with a buynow button for one only product.

This kind of functionality, if worked out in detail, will lend
itself to being adapted to MANY sorts of Eproducts, so I think
there's an arguement to be made that this is of benefit to a
significant segment of the php community. Well, at th4est them of us
who like to get paid reliably, and not get ripped off.

Isn't this broken from the get-go? You don't know for certain that they made the purchase until you get the IPN and verify the IPN. This is why many sites send a URL once the transaction clears.

A ROUGH STAB AT HOW TO DO IT FOR SINGLE ITEMS
As for one time only with buynow buttons:
Send the customer to paypal with a cookie from the top of a list.
When they come back, read the list's first entry. If it's there,
make the download link available. the download is in a secured
directory, a la Apache's directory securing methods. GIVE THEM THE
PASSWORD. The user name is the magic cookie; tell them this. When
they go to that page, apache demands the user name and password,
which they give, and the page then (thanks to the query string
having the item name) makes a download link available. This page
also deletes that magic cookie from the list of them,so it can never
be used again.

This is also broken... once logged in I can change the name of the item to download. At the very least add a salted MD5 or SHA1 verification to the URL.

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---
--- Begin Message ---
Hi all,
(Hopefully I posted this in a place that can/will help me)

I got curious about running php / apache on my own laptop in order to help
my devl process, instead of writing, uploading and testing on my site.

Found a nice pair of docs from "thesitewizard.com" that appeared to be
pretty well-written instructions on installing each of these systems.  btw-
I'm running XpSp2.  Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per the
recommendations.

Went thru all instructions step-by-step, testing all the way.  Apache
works - PHP doesn't.  When I bring up IE and type in localhost I get the
default apache page as I was told I should see.  When I type
"localhost/test.php" I get a windows dialog asking what program should run
the php script.

In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
got the expected result from my script - so PHP works.

End result - they each work separately, but php is not working under apache.

As part of the docs instructions I added the following code to the apache
conf file:

1 - I chose the "configure apache to run php as an apache module.
2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
those lines
3 - added "AddType application/x-httpd-php .php" as the last of those lines
4 - added "PHPIniDir "c:/php" as the last line of the conf file.

Upon adding these lines apache will no longer restart.  In fact adding any
ONE of these lines breaks Apache.

Ideas welcome.

And for those who still love the USofA, Happy Independence Day!





--- End Message ---
--- Begin Message ---
On 4 July 2011 13:39, Jim Giner <jim.gi...@albanyhandball.com> wrote:
> Hi all,
> (Hopefully I posted this in a place that can/will help me)
>
> I got curious about running php / apache on my own laptop in order to help
> my devl process, instead of writing, uploading and testing on my site.
>
> Found a nice pair of docs from "thesitewizard.com" that appeared to be
> pretty well-written instructions on installing each of these systems.  btw-
> I'm running XpSp2.  Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per the
> recommendations.
>
> Went thru all instructions step-by-step, testing all the way.  Apache
> works - PHP doesn't.  When I bring up IE and type in localhost I get the
> default apache page as I was told I should see.  When I type
> "localhost/test.php" I get a windows dialog asking what program should run
> the php script.
>
> In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
> got the expected result from my script - so PHP works.
>
> End result - they each work separately, but php is not working under apache.
>
> As part of the docs instructions I added the following code to the apache
> conf file:
>
> 1 - I chose the "configure apache to run php as an apache module.
> 2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
> those lines
> 3 - added "AddType application/x-httpd-php .php" as the last of those lines
> 4 - added "PHPIniDir "c:/php" as the last line of the conf file.
>
> Upon adding these lines apache will no longer restart.  In fact adding any
> ONE of these lines breaks Apache.
>
> Ideas welcome.

Do you have to use Apache? I use Abyss (closed source) or LightTPD
(open source) are both good options. Really tiny and I feel a lot
easier to install. Especially Abyss.

Both would use cgi-fastcgi and be NTS.



-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--- End Message ---
--- Begin Message ---
Jim:
In my Windows the install adds the lines :

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\PHP\"
LoadModule php5_module "C:\PHP\php5apache2_2.dll"

AddHandler application/x-httpd-php .php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

Where is the apache version that you install?

I have the apache 2.2.17

This " php5apache2.dll " is for the version 2.0.x
And this " php5apache2_2.dll " for the version 2.2.x

Maybe the dll files is in the brong version.

Alejandro M.S.

-----Mensagem original-----
De: Jim Giner [mailto:jim.gi...@albanyhandball.com] 
Enviada em: segunda-feira, 4 de julho de 2011 09:40
Para: php-gene...@lists.php.net
Assunto: [PHP] Installing PHP

Hi all,
(Hopefully I posted this in a place that can/will help me)

I got curious about running php / apache on my own laptop in order to help
my devl process, instead of writing, uploading and testing on my site.

Found a nice pair of docs from "thesitewizard.com" that appeared to be
pretty well-written instructions on installing each of these systems.  btw-
I'm running XpSp2.  Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per the
recommendations.

Went thru all instructions step-by-step, testing all the way.  Apache
works - PHP doesn't.  When I bring up IE and type in localhost I get the
default apache page as I was told I should see.  When I type
"localhost/test.php" I get a windows dialog asking what program should run
the php script.

In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
got the expected result from my script - so PHP works.

End result - they each work separately, but php is not working under apache.

As part of the docs instructions I added the following code to the apache
conf file:

1 - I chose the "configure apache to run php as an apache module.
2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
those lines
3 - added "AddType application/x-httpd-php .php" as the last of those lines
4 - added "PHPIniDir "c:/php" as the last line of the conf file.

Upon adding these lines apache will no longer restart.  In fact adding any
ONE of these lines breaks Apache.

Ideas welcome.

And for those who still love the USofA, Happy Independence Day!





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Jim,

What is your server root set up too? I would put the apache configuration
back to the way it was and then place php script with phpinfo() function in
it. Try to run it and see if that works.

HTH,

Chris
On Jul 4, 2011 8:14 AM, "Alejandro Michelin Salomon (Hotmail)" <
amichel...@hotmail.com> wrote:
> Jim:
> In my Windows the install adds the lines :
>
> #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
> PHPIniDir "C:\PHP\"
> LoadModule php5_module "C:\PHP\php5apache2_2.dll"
>
> AddHandler application/x-httpd-php .php
> #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
>
> Where is the apache version that you install?
>
> I have the apache 2.2.17
>
> This " php5apache2.dll " is for the version 2.0.x
> And this " php5apache2_2.dll " for the version 2.2.x
>
> Maybe the dll files is in the brong version.
>
> Alejandro M.S.
>
> -----Mensagem original-----
> De: Jim Giner [mailto:jim.gi...@albanyhandball.com]
> Enviada em: segunda-feira, 4 de julho de 2011 09:40
> Para: php-gene...@lists.php.net
> Assunto: [PHP] Installing PHP
>
> Hi all,
> (Hopefully I posted this in a place that can/will help me)
>
> I got curious about running php / apache on my own laptop in order to help
> my devl process, instead of writing, uploading and testing on my site.
>
> Found a nice pair of docs from "thesitewizard.com" that appeared to be
> pretty well-written instructions on installing each of these systems. btw-
> I'm running XpSp2. Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per the
> recommendations.
>
> Went thru all instructions step-by-step, testing all the way. Apache
> works - PHP doesn't. When I bring up IE and type in localhost I get the
> default apache page as I was told I should see. When I type
> "localhost/test.php" I get a windows dialog asking what program should run
> the php script.
>
> In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
> got the expected result from my script - so PHP works.
>
> End result - they each work separately, but php is not working under
apache.
>
> As part of the docs instructions I added the following code to the apache
> conf file:
>
> 1 - I chose the "configure apache to run php as an apache module.
> 2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
> those lines
> 3 - added "AddType application/x-httpd-php .php" as the last of those
lines
> 4 - added "PHPIniDir "c:/php" as the last line of the conf file.
>
> Upon adding these lines apache will no longer restart. In fact adding any
> ONE of these lines breaks Apache.
>
> Ideas welcome.
>
> And for those who still love the USofA, Happy Independence Day!
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
On 07/04/2011 07:39 AM, Jim Giner wrote:
> Hi all,
> (Hopefully I posted this in a place that can/will help me)
> 
> I got curious about running php / apache on my own laptop in order to help
> my devl process, instead of writing, uploading and testing on my site.
> 
> Found a nice pair of docs from "thesitewizard.com" that appeared to be
> pretty well-written instructions on installing each of these systems.  btw-
> I'm running XpSp2.  Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per the
> recommendations.
> 
> Went thru all instructions step-by-step, testing all the way.  Apache
> works - PHP doesn't.  When I bring up IE and type in localhost I get the
> default apache page as I was told I should see.  When I type
> "localhost/test.php" I get a windows dialog asking what program should run
> the php script.
> 
> In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
> got the expected result from my script - so PHP works.
> 
> End result - they each work separately, but php is not working under apache.
> 
> As part of the docs instructions I added the following code to the apache
> conf file:
> 
> 1 - I chose the "configure apache to run php as an apache module.
> 2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
> those lines
> 3 - added "AddType application/x-httpd-php .php" as the last of those lines
> 4 - added "PHPIniDir "c:/php" as the last line of the conf file.
> 
> Upon adding these lines apache will no longer restart.  In fact adding any
> ONE of these lines breaks Apache.
> 
> Ideas welcome.
> 
> And for those who still love the USofA, Happy Independence Day!
> 

You may need to add c:\php\ to the Windows path so that the Apache mod
can find other files it may need. If you have mysql or other extensions
enabled in php.ini, then they may be looking for another dll that is
located in the php dir.

And of course, Happy Independence Day!

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Shawn,
I added my php folder to the path but no change.

"Shawn McKenzie" <nos...@mckenzies.net> wrote in message 
news:4e11e7e7.6010...@mckenzies.net...

>
> You may need to add c:\php\ to the Windows path so that the Apache mod
> can find other files it may need. If you have mysql or other extensions
> enabled in php.ini, then they may be looking for another dll that is
> located in the php dir.



--- End Message ---
--- Begin Message ---
On 7/3/2011 9:37 PM, Brian Dworkin wrote:
> I would like to subscribe to this mailing list please.
> 
> Thanks.
> 
> Sincerely,
> 
> Brian Dworkin
> Managing Partner
> Bright Telecom
> 201-892-9553 (mobile #)
> br...@brighttelecom.net
> http://www.brighttelecom.net
> 
> 

http://php.net/mailing-lists.php will get you started

--- End Message ---

Reply via email to