Re: [PHP] Re: insert text with no specific format into database table

2008-02-26 Thread jeffry s
thank you all.
it is a great help..

On Tue, Feb 26, 2008 at 1:15 AM, Shawn McKenzie <[EMAIL PROTECTED]>
wrote:

> Shawn McKenzie wrote:
> > jeffry s wrote:
> >> i have text file and a table created with
> >>
> >> create table word(
> >> id int not null auto_increment primary key,
> >> word varchar(50),
> >> definition text
> >> )
> >>
> >> the text contain list of words but not really in specific format
> >>
> >> word, some text definition
> >> word, some text definition, some text definition, etc
> >>
> >>
> >> i want to read the file line by line,
> >> take the first word before comma (,) and insert into the word column in
> the
> >> database
> >> whatever after follow the first comma(,) will be inserted into the
> >> definition column in the word table database.
> >>
> >> i am not sure how to read the file line by line in php.
> >> and how to separate the line of  text into two. divided by the 1st
> comma (,)
> >> ..
> >> my idea is using the explode(',' $text) function. but this one will
> separate
> >> everything between a comma(,) into an array.
> >> i wan't to know if there is another better way to do it..
> >>
> >>
> >> any idea?
> >> thank you!
> >>
> >
> > Read about the file() function and also read about the explode()
> > function's limit parameter.
> >
> > -Shawn
> >
> >
> > if(($lines = file("file.txt"))) {
> > foreach($lines as $line) {
> > list($word, $definition) = explode($line, ',', 1);
> > //insert word and definition SQL stuff here
> > }
> > }
>
> Maybe I should read up on the limit parameter also :-0
>
> list($word, $definition) = explode($line, ',', 2);
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Sending SMS via PHP

2008-02-26 Thread jeffry s
i wonder how kannel.org work?
do i need the specific device. i need the sim card form the phone company
provider right?

On Thu, Feb 21, 2008 at 4:18 PM, Per Jessen <[EMAIL PROTECTED]> wrote:

> Paul Scott wrote:
>
> > What you need to do is ask yourself whether you are going to do high
> > volume SMS or not, and look at when do the commercial providers become
> > more economical? What a lot of people do, is sign up for an account
> > and end up sending only 50 or so SMS a month, which is silly, when for
> > the same price as a month or two's subscription, you could buy your
> > own GSM modem and a prepaid SIM card and do it for half the price
> > yourself.
>
> Or use sms_client and only pay per individual SMS.  No subscription
> needed.
>
>
> /Per Jessen, Zürich
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] PHPDoc autocomplete hints

2008-02-26 Thread Thiago Pojda
Guys,
 
I'm new to this thing and I'm not sure if it's my IDE (ZendStudioNeon)
problem, or if I'm doing something wrong. I always use PHPDoc block comments
on my functions, but this time I'm using factories in my code and missing
autocomplete on those objects. I've tried using those hints as below, but
with no luck. What am I missing?
 
/* This code is not real */
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory->getUserDAO(); //autocomplete ok
$usrObj->resetPW($usr, $newPw); // no autocomplete here
 
I've tryed using:
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory->getUserDAO(); //autocomplete ok
/* @var $usrObj UserDAO */
$usrObj->resetPW($usr, $newPw); // but still no autocomplete here
 
Tried also
/* @var UserDAO */
$usrObj->resetPW($usr, $newPw); // no luck either
 
 
Thanks for your help.
 
 
PS: I've sent a similar message to ZendStudioNeon mailing list.

Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

 


Re: [PHP] Re: PHP cuts download process prematurely

2008-02-26 Thread Manuel Barros Reyes
On Tue, Feb 26, 2008 at 3:07 AM, Andrés Robinet <[EMAIL PROTECTED]> wrote:
>
>  You need the log files to know exactly what the problem is. And, even if you 
> are

I'll try to rescue those logs many thanks again.

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



[PHP] How do you send stylized email?

2008-02-26 Thread tedd

Hi gang:

I want to send a styled email via heredoc, can that be done?

$message = <

Re: [PHP] Re: PHP cuts download process prematurely

2008-02-26 Thread Manuel Barros Reyes
On Tue, Feb 26, 2008 at 3:07 AM, Andrés Robinet <[EMAIL PROTECTED]> wrote:
>
>  Though this is not likely to solve the problem, try adding the following two
>  lines at the beginning of the script (even before you query the database and 
> do
>  all your logic)
>
>  ignore_user_abort(true);
>  set_time_limit(0);
>
>  You need the log files to know exactly what the problem is. And, even if you 
> are
>  not solving this issue using compression as a workaround, you may also want 
> to
>  add at the beginning of the script:
>
>  ob_start("ob_gzhandler")


>From what I read I think ob_start("ob_gzhandler") would be needed if I
would like to compress output transparently and let the clients
browser do the reverse job in the same maner, but in this case I am
uploading the files as .gz and the person who downloads it takes care
of decompressing it by hand.

Maybe I should use a simple ob_start() in this case. I understand
ob_start()-ob_end_flush() collects data in a server buffer and outputs
it all together but in the case of my script the only output is the
file I am uploading and the output is only in th echo $contents.
Unless I am missing details of ob_start() wouldn't this be equivalent
in this case?

Thanks

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



Re: [PHP] Re: PHP cuts download process prematurely

2008-02-26 Thread Wolf
What you really need to do is grab the phpinfo from both servers and see what 
the differences are.  Either put them side-by-side on the screen, or print them 
both out; but either way you need to do a line-by-line, 
configuration-by-configuration check to see what/where the differences in the 
setup are.

Your sys-admin should have made the test servers EXACTLY like the production 
servers so that working with them would be seemless, but not all 
programming/test/production environments are ideal.

Wolf
 Manuel Barros Reyes <[EMAIL PROTECTED]> wrote: 
> On Tue, Feb 26, 2008 at 3:07 AM, Andrés Robinet <[EMAIL PROTECTED]> wrote:
> >
> >  Though this is not likely to solve the problem, try adding the following 
> > two
> >  lines at the beginning of the script (even before you query the database 
> > and do
> >  all your logic)
> >
> >  ignore_user_abort(true);
> >  set_time_limit(0);
> >
> >  You need the log files to know exactly what the problem is. And, even if 
> > you are
> >  not solving this issue using compression as a workaround, you may also 
> > want to
> >  add at the beginning of the script:
> >
> >  ob_start("ob_gzhandler")
> 
> 
> From what I read I think ob_start("ob_gzhandler") would be needed if I
> would like to compress output transparently and let the clients
> browser do the reverse job in the same maner, but in this case I am
> uploading the files as .gz and the person who downloads it takes care
> of decompressing it by hand.
> 
> Maybe I should use a simple ob_start() in this case. I understand
> ob_start()-ob_end_flush() collects data in a server buffer and outputs
> it all together but in the case of my script the only output is the
> file I am uploading and the output is only in th echo $contents.
> Unless I am missing details of ob_start() wouldn't this be equivalent
> in this case?
> 
> Thanks
> 
> --
> 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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread tedd

At 2:09 PM -0500 2/25/08, Daniel Brown wrote:

On Mon, Feb 25, 2008 at 1:40 PM, Rick Pasotto <[EMAIL PROTECTED]> wrote:

 What is the best or recomended proceedure for making sure that a page is
  accessed only via a secure connection?


Provided you're running SSL on the standard HTTPS port of 443,
include this at the very top of every file, before any output or
session information is sent.  The best option would be to include it
in a file in a switched index.php or similar design.

https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
exit;
}
?>


--




Sometimes I feel like a child here.

Under what circumstances would one require that?

If your script is in a https directory, isn't that secure? OR, is 
this something else?


Please explain.

Cheers,

tedd


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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Richard Heyes

I want to send a styled email via heredoc, can that be done?

$message = <<

The easiest way is this:

$message = <<
Title: This is a title of the Event.
Time: This the time of the Event.


Please show up on time.
EOT

mail('[EMAIL PROTECTED]' , 'An Event' , $message, 'Content-Type:
text/html');

If you want to send multipart text/HTML emails, have a look at my
website for the HTMLMimeMail class which greatly simplifies this.

--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Dan Joseph
On Tue, Feb 26, 2008 at 9:39 AM, tedd <[EMAIL PROTECTED]> wrote:

> Sometimes I feel like a child here.
>
> Under what circumstances would one require that?
>
> If your script is in a https directory, isn't that secure? OR, is
> this something else?
>
>

Well for instance.  We have a web server here with http and https pointing
to the same place.  then we have an admin login for the site and we want to
force people to go https even though they can do http to get there.  So when
our users go to http://domain/admin/ it then redirects them to
https://domain/admin/.

-- 
-Dan Joseph

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] How do you send stylized email?

2008-02-26 Thread Jochem Maas

tedd schreef:

Hi gang:

I want to send a styled email via heredoc, can that be done?

$message = <<

that's just string generation ... 'style' equates to harassing people
with HTML emails ... which will require a message built using the multipart mime
specification ... for which you'll want to grab a ready built lib/class
in order to save your self the hassle.

recommended: phpmailer (google it)

which you can then pull apart to see exactly how it works (it's work
comprises of building the $message into a format that mail readers will
understand as multi-part mime.)



mail('[EMAIL PROTECTED]' , 'An Event' , $message);

If so, how do you style it?

If not, how do you send stylized email?


style comes naturally to some of us ;-)

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Per Jessen
tedd wrote:

> Sometimes I feel like a child here.
> 
> Under what circumstances would one require that?
> 
> If your script is in a https directory, isn't that secure? OR, is
> this something else?
> 
> Please explain.

You might want to do such checks if your website (www.example.com) is
accessible over http and https both.  Typically you'll have separate
content, but it might be possible for a user to accidentally access
non-secure content over https which is just wasteful, or vice versa
which is clearly a security risk. 


/Per Jessen, Zürich

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Per Jessen
tedd wrote:

> Hi gang:
> 
> I want to send a styled email via heredoc, can that be done?

Yes.

> $message = << Title: This is a title of the Event.
> Time: This the time of the Event.
> 
> Please show up on time.
> EOT
> 
> mail('[EMAIL PROTECTED]' , 'An Event' , $message);
> 
> If so, how do you style it?

With the normal elements - for text emails, whitespace, line breaks and
line spacing.  For HTML emails, you style it as you would any webpage
with HTML and CSS.


/Per Jessen, Zürich

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 9:28 AM, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
>
>  I want to send a styled email via heredoc, can that be done?
>
>  $message = <<  Title: This is a title of the Event.
>  Time: This the time of the Event.
>
>  Please show up on time.
>  EOT

Without beating the subject to death, since you've already gotten
two good answers, I'll add in that your HEREDOC (aside from being
prone to a parse error due to the missing semicolon after the closing
EOT) will end immediately after `please show up on time.`

Even though you started EOT on it's own line as is required, the
last carriage return/newline will not be included in $message.  If you
want an ending newline (which I consider a Good Idea[tm]), then change
the above to:

$message =<<

Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 9:46 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
>  style comes naturally to some of us ;-)

Well, if you know that, why do you keep acting so jealous of Tedd?  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 2:42 PM + 2/26/08, Richard Heyes wrote:

I want to send a styled email via heredoc, can that be done?

$message = <<

The easiest way is this:

$message = <<
Title: This is a title of the Event.
Time: This the time of the Event.


Please show up on time.
EOT

mail('[EMAIL PROTECTED]' , 'An Event' , $message, 'Content-Type:
text/html');


Duh!

I should have thought of that.

Thanks,

tedd

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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 9:39 AM, tedd <[EMAIL PROTECTED]> wrote:
>  Sometimes I feel like a child here.
>
>  Under what circumstances would one require that?
>
>  If your script is in a https directory, isn't that secure? OR, is
>  this something else?
>
>  Please explain.

HTTPS is a protocol: HyperText Transfer Protocol - Secure.  It
means using SSL (Secure Socket Layers) on an HTTP connection (via
TCP/IP, etc BVDs ;-P).

Just because your files reside in an https/ directory doesn't mean
anything if there's no SSL certificate and secure connection - usually
on port 443 as opposed to the non-secure HTTP port 80.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 3:46 PM +0100 2/26/08, Jochem Maas wrote:

style comes naturally to some of us ;-)


:-)

Yes, but it eventually comes to everyone

Cheers,

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 9:52 AM -0500 2/26/08, Daniel Brown wrote:

On Tue, Feb 26, 2008 at 9:28 AM, tedd <[EMAIL PROTECTED]> wrote:

 Hi gang:

  I want to send a styled email via heredoc, can that be done?

  $message = <<

Without beating the subject to death, since you've already gotten
two good answers, I'll add in that your HEREDOC (aside from being
prone to a parse error due to the missing semicolon after the closing
EOT) will end immediately after `please show up on time.`

Even though you started EOT on it's own line as is required, the
last carriage return/newline will not be included in $message.  If you
want an ending newline (which I consider a Good Idea[tm]), then change
the above to:

$message =<<

Yeah, but that was just a first draft. I never write anything that 
runs the first time. :-)


It keeps me sharp, or dull, as the case may be.

Cheers,

tedd

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 9:53 AM -0500 2/26/08, Daniel Brown wrote:

On Tue, Feb 26, 2008 at 9:46 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:

  style comes naturally to some of us ;-)


Well, if you know that, why do you keep acting so jealous of Tedd?  ;-P


Nah, he's just looking for the blissful part.

Cheers,

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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Aleksandar Vojnovic
If you are running Apache you could use a rewrite rule for such a case. 
Example below


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(my|folder|examples) /https/://%{HTTP_HOST}%{REQUEST_URI} 
[R=301,L]


Aleksander

Per Jessen wrote:

tedd wrote:

  

Sometimes I feel like a child here.

Under what circumstances would one require that?

If your script is in a https directory, isn't that secure? OR, is
this something else?

Please explain.



You might want to do such checks if your website (www.example.com) is
accessible over http and https both.  Typically you'll have separate
content, but it might be possible for a user to accidentally access
non-secure content over https which is just wasteful, or vice versa
which is clearly a security risk. 



/Per Jessen, ZĂĽrich

  


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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 09:45 -0500, Dan Joseph wrote:
> On Tue, Feb 26, 2008 at 9:39 AM, tedd <[EMAIL PROTECTED]> wrote:
> 
> > Sometimes I feel like a child here.
> >
> > Under what circumstances would one require that?
> >
> > If your script is in a https directory, isn't that secure? OR, is
> > this something else?
> >
> >
> 
> Well for instance.  We have a web server here with http and https pointing
> to the same place.  then we have an admin login for the site and we want to
> force people to go https even though they can do http to get there.  So when
> our users go to http://domain/admin/ it then redirects them to
> https://domain/admin/.

I do the same thing. For me I add an attribute to a page's pattern.
Usually one of the following:

'https' => true,
'https' => false,
'https' => 'optional',

Then a small bit of code checks the attribute and ensures the request
meets the requirement.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Jochem Maas

tedd schreef:

At 3:46 PM +0100 2/26/08, Jochem Maas wrote:

style comes naturally to some of us ;-)


:-)

Yes, but it eventually comes to everyone


only if your markup is correct

"but it eventually comes to everyone"

;-)



Cheers,

tedd


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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread tedd

At 3:47 PM +0100 2/26/08, Per Jessen wrote:

tedd wrote:


 Sometimes I feel like a child here.

 Under what circumstances would one require that?

 If your script is in a https directory, isn't that secure? OR, is
 this something else?

 Please explain.


You might want to do such checks if your website (www.example.com) is
accessible over http and https both.  Typically you'll have separate
content, but it might be possible for a user to accidentally access
non-secure content over https which is just wasteful, or vice versa
which is clearly a security risk.


Let's take this scenario.

I have a site that has http and https directories with the https 
having a certificate.


I want to sell stuff.

I offer the items for review in the http directories.

Then a user wants to purchase something and I direct them to a unique 
script in the https directory and that script takes their sensitive 
data and finalizes the sale. What's wrong with that?


Why would I also want to check if "that a page is accessed only via a 
secure connection?"


Cheers,

tedd

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 4:10 PM +0100 2/26/08, Jochem Maas wrote:

tedd schreef:

At 3:46 PM +0100 2/26/08, Jochem Maas wrote:

style comes naturally to some of us ;-)


:-)

Yes, but it eventually comes to everyone


only if your markup is correct


Now you sound like my wife.  :-)

"It's not what you said -- it's how you said it." (wife)

Cheers,

tedd

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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Wolf

 tedd <[EMAIL PROTECTED]> wrote: 
> At 3:47 PM +0100 2/26/08, Per Jessen wrote:
> >tedd wrote:
> >
> >>  Sometimes I feel like a child here.
> >>
> >>  Under what circumstances would one require that?
> >>
> >>  If your script is in a https directory, isn't that secure? OR, is
> >>  this something else?
> >>
> >>  Please explain.
> >
> >You might want to do such checks if your website (www.example.com) is
> >accessible over http and https both.  Typically you'll have separate
> >content, but it might be possible for a user to accidentally access
> >non-secure content over https which is just wasteful, or vice versa
> >which is clearly a security risk.
> 
> Let's take this scenario.
> 
> I have a site that has http and https directories with the https 
> having a certificate.
> 
> I want to sell stuff.
> 
> I offer the items for review in the http directories.
> 
> Then a user wants to purchase something and I direct them to a unique 
> script in the https directory and that script takes their sensitive 
> data and finalizes the sale. What's wrong with that?
> 
> Why would I also want to check if "that a page is accessed only via a 
> secure connection?"
> 
> Cheers,
> 
> tedd

The certificate/secure pages only need to be accessed via https, and those need 
to be the ones which gather personal/private data.  It doesn't matter if 
someone browsing looks at them secure or non-secure.

Put your data where it needs to be for the site to make sense to both the 
shoppers and the maintainers and use the server to handle the requires (make a 
/path/secure which contains the checkout pieces and require https for those via 
an .htaccess file)

HTH,
Wolf

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 10:16 -0500, tedd wrote:
> At 3:47 PM +0100 2/26/08, Per Jessen wrote:
> >tedd wrote:
> >
> >>  Sometimes I feel like a child here.
> >>
> >>  Under what circumstances would one require that?
> >>
> >>  If your script is in a https directory, isn't that secure? OR, is
> >>  this something else?
> >>
> >>  Please explain.
> >
> >You might want to do such checks if your website (www.example.com) is
> >accessible over http and https both.  Typically you'll have separate
> >content, but it might be possible for a user to accidentally access
> >non-secure content over https which is just wasteful, or vice versa
> >which is clearly a security risk.
> 
> Let's take this scenario.
> 
> I have a site that has http and https directories with the https 
> having a certificate.
> 
> I want to sell stuff.
> 
> I offer the items for review in the http directories.
> 
> Then a user wants to purchase something and I direct them to a unique 
> script in the https directory and that script takes their sensitive 
> data and finalizes the sale. What's wrong with that?

Nothing. But you do need to manage what files show up in which
directories. Me, I just put them all into a shop directory or whatnot
and check what protocol is required for access. Then I only need to
manage one directory when updating the code.

> Why would I also want to check if "that a page is accessed only via a 
> secure connection?"

Because you're restricting based on access, not based on directory
structure.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Jochem Maas

tedd schreef:

At 4:10 PM +0100 2/26/08, Jochem Maas wrote:

tedd schreef:

At 3:46 PM +0100 2/26/08, Jochem Maas wrote:

style comes naturally to some of us ;-)


:-)

Yes, but it eventually comes to everyone


only if your markup is correct


Now you sound like my wife.  :-)


for your sake I hope I don't look like her :-P
that said I'd hazard a guess and say you listen to what she says ... my ex
used to say the same thing.


"It's not what you said -- it's how you said it." (wife)

Cheers,

tedd



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



Re: [PHP] More than one values returned?

2008-02-26 Thread tedd

At 1:08 PM -0500 2/25/08, Daniel Brown wrote:

On Sat, Feb 23, 2008 at 6:21 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
 >  On Fri, 2008-02-22 at 18:13 -0500, tedd wrote:
 > He said your narratives, not your jokes. ;)
 >  >
 >  > Besides, if you gave up programming and took up comedy, both
 >  > professions would suffer.

  >
  > How's that for a backhanded compliment?  :-)

  Thanks for the... I mean ouch, I mean thanks for the compli... no ouch,
  bah, you and your double speak.


Tedd's message was the last email I saw before I left for the
weekend.  And perhaps it was through my visualization from his words
(physically backhanding Rob while whispering sweet nothings in his
ear), but I cracked up by which I mean I literally laughed out
loud.  And still today, it makes me chuckle.

--




Does that mean if I took up comedy and gave up programing that both 
professions would benefit?


This reminds me of when I commented to a friend that I swim everyday 
but still can't seem to lose the weight I want. He replied "Look at 
whales, they swim all the time and don't lose weight."


I understood his point, but didn't like the metaphor.

Cheers,

tedd


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

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



Re: [PHP] More than one values returned?

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 10:32 -0500, tedd wrote:
> At 1:08 PM -0500 2/25/08, Daniel Brown wrote:
> >On Sat, Feb 23, 2008 at 6:21 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> >  >  On Fri, 2008-02-22 at 18:13 -0500, tedd wrote:
> >  > He said your narratives, not your jokes. ;)
> >  >  >
> >  >  > Besides, if you gave up programming and took up comedy, both
> >  >  > professions would suffer.
> >>   >
> >>   > How's that for a backhanded compliment?  :-)
> >>
> >>   Thanks for the... I mean ouch, I mean thanks for the compli... no ouch,
> >>   bah, you and your double speak.
> >
> > Tedd's message was the last email I saw before I left for the
> >weekend.  And perhaps it was through my visualization from his words
> >(physically backhanding Rob while whispering sweet nothings in his
> >ear), but I cracked up by which I mean I literally laughed out
> >loud.  And still today, it makes me chuckle.
> >
> >--
> >
> 
> 
> Does that mean if I took up comedy and gave up programing that both 
> professions would benefit?
> 
> This reminds me of when I commented to a friend that I swim everyday 
> but still can't seem to lose the weight I want. He replied "Look at 
> whales, they swim all the time and don't lose weight."
> 
> I understood his point, but didn't like the metaphor.

No point blubbering about it.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread TG

For his sake, I hope SHE doesn't look like YOU.

For YOUR sake, I hope you don't look like her.

"... it's how you said it.":)

-TG, professional smart ass

- Original Message -
From: Jochem Maas <[EMAIL PROTECTED]>
To: tedd <[EMAIL PROTECTED]>
Cc: php-general@lists.php.net
Date: Tue, 26 Feb 2008 16:27:09 +0100
Subject: Re: [PHP] How do you send stylized email?

> tedd schreef:
> > At 4:10 PM +0100 2/26/08, Jochem Maas wrote:
> >> tedd schreef:
> >>> At 3:46 PM +0100 2/26/08, Jochem Maas wrote:
>  style comes naturally to some of us ;-)
> >>>
> >>> :-)
> >>>
> >>> Yes, but it eventually comes to everyone
> >>
> >> only if your markup is correct
> > 
> > Now you sound like my wife.  :-)
> 
> for your sake I hope I don't look like her :-P
> that said I'd hazard a guess and say you listen to what she says ... my ex
> used to say the same thing.
> 
> > "It's not what you said -- it's how you said it." (wife)
> > 
> > Cheers,
> > 
> > tedd

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 4:27 PM +0100 2/26/08, Jochem Maas wrote:

tedd schreef:

Now you sound like my wife.  :-)


for your sake I hope I don't look like her :-P


No, I have an absolutely beautiful wife -- no complaints in that department.


that said I'd hazard a guess and say you listen to what she says ... my ex
used to say the same thing.


Ex's are the experience you need to get it to work.

I've always said that everyone should go through at least one divorce 
before getting married.


Cheers,

tedd

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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread tedd

At 10:24 AM -0500 2/26/08, Robert Cummings wrote:

On Tue, 2008-02-26 at 10:16 -0500, tedd wrote:
 > Then a user wants to purchase something and I direct them to a unique

 script in the https directory and that script takes their sensitive
 data and finalizes the sale. What's wrong with that?


Nothing. But you do need to manage what files show up in which
directories. Me, I just put them all into a shop directory or whatnot
and check what protocol is required for access. Then I only need to
manage one directory when updating the code.


 Why would I also want to check if "that a page is accessed only via a
 secure connection?"


Because you're restricting based on access, not based on directory
structure.



Ahhh, I see (I think).

I've been using the actual directories for my scripts, when I don't 
really need to do that. I could do it automagically with code. That 
would certainly make my work organization a bit easier.


So, let's say I wanted script "secure.php" to be forced to use https 
-- do I use something like what Dan provided, namely?


https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
exit;
}
?>

I know I could test the code for myself, but this is quicker.

Thanks,

tedd

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 10:38 -0500, tedd wrote:
> At 4:27 PM +0100 2/26/08, Jochem Maas wrote:
> >tedd schreef:
> >>Now you sound like my wife.  :-)
> >
> >for your sake I hope I don't look like her :-P
> 
> No, I have an absolutely beautiful wife -- no complaints in that department.
> 
> >that said I'd hazard a guess and say you listen to what she says ... my ex
> >used to say the same thing.
> 
> Ex's are the experience you need to get it to work.
> 
> I've always said that everyone should go through at least one divorce 
> before getting married.

Marriage?? That's for backwards people stuck in ancient pointless
traditions >:) And moreso in today's culture... it's just a commercial
suckfest when your money could better go to student loans and raising a
family.

I've been happily living in sin with my common-law wife for 9 years.
Besides, isn't marriage primarily a religious thing? In the old
testament marriage was often implied by the simple act of laying with a
woman... or two... or three... Polygamy, how did that fall out of
religious favour? :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Andrew Ballard
On Tue, Feb 26, 2008 at 10:16 AM, tedd <[EMAIL PROTECTED]> wrote:
> At 3:47 PM +0100 2/26/08, Per Jessen wrote:
>
> >tedd wrote:
>  >
>  >>  Sometimes I feel like a child here.
>  >>
>  >>  Under what circumstances would one require that?
>  >>
>  >>  If your script is in a https directory, isn't that secure? OR, is
>  >>  this something else?
>  >>
>
> >>  Please explain.
>  >
>  >You might want to do such checks if your website (www.example.com) is
>  >accessible over http and https both.  Typically you'll have separate
>  >content, but it might be possible for a user to accidentally access
>  >non-secure content over https which is just wasteful, or vice versa
>  >which is clearly a security risk.
>
>  Let's take this scenario.
>
>  I have a site that has http and https directories with the https
>  having a certificate.
>
>  I want to sell stuff.
>
>  I offer the items for review in the http directories.
>
>  Then a user wants to purchase something and I direct them to a unique
>  script in the https directory and that script takes their sensitive
>  data and finalizes the sale. What's wrong with that?

I'm not sure I totally understand what you're meaning by having
separate http and https directories. Assuming the directory where your
"https" scripts are stored is named "secure", what prevents someone
from browsing to http://yourdomain/secure/ rather than
https://yourdomain/secure/ ? The former would not be using SSL even
though you intend it to do so; the latter would.

The other issue I see, if I understand your structure correctly, is
that any additional content such as images, external javascripts,
flash files, etc. would have to be stored in two locations so that it
could be included in both secure and nonsecure pages without throwing
warnings in the browser about displaying mixed content. (Technically,
you could do rewrites, symbolic links, etc. so that two paths resolve
to the same physical folder.)

>
>  Why would I also want to check if "that a page is accessed only via a
>  secure connection?"

Because you don't want someone entering information on a page that you
intend to be secure unless they truly are using a secure connection.

>
>  Cheers,
>
>  tedd
>


Am I misunderstanding you somewhere?

Andrew

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Dan Joseph
On Tue, Feb 26, 2008 at 10:56 AM, tedd <[EMAIL PROTECTED]> wrote:

>
> So, let's say I wanted script "secure.php" to be forced to use https
> -- do I use something like what Dan provided, namely?
>
>  if($_SERVER['SERVER_PORT'] != '443') {
> $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
> $_SERVER['SERVER_NAME'];
> header("Location:
> https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
> exit;
> }
> ?>
>
> I know I could test the code for myself, but this is quicker.
>
>

Yep.  Use that or: if ($_ENV["HTTPS"] == "off").  Daniel's code is port
specific, this one checks for HTTPS being on or off.

-- 
-Dan Joseph

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] checking for and enforcing https

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 10:56 -0500, tedd wrote:
> At 10:24 AM -0500 2/26/08, Robert Cummings wrote:
> >On Tue, 2008-02-26 at 10:16 -0500, tedd wrote:
> >  > Then a user wants to purchase something and I direct them to a unique
> >>  script in the https directory and that script takes their sensitive
> >>  data and finalizes the sale. What's wrong with that?
> >
> >Nothing. But you do need to manage what files show up in which
> >directories. Me, I just put them all into a shop directory or whatnot
> >and check what protocol is required for access. Then I only need to
> >manage one directory when updating the code.
> >
> >>  Why would I also want to check if "that a page is accessed only via a
> >>  secure connection?"
> >
> >Because you're restricting based on access, not based on directory
> >structure.
> 
> 
> Ahhh, I see (I think).
> 
> I've been using the actual directories for my scripts, when I don't 
> really need to do that. I could do it automagically with code. That 
> would certainly make my work organization a bit easier.
> 
> So, let's say I wanted script "secure.php" to be forced to use https 
> -- do I use something like what Dan provided, namely?
> 
>   if($_SERVER['SERVER_PORT'] != '443') {
>  $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
> $_SERVER['SERVER_NAME'];
>  header("Location:
> https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
>  exit;
>  }
> ?>
> 
> I know I could test the code for myself, but this is quicker.

This is almost right, but you're presuming that HTTPS must be served
over port 443. It is the most likely port, but not always the case when
browsing an intranet. What you really want to check is:

$_SERVER['HTTPS'] == 'on'

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 10:57 -0500, Andrew Ballard wrote:
> On Tue, Feb 26, 2008 at 10:16 AM, tedd <[EMAIL PROTECTED]> wrote:
> > At 3:47 PM +0100 2/26/08, Per Jessen wrote:
> >
> > >tedd wrote:
> >  >
> >  >>  Sometimes I feel like a child here.
> >  >>
> >  >>  Under what circumstances would one require that?
> >  >>
> >  >>  If your script is in a https directory, isn't that secure? OR, is
> >  >>  this something else?
> >  >>
> >
> > >>  Please explain.
> >  >
> >  >You might want to do such checks if your website (www.example.com) is
> >  >accessible over http and https both.  Typically you'll have separate
> >  >content, but it might be possible for a user to accidentally access
> >  >non-secure content over https which is just wasteful, or vice versa
> >  >which is clearly a security risk.
> >
> >  Let's take this scenario.
> >
> >  I have a site that has http and https directories with the https
> >  having a certificate.
> >
> >  I want to sell stuff.
> >
> >  I offer the items for review in the http directories.
> >
> >  Then a user wants to purchase something and I direct them to a unique
> >  script in the https directory and that script takes their sensitive
> >  data and finalizes the sale. What's wrong with that?
> 
> I'm not sure I totally understand what you're meaning by having
> separate http and https directories. Assuming the directory where your
> "https" scripts are stored is named "secure", what prevents someone
> from browsing to http://yourdomain/secure/ rather than
> https://yourdomain/secure/ ? The former would not be using SSL even
> though you intend it to do so; the latter would.
> 
> The other issue I see, if I understand your structure correctly, is
> that any additional content such as images, external javascripts,
> flash files, etc. would have to be stored in two locations so that it
> could be included in both secure and nonsecure pages without throwing
> warnings in the browser about displaying mixed content. (Technically,
> you could do rewrites, symbolic links, etc. so that two paths resolve
> to the same physical folder.)
> 
> >
> >  Why would I also want to check if "that a page is accessed only via a
> >  secure connection?"
> 
> Because you don't want someone entering information on a page that you
> intend to be secure unless they truly are using a secure connection.
> 
> >
> >  Cheers,
> >
> >  tedd
> >
> 
> 
> Am I misunderstanding you somewhere?

I don't think you are. I think Ted has been doing it the hard way... but
the lightbulb may have just gone on :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 11:00 -0500, Dan Joseph wrote:
> On Tue, Feb 26, 2008 at 10:56 AM, tedd <[EMAIL PROTECTED]> wrote:
> 
> >
> > So, let's say I wanted script "secure.php" to be forced to use https
> > -- do I use something like what Dan provided, namely?
> >
> >  > if($_SERVER['SERVER_PORT'] != '443') {
> > $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
> > $_SERVER['SERVER_NAME'];
> > header("Location:
> > https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
> > exit;
> > }
> > ?>
> >
> > I know I could test the code for myself, but this is quicker.
> >
> >
> 
> Yep.  Use that or: if ($_ENV["HTTPS"] == "off").  Daniel's code is port
> specific, this one checks for HTTPS being on or off.

Surely you mean $_SERVER['HTTPS'] and not $_ENV['HTTPS'].

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] PHP cuts download process prematurely

2008-02-26 Thread Daniel Brown
On Mon, Feb 25, 2008 at 10:39 PM, Manuel Barros Reyes <[EMAIL PROTECTED]> wrote:
[snip!]
>  I guess the download is stoped by some timeout and not because of the
>  amount of kb downloaded because the size varies slightly. If that
>  timeout exists it should be of apox. 5-10 seconds.

Check the values in php.ini for the following:
default_socket_timeout
max_execution_time
memory_limit

And since you're uploading, also check these values in php.ini:
max_input_time
file_uploads
upload_max_filesize

Then, presuming you use Apache, check your httpd.conf file to see
if the value of Timeout is sufficient.  The default is 300.

>  I use this function to perform the upload $contenido is the content of
>  the file and to that variable I assign the big chunk of output from
>  the report, $nombre_archivo is the optional name for the file. I can
>  paste more code but I think the problem is here.

Here's a rewrite of your function, which you can see working live
at http://www.pilotpig.net/code-library/stream-file-with-checking.php.
 Sorry if my Spanish isn't very good in the code itself. :-\



-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] More than one values returned?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 10:40 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  > This reminds me of when I commented to a friend that I swim everyday
>  > but still can't seem to lose the weight I want. He replied "Look at
>  > whales, they swim all the time and don't lose weight."
>  >
>  > I understood his point, but didn't like the metaphor.
>
>  No point blubbering about it.

Wah-wah-wah-wahhh

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Dan Joseph
On Tue, Feb 26, 2008 at 11:04 AM, Robert Cummings <[EMAIL PROTECTED]>
wrote:

> Surely you mean $_SERVER['HTTPS'] and not $_ENV['HTTPS'].
>
>
>

woops!  yep, I meant $_SERVER, thanks :)

-- 
-Dan Joseph

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 10:38 AM, tedd <[EMAIL PROTECTED]> wrote:
> At 4:27 PM +0100 2/26/08, Jochem Maas wrote:
>  >tedd schreef:
>
> >>Now you sound like my wife.  :-)
>  >
>  >for your sake I hope I don't look like her :-P
>
>  No, I have an absolutely beautiful wife -- no complaints in that department.

She must subscribe to the list.  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Jim Lucas

Robert Cummings wrote:

On Tue, 2008-02-26 at 11:00 -0500, Dan Joseph wrote:

On Tue, Feb 26, 2008 at 10:56 AM, tedd <[EMAIL PROTECTED]> wrote:


So, let's say I wanted script "secure.php" to be forced to use https
-- do I use something like what Dan provided, namely?

https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
exit;
}
?>

I know I could test the code for myself, but this is quicker.



Yep.  Use that or: if ($_ENV["HTTPS"] == "off").  Daniel's code is port
specific, this one checks for HTTPS being on or off.


Surely you mean $_SERVER['HTTPS'] and not $_ENV['HTTPS'].

Cheers,
Rob.


And it doesn't say "off".  It either exists or doesn't.

if ( isset($_SERVER['HTTPS']) ) {
// Is using SSL
} else {
// Is NOT using SSL
}

--
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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 10:57 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  Marriage?? That's for backwards people stuck in ancient pointless
>  traditions >:) And moreso in today's culture... it's just a commercial
>  suckfest when your money could better go to student loans and raising a
>  family.

http://debianddan.com/

CC: Debs

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Ray Hauge

Robert Cummings wrote:

On Tue, 2008-02-26 at 10:38 -0500, tedd wrote:

At 4:27 PM +0100 2/26/08, Jochem Maas wrote:

tedd schreef:

Now you sound like my wife.  :-)

for your sake I hope I don't look like her :-P

No, I have an absolutely beautiful wife -- no complaints in that department.


that said I'd hazard a guess and say you listen to what she says ... my ex
used to say the same thing.

Ex's are the experience you need to get it to work.

I've always said that everyone should go through at least one divorce 
before getting married.


Marriage?? That's for backwards people stuck in ancient pointless
traditions >:) And moreso in today's culture... it's just a commercial
suckfest when your money could better go to student loans and raising a
family.

I've been happily living in sin with my common-law wife for 9 years.
Besides, isn't marriage primarily a religious thing? In the old
testament marriage was often implied by the simple act of laying with a
woman... or two... or three... Polygamy, how did that fall out of
religious favour? :)

Cheers,
Rob.


I know it was a rhetorical question, but I was curious.

A lot of the modern standards started when St. Augustine started 
teaching that the fall of Adam and Eve was the "original sin" which was 
sex.  Somehow that took hold and then sex became a "bad thing" and to be 
the most holy of holy you should be celibate.


http://en.wikipedia.org/wiki/Augustine_of_Hippo

As far as the history of monogamy goes, I had to look this one up.  It 
also seems to stem from the teachings of St. Augustine (late AD 300s). 
Martin Luther eventually allowed polygamy after coming to the conclusion 
that there was no scriptural evidence that polygamy was wrong. 
Obviously that's no longer in effect though.  It has also been allowed 
after certain wars to beef up the population again.


http://en.wikipedia.org/wiki/Polygamy#Christianity

I typically don't use wikipedia for sole sources, but everything else I 
could find was some religious site that was very biased.


How's that for off topic?

--
Ray Hauge
www.primateapplications.com

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 11:28 AM, Ray Hauge <[EMAIL PROTECTED]> wrote:
>
>  How's that for off topic?
>

Off-topic or not, welcome back.  Looks like the last time you
posted here was 2006.  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 11:12 AM, Jim Lucas <[EMAIL PROTECTED]> wrote:
>  And it doesn't say "off".  It either exists or doesn't.
>
>  if ( isset($_SERVER['HTTPS']) ) {
> // Is using SSL
>  } else {
> // Is NOT using SSL
>  }

Almost correct.

From http://php.net/reserved.variables :

 'HTTPS'
Set to a non-empty value if the script was queried through the
HTTPS protocol. Note that when using ISAPI with IIS, the value will be
off if the request was not made through the HTTPS protocol.

-- 


Daniel P. Brown
Senior Unix Geek


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



RE: [PHP] More than one values returned?

2008-02-26 Thread Bastien Koert

> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: 
> php-general@lists.php.net> Date: Tue, 26 Feb 2008 10:40:34 -0500> Subject: 
> Re: [PHP] More than one values returned?> > > On Tue, 2008-02-26 at 10:32 
> -0500, tedd wrote:> > At 1:08 PM -0500 2/25/08, Daniel Brown wrote:> > >On 
> Sat, Feb 23, 2008 at 6:21 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:> > > 
> > On Fri, 2008-02-22 at 18:13 -0500, tedd wrote:> > > > He said your 
> narratives, not your jokes. ;)> > > > >> > > > > Besides, if you gave up 
> programming and took up comedy, both> > > > > professions would suffer.> > >> 
> >> > >> > How's that for a backhanded compliment? :-)> > >>> > >> Thanks for 
> the... I mean ouch, I mean thanks for the compli... no ouch,> > >> bah, you 
> and your double speak.> > >> > > Tedd's message was the last email I saw 
> before I left for the> > >weekend. And perhaps it was through my 
> visualization from his words> > >(physically backhanding Rob while whispering 
> sweet nothings in his> > >ear), but I cracked up by which I mean I 
> literally laughed out> > >loud. And still today, it makes me chuckle.> > >> > 
> >--> > >> > > > > > Does that mean if I took up comedy and gave up 
> programing that both > > professions would benefit?> > > > This reminds me of 
> when I commented to a friend that I swim everyday > > but still can't seem to 
> lose the weight I want. He replied "Look at > > whales, they swim all the 
> time and don't lose weight."> > > > I understood his point, but didn't like 
> the metaphor.> > No point blubbering about it.> > Cheers,> Rob.> -- > 
> ..> | InterJinn 
> Application Framework - http://www.interjinn.com |> 
> ::> | An 
> application and templating framework for PHP. Boasting |> | a powerful, 
> scalable system for accessing system services |> | such as forms, properties, 
> sessions, and caches. InterJinn |> | also provides an extremely flexible 
> architecture for |> | creating re-usable components quickly and easily. |> 
> `'> > -- > PHP 
> General Mailing List (http://www.php.net/)> To unsubscribe, visit: 
> http://www.php.net/unsub.php> 
 
Now, thats funny
 
;-)
 
bastien
_



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 11:37 AM, Paul Scott <[EMAIL PROTECTED]> wrote:
>  >
>  > http://debianddan.com/
>  >
>  > CC: Debs
>  >
>
>  LOL! Now you are going to get a gazillion requests coming from people
>  looking for debian packages (possibly a new debian based distro for
>  people that stutter?)

That was pretty close to what I was thinking when I registered the
domain name, actually.

I wonder if I can just apt-get the wedding and have it all
automated for me.  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Paul Scott

On Tue, 2008-02-26 at 11:44 -0500, Daniel Brown wrote:
> I wonder if I can just apt-get the wedding and have it all
> automated for me.  ;-P

If only! I remember the stress, and a good friend of mine is gettin'
hitched on Sat - while I am in Uganda - go figure! 

Anyway, congrats, and enjoy the day... (Jokes aside of course)

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 11:47 AM, Paul Scott <[EMAIL PROTECTED]> wrote:
>
>  On Tue, 2008-02-26 at 11:44 -0500, Daniel Brown wrote:
>  > I wonder if I can just apt-get the wedding and have it all
>  > automated for me.  ;-P
>
>  If only! I remember the stress, and a good friend of mine is gettin'
>  hitched on Sat - while I am in Uganda - go figure!
>
>  Anyway, congrats, and enjoy the day... (Jokes aside of course)

Thanks, Paul.

All I have to say is, "Thank God for Jameson." [1]

1:http://www.jameson.ie/

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread tedd

At 11:03 AM -0500 2/26/08, Robert Cummings wrote:

On Tue, 2008-02-26 at 10:57 -0500, Andrew Ballard wrote:
 > Am I misunderstanding you somewhere?

I don't think you are. I think Ted has been doing it the hard way... but
the lightbulb may have just gone on :)

Cheers,
Rob.


It's flickering -- sorry to be so dim.

At present, I use the actual directories (http/https) to determine if 
the operation of the script is secure or not.


For scripts that don't collect sensitive date, I physically place in 
the http directory. For scripts that do, I place in the https 
directory.


That's the hard way, right?

Instead, I could place all my scripts where I want and then add

https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
exit;
}
?>

at the beginning of each secure script -- is that correct?

But the redirect still requires a script to be in the https 
directory, does it not?


Thanks,

tedd

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

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



RE: [PHP] How do you send stylized email?

2008-02-26 Thread Edward Kay
> > Ex's are the experience you need to get it to work.
> >
> > I've always said that everyone should go through at least one divorce
> > before getting married.
>
> Marriage?? That's for backwards people stuck in ancient pointless
> traditions >:) And moreso in today's culture... it's just a commercial
> suckfest when your money could better go to student loans and raising a
> family.

Possibly. Or as I prefer to see it, it's the one time in your life when you
surround yourself with all your friends and family to celebrate your
relationship.

> I've been happily living in sin with my common-law wife for 9 years.
> Besides, isn't marriage primarily a religious thing?

Not necessarily. My wife and I have no religion so had a civil ceremony -
held in the Assembly Rooms, Bath which was an 18th Century gambling venue ;)

> In the old
> testament marriage was often implied by the simple act of laying with a
> woman... or two... or three... Polygamy, how did that fall out of
> religious favour? :)

Not in the UK. In UK law there is no such thing as a common-law
wife/husband. If you're unmarried, you have as many rights to the other
person as the day you first met - practically none.

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



RE: [PHP] How do you send stylized email?

2008-02-26 Thread Bastien Koert

send an html email...
 
if you are looking to send calendar events, you could look at using the vcal or 
ical standards
 
plain text emails you can't do much with other than separate sections with 
dashes or asteriks
 
 
bastien
 
 
> Date: Tue, 26 Feb 2008 09:28:06 -0500> To: php-general@lists.php.net> From: 
> [EMAIL PROTECTED]> Subject: [PHP] How do you send stylized email?> > Hi 
> gang:> > I want to send a styled email via heredoc, can that be done?> > 
> $message = << Title: This is a title of the Event.> Time: This the time 
> of the Event.> > Please show up on time.> EOT> > mail('[EMAIL PROTECTED]' , 
> 'An Event' , $message);> > If so, how do you style it?> > If not, how do you 
> send stylized email?> > Cheers,> > tedd> -- > ---> http://sperling.com 
> http://ancientstones.com http://earthstones.com> > -- > PHP General Mailing 
> List (http://www.php.net/)> To unsubscribe, visit: 
> http://www.php.net/unsub.php> 
_



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Paul Scott

On Tue, 2008-02-26 at 11:27 -0500, Daniel Brown wrote:
> On Tue, Feb 26, 2008 at 10:57 AM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> >  Marriage?? That's for backwards people stuck in ancient pointless
> >  traditions >:) And moreso in today's culture... it's just a commercial
> >  suckfest when your money could better go to student loans and raising a
> >  family.
> 
> http://debianddan.com/
> 
> CC: Debs
> 

LOL! Now you are going to get a gazillion requests coming from people
looking for debian packages (possibly a new debian based distro for
people that stutter?) 

:))

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

Re: [PHP] How do you send stylized email?

2008-02-26 Thread tedd

At 11:44 AM -0500 2/26/08, Daniel Brown wrote:

http://debianddan.com/


Hey, she's much cuter than I would have thought.  ;-)

Cheers,

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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Andrew Ballard
On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:
> At 11:03 AM -0500 2/26/08, Robert Cummings wrote:
>  >On Tue, 2008-02-26 at 10:57 -0500, Andrew Ballard wrote:
>
> >  > Am I misunderstanding you somewhere?
>  >
>  >I don't think you are. I think Ted has been doing it the hard way... but
>  >the lightbulb may have just gone on :)
>  >
>  >Cheers,
>  >Rob.
>
>  It's flickering -- sorry to be so dim.
>
>  At present, I use the actual directories (http/https) to determine if
>  the operation of the script is secure or not.
>
>  For scripts that don't collect sensitive date, I physically place in
>  the http directory. For scripts that do, I place in the https
>  directory.
>
>  That's the hard way, right?
>
>  Instead, I could place all my scripts where I want and then add
>
>if(!isset($_SERVER['HTTPS']) ) {
>
>  $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
>  $_SERVER['SERVER_NAME'];
>  header("Location:
>  https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
>  exit;
>  }
>  ?>
>
>  at the beginning of each secure script -- is that correct?
>
>  But the redirect still requires a script to be in the https
>  directory, does it not?
>

No, it doesn't. Any of your scripts can be in any folder you wish. All
the redirect does is add the 's' to the http protocol at the beginning
of the URL so that the browser knows to encrypt any data it sends and
decrypt any data it receives. I guess you could probably configure
your server so that all content served from your https directory must
use SSL, but then you are just moving the check from PHP to the web
server.

Andrew

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:
>  At present, I use the actual directories (http/https) to determine if
>  the operation of the script is secure or not.

You also hijack other people's threads.  No-no, Tedd!  *slaps hand*

>  For scripts that don't collect sensitive date, I physically place in
>  the http directory. For scripts that do, I place in the https
>  directory.

Not every server configuration has separate directories for secure
and non-secure differentiation.  For example, log into your php1.net
account on my server.

>  That's the hard way, right?
>
>  Instead, I could place all my scripts where I want and then add
>
>if(!isset($_SERVER['HTTPS']) ) {
>
>  $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
>  $_SERVER['SERVER_NAME'];
>  header("Location:
>  https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
>  exit;
>  }
>  ?>
>
>  at the beginning of each secure script -- is that correct?

I would still at least use the port 80/443 example that I provided
as a backup for portability.

Also, keep in mind that all $_SERVER Superglobals were only
introduced in 4.1.0.  Any scripts written before that (and any old
versions of PHP) should be using $HTTP_SERVER_VARS.

>  But the redirect still requires a script to be in the https
>  directory, does it not?

That depends solely on the server configuration.  Check with your sysop.

-- 


Daniel P. Brown
Senior Unix Geek


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



RE: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread tedd

At 12:53 PM -0500 2/25/08, Andrés Robinet wrote:

*gringos* started calling me Rob long ago. It's shorter, it's easier to
pronounce and it's a short form for my last name (Robinet).


Gringos?

That brings up another subject, why is it that 
Caucasians don't have any offensive slang words? 
We are called by all sorts of slang (i.e., 
cracker, white-bread, hunkie, and so on), but we 
don't have something equivalent to the n-word/


No reply is needed -- just a comment.

Thanks for pointing out the *who* instead of 
*that* :), since I didn't realized

it until now.


That's alright, many English writers get that 
wrong. You see, when the object is not a person, 
then the use of "that" is proper. However, if you 
are referring to a person, then "who" is proper.


I see a similar thing with people using "then" 
when they mean "than", but that may be a Brit 
thing -- like driving on the wrong side of the 
street or eating with their fork in the wrong 
hand -- you know one of those cultural things 
that went haywire. :-)


Cheers,

tedd

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 10:28 -0600, Ray Hauge wrote:
> Robert Cummings wrote:
> > On Tue, 2008-02-26 at 10:38 -0500, tedd wrote:
> >> At 4:27 PM +0100 2/26/08, Jochem Maas wrote:
> >>> tedd schreef:
>  Now you sound like my wife.  :-)
> >>> for your sake I hope I don't look like her :-P
> >> No, I have an absolutely beautiful wife -- no complaints in that 
> >> department.
> >>
> >>> that said I'd hazard a guess and say you listen to what she says ... my ex
> >>> used to say the same thing.
> >> Ex's are the experience you need to get it to work.
> >>
> >> I've always said that everyone should go through at least one divorce 
> >> before getting married.
> > 
> > Marriage?? That's for backwards people stuck in ancient pointless
> > traditions >:) And moreso in today's culture... it's just a commercial
> > suckfest when your money could better go to student loans and raising a
> > family.
> > 
> > I've been happily living in sin with my common-law wife for 9 years.
> > Besides, isn't marriage primarily a religious thing? In the old
> > testament marriage was often implied by the simple act of laying with a
> > woman... or two... or three... Polygamy, how did that fall out of
> > religious favour? :)
> > 
> > Cheers,
> > Rob.
> 
> I know it was a rhetorical question, but I was curious.
> 
> A lot of the modern standards started when St. Augustine started 
> teaching that the fall of Adam and Eve was the "original sin" which was 
> sex.  Somehow that took hold and then sex became a "bad thing" and to be 
> the most holy of holy you should be celibate.
> 
> http://en.wikipedia.org/wiki/Augustine_of_Hippo
> 
> As far as the history of monogamy goes, I had to look this one up.  It 
> also seems to stem from the teachings of St. Augustine (late AD 300s). 
> Martin Luther eventually allowed polygamy after coming to the conclusion 
> that there was no scriptural evidence that polygamy was wrong. 
> Obviously that's no longer in effect though.  It has also been allowed 
> after certain wars to beef up the population again.
> 
> http://en.wikipedia.org/wiki/Polygamy#Christianity
> 
> I typically don't use wikipedia for sole sources, but everything else I 
> could find was some religious site that was very biased.

Interesting.

So... using this system, a world where everyone is as holy as can be
would be a world devoid of humans (gotta have sex to reproduce). I don't
think St. Augustine was thinking it through :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 11:53 -0500, Daniel Brown wrote:
> On Tue, Feb 26, 2008 at 11:47 AM, Paul Scott <[EMAIL PROTECTED]> wrote:
> >
> >  On Tue, 2008-02-26 at 11:44 -0500, Daniel Brown wrote:
> >  > I wonder if I can just apt-get the wedding and have it all
> >  > automated for me.  ;-P
> >
> >  If only! I remember the stress, and a good friend of mine is gettin'
> >  hitched on Sat - while I am in Uganda - go figure!
> >
> >  Anyway, congrats, and enjoy the day... (Jokes aside of course)
> 
> Thanks, Paul.
> 
> All I have to say is, "Thank God for Jameson." [1]
> 
> 1:http://www.jameson.ie/

You know... until I checked the link I thought it was another Jameson...
first name Jenna. Both seem equally applicable ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 12:30 -0500, tedd wrote:
> At 12:53 PM -0500 2/25/08, Andrés Robinet wrote:
> >*gringos* started calling me Rob long ago. It's shorter, it's easier to
> >pronounce and it's a short form for my last name (Robinet).
> 
> Gringos?
> 
> That brings up another subject, why is it that 
> Caucasians don't have any offensive slang words? 
> We are called by all sorts of slang (i.e., 
> cracker, white-bread, hunkie, and so on), but we 
> don't have something equivalent to the n-word/
> 
> No reply is needed -- just a comment.

Whitey and redneck come to mind. Paleface maybe once upon a time :)
Shrug. I know in other languages there are can be slang words that defer
to Caucasians. I just can't remember any of them.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Ray Hauge

Robert Cummings wrote:

So... using this system, a world where everyone is as holy as can be
would be a world devoid of humans (gotta have sex to reproduce). I don't
think St. Augustine was thinking it through :)

Cheers,
Rob.


Haha.  I've often wondered why Christianity has survived so long because 
of this.  I'm just glad there's a lot of sinners out there, or at least 
people who aren't that crazy :)


--
Ray Hauge
www.primateapplications.com

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



RE: [PHP] checking for and enforcing https

2008-02-26 Thread Warren Vail
Most of my ISP's setup their servers to pull from the same base path for
both secure forms and non-secure forms, and I use something similar to below
to enforce the right one is being used.  One of the benefits of doing this
is I can imbed the same images and graphics by using the same business path
for them and only changing the protocol (https).  Most browsers will
complain if you imbed http images in a https form.

I think this technique of a form enforcing it's own protocol is more
reliable that struggling with different paths imbedded things like images.
In fact, if a form is entered using the wrong protocol, I'll issue a
redirect to correct things.

HTH,

Warren Vail 

> -Original Message-
> From: Daniel Brown [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 26, 2008 9:11 AM
> To: tedd
> Cc: PHP General list
> Subject: Re: [PHP] checking for and enforcing https
> 
> On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:
> >  At present, I use the actual directories (http/https) to determine if
> >  the operation of the script is secure or not.
> 
> You also hijack other people's threads.  No-no, Tedd!  *slaps hand*
> 
> >  For scripts that don't collect sensitive date, I physically place in
> >  the http directory. For scripts that do, I place in the https
> >  directory.
> 
> Not every server configuration has separate directories for secure
> and non-secure differentiation.  For example, log into your php1.net
> account on my server.
> 
> >  That's the hard way, right?
> >
> >  Instead, I could place all my scripts where I want and then add
> >
> >   >  if(!isset($_SERVER['HTTPS']) ) {
> >
> >  $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
> >  $_SERVER['SERVER_NAME'];
> >  header("Location:
> >  https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
> >  exit;
> >  }
> >  ?>
> >
> >  at the beginning of each secure script -- is that correct?
> 
> I would still at least use the port 80/443 example that I provided
> as a backup for portability.
> 
> Also, keep in mind that all $_SERVER Superglobals were only
> introduced in 4.1.0.  Any scripts written before that (and any old
> versions of PHP) should be using $HTTP_SERVER_VARS.
> 
> >  But the redirect still requires a script to be in the https
> >  directory, does it not?
> 
> That depends solely on the server configuration.  Check with your
> sysop.
> 
> --
> 
> 
> Daniel P. Brown
> Senior Unix Geek
> 
> 
> --
> 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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread tedd

At 12:10 PM -0500 2/26/08, Daniel Brown wrote:

On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:

  At present, I use the actual directories (http/https) to determine if
  the operation of the script is secure or not.


You also hijack other people's threads.  No-no, Tedd!  *slaps hand*


It's a related hijack. And, it's "hijacked" (grammar police).

At 9:51 AM -0800 2/26/08, Warren Vail wrote:

Most of my ISP's setup their servers to pull from the same base path for
both secure forms and non-secure forms, and I use something similar to below
to enforce the right one is being used.  One of the benefits of doing this
is I can imbed the same images and graphics by using the same business path
for them and only changing the protocol (https).  Most browsers will
complain if you imbed http images in a https form.


You guys rock!

You gave me a different perspective of what http and https is. I was 
thinking it was an inherited directory thing when it's actually a 
protocol that can be declared regardless of where the scripts are 
located.


Mondo cool -- and that also solves the image problem I ran into some time ago.

Thanks everyone.

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread TG

Then I guess I shouldn't link to "Bushmills" either.

- Original Message -
From: Robert Cummings <[EMAIL PROTECTED]>
To: Daniel Brown <[EMAIL PROTECTED]>
Cc: Paul Scott <[EMAIL PROTECTED]>, Debi Berkowitz <[EMAIL PROTECTED]>, 
tedd <[EMAIL PROTECTED]>, php-general@lists.php.net
Date: Tue, 26 Feb 2008 12:43:05 -0500
Subject: Re: [PHP] How do you send stylized email?

> 
> On Tue, 2008-02-26 at 11:53 -0500, Daniel Brown wrote:
> > On Tue, Feb 26, 2008 at 11:47 AM, Paul Scott <[EMAIL PROTECTED]> wrote:
> > >
> > >  On Tue, 2008-02-26 at 11:44 -0500, Daniel Brown wrote:
> > >  > I wonder if I can just apt-get the wedding and have it all
> > >  > automated for me.  ;-P
> > >
> > >  If only! I remember the stress, and a good friend of mine is gettin'
> > >  hitched on Sat - while I am in Uganda - go figure!
> > >
> > >  Anyway, congrats, and enjoy the day... (Jokes aside of course)
> > 
> > Thanks, Paul.
> > 
> > All I have to say is, "Thank God for Jameson." [1]
> > 
> > 1:http://www.jameson.ie/
> 
> You know... until I checked the link I thought it was another Jameson...
> first name Jenna. Both seem equally applicable ;)
> 
> Cheers,
> Rob.
> -- 
> ..
> | InterJinn Application Framework - http://www.interjinn.com |
> ::
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for   |
> | creating re-usable components quickly and easily.  |
> `'
> 
> -- 
> 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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 12:43 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
>  On Tue, 2008-02-26 at 11:53 -0500, Daniel Brown wrote:
>  > All I have to say is, "Thank God for Jameson." [1]
>  >
>  > 1:http://www.jameson.ie/
>
>  You know... until I checked the link I thought it was another Jameson...
>  first name Jenna. Both seem equally applicable ;)

Yeah not so much on my wedding day, Cummings.

Pun absolutely intended.  Thanks for use of your name.  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread David Giragosian
On 2/26/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
> On Tue, 2008-02-26 at 12:30 -0500, tedd wrote:
> > At 12:53 PM -0500 2/25/08, Andrés Robinet wrote:
> > >*gringos* started calling me Rob long ago. It's shorter, it's easier to
> > >pronounce and it's a short form for my last name (Robinet).
> >
> > Gringos?
> >
> > That brings up another subject, why is it that
> > Caucasians don't have any offensive slang words?
> > We are called by all sorts of slang (i.e.,
> > cracker, white-bread, hunkie, and so on), but we
> > don't have something equivalent to the n-word/
> >
> > No reply is needed -- just a comment.
>
> Whitey and redneck come to mind. Paleface maybe once upon a time :)
> Shrug. I know in other languages there are can be slang words that defer
> to Caucasians. I just can't remember any of them.
>
> Cheers,
> Rob.
> --
>

My black friends here at work tell me that 'cracker' is indeed the
equivalent of the n-word. In fact, they tell me that they were warned
by their parents not to use it and punished severely if they did. I'm
talking about colleagues in their late 30's early 40's, so it may be a
generational artifact.

-- 

-David.

When the power of love
overcomes the love of power,
the world will know peace.

-Jimi Hendrix

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 1:11 PM, tedd <[EMAIL PROTECTED]> wrote:
> At 12:10 PM -0500 2/26/08, Daniel Brown wrote:
>  >On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:
>  >>   At present, I use the actual directories (http/https) to determine if
>  >>   the operation of the script is secure or not.
>  >
>  > You also hijack other people's threads.  No-no, Tedd!  *slaps hand*
>
>  It's a related hijack. And, it's "hijacked" (grammar police).

Check your tense, Mr. Sperling.  You said, "At present, I use",
which sets the tense for my "You also hijack" statement.  Grammar
Rent-A-Cop.  ;-P


>  At 9:51 AM -0800 2/26/08, Warren Vail wrote:
>  >Most of my ISP's setup their servers to pull from the same base path for
>  >both secure forms and non-secure forms, and I use something similar to below
>  >to enforce the right one is being used.  One of the benefits of doing this
>  >is I can imbed the same images and graphics by using the same business path
>  >for them and only changing the protocol (https).  Most browsers will
>  >complain if you imbed http images in a https form.

And rightly they should!  Any embedded images, Flash movies,
scripts, frames, references, or objects can "sniff the wire" with
minimal manipulation.  As a proof of concept back in 2005 (which still
works today), I modified an image to be used on MySpace which is able
to grab personal information and redirect to http://www.gfy.com/.  And
no, that's not short for Goofy.com even though he is the best
cartoon character ever.  The problem is, there's nothing MySpace (or
any site in which the graphic is displayed) can do about it, short of
disabling all remote src="" calls.

Thus, even locally, all things should be encrypted when sent on an
SSL connection.  If not, why bother encrypting anything at all?  A
house is only as secure as the strength of the glass in the windows.

On Tue, Feb 26, 2008 at 1:11 PM, tedd <[EMAIL PROTECTED]> wrote:
>  You guys rock!

Damn straight.

>  You gave me a different perspective of what http and https is. I was
>  thinking it was an inherited directory thing when it's actually a
>  protocol that can be declared regardless of where the scripts are
>  located.

It's fun to learn, 'cause knowledge is power!  ;-P

---*
The More You Know!

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 12:30 PM, tedd <[EMAIL PROTECTED]> wrote:
> At 12:53 PM -0500 2/25/08, Andrés Robinet wrote:
>  >*gringos* started calling me Rob long ago. It's shorter, it's easier to
>  >pronounce and it's a short form for my last name (Robinet).
>
>  Gringos?
>
>  That brings up another subject, why is it that
>  Caucasians don't have any offensive slang words?
>  We are called by all sorts of slang (i.e.,
>  cracker, white-bread, hunkie, and so on), but we
>  don't have something equivalent to the n-word/
>
>  No reply is needed -- just a comment.

Too bad, you get a reply anyway.

That's EXACTLY the same thing I keep saying!  In fact,
"Gringo" is probably the most offensive, and even that doesn't phase
me.  Not only are none of the terms for whites offensive, none of them
are funny words.  I'll admit, I like the sound of some racial slurs
and derogatory terms; NOT because of the hateful epithet and
intonation, but because the word itself is funny.

And I'm a firm believer that a word only carries as much power as
you allow it.  Of course, there's still a time and place for
everything, and while I wouldn't ever scream NR at a black man, I
can't help but laugh when I hear the word.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Robert Cummings

On Tue, 2008-02-26 at 13:14 -0500, Daniel Brown wrote:
> On Tue, Feb 26, 2008 at 12:43 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> >
> >  On Tue, 2008-02-26 at 11:53 -0500, Daniel Brown wrote:
> >  > All I have to say is, "Thank God for Jameson." [1]
> >  >
> >  > 1:http://www.jameson.ie/
> >
> >  You know... until I checked the link I thought it was another Jameson...
> >  first name Jenna. Both seem equally applicable ;)
> 
> Yeah not so much on my wedding day, Cummings.
> 
> Pun absolutely intended.  Thanks for use of your name.  ;-P

My pr0n agent says you need ot pay me everytime you use my name... and I
am keeping track of occurrences in email headers.

:)

What's really funny is that my wife's last name is Dewar.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread tedd

At 1:27 PM -0500 2/26/08, Daniel Brown wrote:


It's fun to learn, 'cause knowledge is power!  ;-P

---*
The More You Know!



Yes, as the ads say "A mind is a terrible thing..."

Cheers,

tedd

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

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



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread tedd

At 12:26 PM -0600 2/26/08, David Giragosian wrote:

My black friends here at work tell me that 'cracker' is indeed the
equivalent of the n-word. In fact, they tell me that they were warned
by their parents not to use it and punished severely if they did. I'm
talking about colleagues in their late 30's early 40's, so it may be a
generational artifact.


Now you tell me!

All this time I thought they were asking for parrot food.

Cheers,

tedd

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

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



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Greg Donald
On 2/26/08, Ray Hauge <[EMAIL PROTECTED]> wrote:
> I'm just glad there's a lot of sinners out there, or at least
> people who aren't that crazy :)

They're called hypocrites.


-- 
Greg Donald
http://destiney.com/

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



[PHP] Ob_Flush issue

2008-02-26 Thread Ritesh Nadhani
Hello

I have a sample code like: http://pastebin.ca/919386

I have around 4000 rows returned so it should show me partial output
at client after each 100 rows but it never does. I am only getting the
output after full completion.

Though if you remove the step code and output after every row then i
can see the update.

My phpinfo(): http://craig.cs.uiowa.edu/smt/phpinfo.php

Any idea what might be the problem? I want to show a status message
after every 100 rows processed..

-- 
Ritesh
http://www.riteshn.com

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



RES: [PHP] Ob_Flush issue

2008-02-26 Thread Thiago Pojda
try now

http://pastebin.ca/919399 

Remember IE only starts displaying a page after it receives 256bytes.

-Mensagem original-
De: Ritesh Nadhani [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 17:07
Para: php-general@lists.php.net
Assunto: [PHP] Ob_Flush issue

Hello

I have a sample code like: http://pastebin.ca/919386

I have around 4000 rows returned so it should show me partial output at
client after each 100 rows but it never does. I am only getting the output
after full completion.

Though if you remove the step code and output after every row then i can see
the update.

My phpinfo(): http://craig.cs.uiowa.edu/smt/phpinfo.php

Any idea what might be the problem? I want to show a status message after
every 100 rows processed..

--
Ritesh
http://www.riteshn.com

--
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



[PHP] PHP Newbie List

2008-02-26 Thread revDAVE
Rather than bug folks on this cool list for beginner questions - does anyone
know of a good PHP Newbie email List?

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]

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



[PHP] Re: Ob_Flush issue

2008-02-26 Thread Shawn McKenzie
Ritesh Nadhani wrote:
> Hello
> 
> I have a sample code like: http://pastebin.ca/919386
> 
> I have around 4000 rows returned so it should show me partial output
> at client after each 100 rows but it never does. I am only getting the
> output after full completion.
> 
> Though if you remove the step code and output after every row then i
> can see the update.
> 
> My phpinfo(): http://craig.cs.uiowa.edu/smt/phpinfo.php
> 
> Any idea what might be the problem? I want to show a status message
> after every 100 rows processed..
> 

Try removing the ob_start().  output_buffering is set in your php.ini,
so it should already be running.  You are probably starting a nested
buffer inside of the automatic one.

-Shawn

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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 3:11 PM, revDAVE <[EMAIL PROTECTED]> wrote:
> Rather than bug folks on this cool list for beginner questions - does anyone
>  know of a good PHP Newbie email List?

php-general@lists.php.net

You're in the right place.  ;-)

There are forums elsewhere around the web, though.  As usual, I'll
recommend PHPBuilder.

http://www.phpbuilder.com/

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Greg Donald
On 2/26/08, revDAVE <[EMAIL PROTECTED]> wrote:
> Rather than bug folks on this cool list for beginner questions - does anyone
>  know of a good PHP Newbie email List?

The newbie list idea was shot down multiple times over the years.  Ask here.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Jason Pruim


On Feb 26, 2008, at 3:11 PM, revDAVE wrote:

Rather than bug folks on this cool list for beginner questions -  
does anyone

know of a good PHP Newbie email List?



Hi revDAVE,

I know of no better resource for PHP related help then this lists... I  
have learned everything I have from these people here. Most of them  
are really nice to newbies too :)


I cut my teeth on this list, and don't regret it. And besides... If  
you have a question I may actually be able to help you and give back  
to a community that gave to me! :)



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]

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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Wolf

 revDAVE <[EMAIL PROTECTED]> wrote: 
> Rather than bug folks on this cool list for beginner questions - does anyone
> know of a good PHP Newbie email List?
> 
> --
> Thanks - RevDave
> Cool @ hosting4days . com
> [db-lists]

We're glad to help around here, just realize that none of us are going to write 
your code for you.  You're going to need to write code, stumble, cuss a bit and 
then post to the list and ask what the flip is happening and where the script 
barfed.

Sometimes that extra set of eyes helps to find the dangling or missing ';' 
better then staring at the code for hours...  (I think we've all been here at 
some point).

Wolf

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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 3:30 PM, Wolf <[EMAIL PROTECTED]> wrote:
>  Sometimes that extra set of eyes helps to find the dangling or missing ';' 
> better then staring at the code for hours...  (I think we've all been here at 
> some point).

Speak for yourself.  My code is always 100% spotless, efficient,
and runs the first time, completely bug-free, every single time, as it
has for years.

Well, until the alarm clock goes off, anyway.  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Jason Pruim


On Feb 26, 2008, at 3:30 PM, Wolf wrote:



 revDAVE <[EMAIL PROTECTED]> wrote:
Rather than bug folks on this cool list for beginner questions -  
does anyone

know of a good PHP Newbie email List?

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]


We're glad to help around here, just realize that none of us are  
going to write your code for you.  You're going to need to write  
code, stumble, cuss a bit and then post to the list and ask what the  
flip is happening and where the script barfed.


Sometimes that extra set of eyes helps to find the dangling or  
missing ';' better then staring at the code for hours...  (I think  
we've all been here at some point).


*Raises his hand! Not a PHP problem but staring at the code right now  
wondering why my navigation menu isn't displaying... Getting ready to  
cuss... Maybe even grab a beer.. I need to keep beer in the fridge at  
work... Okay I'm done now :)






Wolf

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




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]

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



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Shawn McKenzie
tedd wrote:
> At 12:53 PM -0500 2/25/08, Andrés Robinet wrote:
>> *gringos* started calling me Rob long ago. It's shorter, it's easier to
>> pronounce and it's a short form for my last name (Robinet).
> 
> Gringos?
> 
> That brings up another subject, why is it that Caucasians don't have any
> offensive slang words? We are called by all sorts of slang (i.e.,
> cracker, white-bread, hunkie, and so on), but we don't have something
> equivalent to the n-word/
> 
> No reply is needed -- just a comment.
> 
>> Thanks for pointing out the *who* instead of *that* :), since I didn't
>> realized
>> it until now.
> 
> That's alright, many English writers get that wrong. You see, when the
> object is not a person, then the use of "that" is proper. However, if
> you are referring to a person, then "who" is proper.
> 
> I see a similar thing with people using "then" when they mean "than",
> but that may be a Brit thing -- like driving on the wrong side of the
> street or eating with their fork in the wrong hand -- you know one of
> those cultural things that went haywire. :-)
> 
> Cheers,
> 
> tedd
> 

They (anyone non-white) call us howlies in Hawaii I believe and it's not
meant as a compliment.  Regardless, most whites don't take any of these
that negatively because we don't view ourselves as the oppressed and
don't view the others as oppressors shouting offensive slang at us.

Cinco de Mayo is big here in Texas and I held a Gringo de Mayo party
last year on the 5th of May.  It was a big hit!

-Shawn

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



Re: [PHP] PHP Newbie List

2008-02-26 Thread tedd

At 12:11 PM -0800 2/26/08, revDAVE wrote:

Rather than bug folks on this cool list for beginner questions - does anyone
know of a good PHP Newbie email List?

--
Thanks - RevDave


Welcome.

We're used to bugs. Besides, we're all beginners in something.

So, ask away -- we'll be more than happy to tell you RTFM :-)

Cheers,

tedd


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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Shawn McKenzie
Andrew Ballard wrote:
> On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:
>> At 11:03 AM -0500 2/26/08, Robert Cummings wrote:
>>  >On Tue, 2008-02-26 at 10:57 -0500, Andrew Ballard wrote:
>>
>>>  > Am I misunderstanding you somewhere?
>>  >
>>  >I don't think you are. I think Ted has been doing it the hard way... but
>>  >the lightbulb may have just gone on :)
>>  >
>>  >Cheers,
>>  >Rob.
>>
>>  It's flickering -- sorry to be so dim.
>>
>>  At present, I use the actual directories (http/https) to determine if
>>  the operation of the script is secure or not.
>>
>>  For scripts that don't collect sensitive date, I physically place in
>>  the http directory. For scripts that do, I place in the https
>>  directory.
>>
>>  That's the hard way, right?
>>
>>  Instead, I could place all my scripts where I want and then add
>>
>>  >  if(!isset($_SERVER['HTTPS']) ) {
>>
>>  $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
>>  $_SERVER['SERVER_NAME'];
>>  header("Location:
>>  https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
>>  exit;
>>  }
>>  ?>
>>
>>  at the beginning of each secure script -- is that correct?
>>
>>  But the redirect still requires a script to be in the https
>>  directory, does it not?
>>
> 
> No, it doesn't. Any of your scripts can be in any folder you wish. All
> the redirect does is add the 's' to the http protocol at the beginning
> of the URL so that the browser knows to encrypt any data it sends and
> decrypt any data it receives. I guess you could probably configure
> your server so that all content served from your https directory must
> use SSL, but then you are just moving the check from PHP to the web
> server.
> 
> Andrew

When most people talk about a http and https directory, they are most
likely talking about the common convention in shared hosting especially
on Apache where your account will have a httpdocs/ and a httpsdocs/
directory or similar.  Apache sets the docroot depending upon what
protocol is used http or https.  It seems fairly common.

In some control panels you have the option of serving secure and
non-secure content from the same directory.  Then you would need to
enforce this yourself within the script or rewrite rule, etc...

-Shawn

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



Re: [PHP] Ob_Flush issue

2008-02-26 Thread Bojan Tesanovic

Try this it help 90% of time,

function my_flush(){
@flush();
@ob_flush();
@flush();
@ob_flush();
@flush();
@ob_flush();
}

this can force buffer to really flush output when you call it few  
times,  also don't forget @ so it doesn't show empty buffer  
warning .





On Feb 26, 2008, at 9:06 PM, Ritesh Nadhani wrote:


Hello

I have a sample code like: http://pastebin.ca/919386

I have around 4000 rows returned so it should show me partial output
at client after each 100 rows but it never does. I am only getting the
output after full completion.

Though if you remove the step code and output after every row then i
can see the update.

My phpinfo(): http://craig.cs.uiowa.edu/smt/phpinfo.php

Any idea what might be the problem? I want to show a status message
after every 100 rows processed..

--
Ritesh
http://www.riteshn.com

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



Bojan Tesanovic
http://www.classicio.com/
http://www.carster.us/





Re: [PHP] PHPDoc autocomplete hints

2008-02-26 Thread Bojan Tesanovic


In getUserDAO()  method you need to specify return type eg

/**
* @return UserDAO
*/
function getUserDAO(){
 ...

}


and UserDAO  class must have resetPW method, I guess it alredy has.


This works for me, I have Zend Studio 5.5.0


On Feb 26, 2008, at 2:21 PM, Thiago Pojda wrote:


Guys,

I'm new to this thing and I'm not sure if it's my IDE (ZendStudioNeon)
problem, or if I'm doing something wrong. I always use PHPDoc block  
comments
on my functions, but this time I'm using factories in my code and  
missing
autocomplete on those objects. I've tried using those hints as  
below, but

with no luck. What am I missing?

/* This code is not real */
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory->getUserDAO(); //autocomplete ok
$usrObj->resetPW($usr, $newPw); // no autocomplete here

I've tryed using:
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory->getUserDAO(); //autocomplete ok
/* @var $usrObj UserDAO */
$usrObj->resetPW($usr, $newPw); // but still no autocomplete here

Tried also
/* @var UserDAO */
$usrObj->resetPW($usr, $newPw); // no luck either


Thanks for your help.


PS: I've sent a similar message to ZendStudioNeon mailing list.

Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros




Bojan Tesanovic
http://www.classicio.com/
http://www.real-estates-sale.com/





Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread tedd

At 2:44 PM -0600 2/26/08, Shawn McKenzie wrote:

They (anyone non-white) call us howlies in Hawaii I believe and it's not
meant as a compliment.  Regardless, most whites don't take any of these
that negatively because we don't view ourselves as the oppressed and
don't view the others as oppressors shouting offensive slang at us.


Well, that depends.

Trying being born in the Ozarks. While "Amos & Andy" was taken off 
the air for being stereotypical,our "race" can't get Hillbilly Bread 
off the shelves, Snuffy Smith out of cartoons, nor the Beverly 
Hillbillies off TV -- we're stereotyped as being incestuous, 
ignorant, barefoot, and our only attribute is that we can shoot 
straight.  :-)


Cheers,

tedd

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

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Andrew Ballard
On Tue, Feb 26, 2008 at 4:06 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>
> Andrew Ballard wrote:
>  > On Tue, Feb 26, 2008 at 11:54 AM, tedd <[EMAIL PROTECTED]> wrote:
>  >> At 11:03 AM -0500 2/26/08, Robert Cummings wrote:
>  >>  >On Tue, 2008-02-26 at 10:57 -0500, Andrew Ballard wrote:
>  >>
>  >>>  > Am I misunderstanding you somewhere?
>  >>  >
>  >>  >I don't think you are. I think Ted has been doing it the hard way... but
>  >>  >the lightbulb may have just gone on :)
>  >>  >
>  >>  >Cheers,
>  >>  >Rob.
>  >>
>  >>  It's flickering -- sorry to be so dim.
>  >>
>  >>  At present, I use the actual directories (http/https) to determine if
>  >>  the operation of the script is secure or not.
>  >>
>  >>  For scripts that don't collect sensitive date, I physically place in
>  >>  the http directory. For scripts that do, I place in the https
>  >>  directory.
>  >>
>  >>  That's the hard way, right?
>  >>
>  >>  Instead, I could place all my scripts where I want and then add
>  >>
>  >>>>  if(!isset($_SERVER['HTTPS']) ) {
>  >>
>  >>  $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] :
>  >>  $_SERVER['SERVER_NAME'];
>  >>  header("Location:
>  >>  https://".$url.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
>  >>  exit;
>  >>  }
>  >>  ?>
>  >>
>  >>  at the beginning of each secure script -- is that correct?
>  >>
>  >>  But the redirect still requires a script to be in the https
>  >>  directory, does it not?
>  >>
>  >
>  > No, it doesn't. Any of your scripts can be in any folder you wish. All
>  > the redirect does is add the 's' to the http protocol at the beginning
>  > of the URL so that the browser knows to encrypt any data it sends and
>  > decrypt any data it receives. I guess you could probably configure
>  > your server so that all content served from your https directory must
>  > use SSL, but then you are just moving the check from PHP to the web
>  > server.
>  >
>  > Andrew
>
>  When most people talk about a http and https directory, they are most
>  likely talking about the common convention in shared hosting especially
>  on Apache where your account will have a httpdocs/ and a httpsdocs/
>  directory or similar.  Apache sets the docroot depending upon what
>  protocol is used http or https.  It seems fairly common.
>
>  In some control panels you have the option of serving secure and
>  non-secure content from the same directory.  Then you would need to
>  enforce this yourself within the script or rewrite rule, etc...
>
>  -Shawn
>
>
>

Learn something new every day. I haven't used SSL on the few sites I
do on Apache, so I've never seen that. They just offer the ability to
install SSL certificates (or use their own SSL address rather than
your own domain name) and both sites just point to the root web
folder.

Andrew

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



Re: [PHP] Ob_Flush issue

2008-02-26 Thread Shawn McKenzie
Bojan Tesanovic wrote:
> Try this it help 90% of time,
> 
> function my_flush(){
> @flush();
> @ob_flush();
> @flush();
> @ob_flush();
> @flush();
> @ob_flush();
> }
> 
> this can force buffer to really flush output when you call it few
> times,  also don't forget @ so it doesn't show empty buffer warning .
> 
> 
> 
> 
> On Feb 26, 2008, at 9:06 PM, Ritesh Nadhani wrote:
> 
>> Hello
>>
>> I have a sample code like: http://pastebin.ca/919386
>>
>> I have around 4000 rows returned so it should show me partial output
>> at client after each 100 rows but it never does. I am only getting the
>> output after full completion.
>>
>> Though if you remove the step code and output after every row then i
>> can see the update.
>>
>> My phpinfo(): http://craig.cs.uiowa.edu/smt/phpinfo.php
>>
>> Any idea what might be the problem? I want to show a status message
>> after every 100 rows processed..
>>
>> -- 
>> Ritesh
>> http://www.riteshn.com
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
> 
> Bojan Tesanovic
> http://www.classicio.com/
> http://www.carster.us/
> 
> 
> 
> 
There are many oddities with different web servers and browsers.  Some
don't do what you expect: http://us2.php.net/manual/en/function.flush.php

Depending on the script, when I want to see if buffering is active or at
what level and want to recursively flush or end buffers, I use:

while(ob_get_level() != 0)
//flush or end or clean, etc...
or

while(($contents = ob_get_contents) !== false)
//flush or end or clean, etc...

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



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Shawn McKenzie
our only attribute is that we can shoot straight.  :-)
> 
> Cheers,
> 
> tedd
> 
And jump really high... oh wait...

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 4:06 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>  When most people talk about a http and https directory, they are most
>  likely talking about the common convention in shared hosting especially
>  on Apache where your account will have a httpdocs/ and a httpsdocs/
>  directory or similar.  Apache sets the docroot depending upon what
>  protocol is used http or https.  It seems fairly common.

That's not Apache-centric though.  It's based upon the layout of
the operating system or control panel architecture, and it's not
really all too common.  I believe Plesk and Helm may use it, but by
default (and in cPanel), your web files will normally go to
~/public_html/ for everything, and then HTTPS/SSL connections simply
encrypt everything served from there when called, as opposed to
non-encrypted content-serving on standard HTTP.

Of course, getting into that is a completely different discussion
from the post made by the OP whom, as it appears, gave up and took
off when Tedd *hijacked* his thread.  ;-P

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Greg Donald
On 2/26/08, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>  They (anyone non-white) call us howlies in Hawaii I believe and it's not
>  meant as a compliment.  Regardless, most whites don't take any of these
>  that negatively because we don't view ourselves as the oppressed and
>  don't view the others as oppressors shouting offensive slang at us.

It seems to me that we have many in U.S. society who still very much
want to be thought of as being oppressed.  Take this "Black History
Month" business for example, I don't recall ever having anyone
reminding me to celebrate "American Indian Heritage Month".  Or is it
because I don't live near a casino?

Seems a bit unfair, especially since I was never personally an
oppressor of Native Americans or Blacks.  But I still have to hear
about certain celebrations, every year, for an entire month.

I say drop all the silly heritage-related theme months completely and
simply celebrate humanity not having blown itself up in the past year.
 I don't need a reason to drink but that'd be one I could use all the
same.

And for the all important "record", my Mexican friend Lalo says
"gringo" isn't nearly as potent an insult as it was back in the 70's
when he actually used it towards Texans who didn't know or care that
he was also a native Texan by birth.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] PHP Newbie List

2008-02-26 Thread Greg Donald
On 2/26/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> Speak for yourself.  My code is always 100% spotless, efficient,
>  and runs the first time, completely bug-free, every single time, as it
>  has for years.

Well, in Ruby on Rails, it has this..   nevermind.


-- 
Greg Donald
http://destiney.com/

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



RE: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Andrés Robinet
> -Original Message-
> From: Shawn McKenzie [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 26, 2008 3:44 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Question about PHP Licence and it's future!
> 
> tedd wrote:
> > At 12:53 PM -0500 2/25/08, Andrés Robinet wrote:
> >> *gringos* started calling me Rob long ago. It's shorter, it's easier to
> >> pronounce and it's a short form for my last name (Robinet).
> >
> > Gringos?
> >
> > That brings up another subject, why is it that Caucasians don't have any
> > offensive slang words? We are called by all sorts of slang (i.e.,
> > cracker, white-bread, hunkie, and so on), but we don't have something
> > equivalent to the n-word/
> >
> > No reply is needed -- just a comment.
> >
> >> Thanks for pointing out the *who* instead of *that* :), since I didn't
> >> realized
> >> it until now.
> >
> > That's alright, many English writers get that wrong. You see, when the
> > object is not a person, then the use of "that" is proper. However, if
> > you are referring to a person, then "who" is proper.
> >
> > I see a similar thing with people using "then" when they mean "than",
> > but that may be a Brit thing -- like driving on the wrong side of the
> > street or eating with their fork in the wrong hand -- you know one of
> > those cultural things that went haywire. :-)
> >
> > Cheers,
> >
> > tedd
> >
> 
> They (anyone non-white) call us howlies in Hawaii I believe and it's not
> meant as a compliment.  Regardless, most whites don't take any of these
> that negatively because we don't view ourselves as the oppressed and
> don't view the others as oppressors shouting offensive slang at us.
> 
> Cinco de Mayo is big here in Texas and I held a Gringo de Mayo party
> last year on the 5th of May.  It was a big hit!
> 
> -Shawn

Well,

I don't know why some people gives so much importance to words. But I think it's
related to what someone said once (don't know who):

"The raw description of evil scandalizes people much more than the perpetration
of it"

I have some friends who are called *gringo* and some others who are called
*niger*. What's more, here in Argentina, many times we call ourselves *niger*
(The Spanish word is *negro*) as you would say *buddy* (like *hey niger, let's
play soccer tomorrow*), independently of skin color or social status.
We also use the same word (*niger*) in a slighting way, referring to ignorant
people or people with bad habits (among other things). But we rarely use
*gringo* in a slighting way. More often than not we call *gringa* to a hot
blonde woman. Now, in Mexico, a *gringo* would mean an US citizen most of the
time, and it would be used in a pejorative way most of the time as well. I think
you'd all benefit of reading http://en.wikipedia.org/wiki/Gringo:

"In South America, the word is not pejorative. In some countries it may be used
to refer to any foreigner who does not speak Spanish, but in other countries it
is used just or especially to refer to U.S. citizens; it may also be used to
describe a blond or brunette white native person with soft facial features and
light colored eyes. For instance, it is a popular nickname"

Now, why I said *gringos*? In my case gringos meant both US citizens and
Caucasian people (specifically German people), and I didn't mean it in any
pejorative way. My company's president (who started calling me Rob in the first
place) is a native German, now living in Florida for several years. Same for her
husband, and same for many business partners or clients or friends of her. And I
have a very nice relationship with them, and they all call me Rob. If I wrote an
email signing it *Regards, Andrés*, they wouldn't know who I am (lol).

However, I must admit that I used the term *gringo* in the Mexican sense at
least once in my life, but just for the fun of it (back in 2002 when I entered
English chat rooms to perfection my English and learn a bit of the slang... I
was such a dumbass, lol).

IMHO, more important than words is the mouth that pronounces them and the ears
that hear them, my father-in-law calls me *Mr Magoo* because of my glasses, and
I call him *Viejo violeta* (something similar to *pervert*) and we get along
very well (despite I've stolen her beloved daughter :D).

Regards,

Rob(inet)

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Rick Pasotto
On Tue, Feb 26, 2008 at 04:46:38PM -0500, Daniel Brown wrote:
> 
> Of course, getting into that is a completely different discussion
> from the post made by the OP whom, as it appears, gave up and took
> off when Tedd *hijacked* his thread.  ;-P

No, I've been reading all the posts and have learned and implemented.

Works great.

I've had nothing to add although I've been somewhat annoyed by the
excessive quoting.

-- 
"The most important thing in life is not simply to capitalize on your
 gains. Any fool can do that. The important thing is to profit from your
 losses. That requires intelligence, and makes the difference between a
 man of sense and a fool." -- Dale Carnegie
Rick Pasotto[EMAIL PROTECTED]http://www.niof.net

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



Re: [PHP] checking for and enforcing https

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 5:39 PM, Rick Pasotto <[EMAIL PROTECTED]> wrote:
>  I've had nothing to add although I've been somewhat annoyed by the
>  excessive quoting.

That's probably on the fault of people like myself who use Gmail.
It hides the quoted text automatically, so we don't even see the
jumbled mess unless we purposely look for it.  I do my best to trim my
posts down, but I'm sure I'm guilty of quoting messages to a size of
Biblical proportions.

-- 


Daniel P. Brown
Senior Unix Geek


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



  1   2   >