|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Tue Feb 26 2008 - 17:10:53 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 26 Feb 2008 23:10:53 -0000 Issue 5316
Topics (messages 270143 through 270243):
Re: Sending SMS via PHP
270143 by: jeffry s
PHPDoc autocomplete hints
270144 by: Thiago Pojda
270231 by: Bojan Tesanovic
Re: PHP cuts download process prematurely
270145 by: Manuel Barros Reyes
270147 by: Manuel Barros Reyes
270148 by: Wolf
270182 by: Daniel Brown
How do you send stylized email?
270146 by: tedd
270150 by: Richard Heyes
270151 by: Per Jessen
270153 by: Jochem Maas
270155 by: Daniel Brown
270156 by: Daniel Brown
270157 by: tedd
270159 by: tedd
270160 by: tedd
270161 by: tedd
270164 by: Jochem Maas
270166 by: tedd
270169 by: Jochem Maas
270172 by: TG
270173 by: tedd
270175 by: Robert Cummings
270185 by: Daniel Brown
270186 by: Daniel Brown
270187 by: Ray Hauge
270188 by: Daniel Brown
270189 by: Bastien Koert
270190 by: Paul Scott
270193 by: Daniel Brown
270194 by: Paul Scott
270195 by: Daniel Brown
270197 by: Edward Kay
270198 by: tedd
270202 by: Robert Cummings
270203 by: Robert Cummings
270205 by: Ray Hauge
270208 by: TG
270209 by: Daniel Brown
270213 by: Robert Cummings
270216 by: Greg Donald
Re: checking for and enforcing https
270149 by: tedd
270152 by: Dan Joseph
270154 by: Per Jessen
270158 by: Daniel Brown
270162 by: Aleksandar Vojnovic
270163 by: Robert Cummings
270165 by: tedd
270167 by: Wolf
270168 by: Robert Cummings
270174 by: tedd
270176 by: Andrew Ballard
270177 by: Dan Joseph
270178 by: Robert Cummings
270179 by: Robert Cummings
270180 by: Robert Cummings
270181 by: Jim Lucas
270184 by: Dan Joseph
270191 by: Daniel Brown
270196 by: tedd
270199 by: Andrew Ballard
270200 by: Daniel Brown
270206 by: Warren Vail
270207 by: tedd
270211 by: Daniel Brown
270214 by: tedd
270229 by: Shawn McKenzie
270233 by: Andrew Ballard
270236 by: Daniel Brown
270240 by: Rick Pasotto
270241 by: Daniel Brown
270242 by: tedd
Re: More than one values returned?
270170 by: tedd
270171 by: Robert Cummings
270183 by: Daniel Brown
270192 by: Bastien Koert
Re: Question about PHP Licence and it's future!
270201 by: tedd
270204 by: Robert Cummings
270210 by: David Giragosian
270212 by: Daniel Brown
270215 by: tedd
270227 by: Shawn McKenzie
270232 by: tedd
270235 by: Shawn McKenzie
270237 by: Greg Donald
270239 by: Andrés Robinet
270243 by: tedd
Ob_Flush issue
270217 by: Ritesh Nadhani
270218 by: Thiago Pojda
270220 by: Shawn McKenzie
270230 by: Bojan Tesanovic
270234 by: Shawn McKenzie
PHP Newbie List
270219 by: revDAVE
270221 by: Daniel Brown
270222 by: Greg Donald
270223 by: Jason Pruim
270224 by: Wolf
270225 by: Daniel Brown
270226 by: Jason Pruim
270228 by: tedd
270238 by: Greg Donald
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
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 <per
computer.org> 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
>
>
attached mail follows:
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,
<http://www.softpartech.com.br/> www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda
softpartech.com.br
Excelência em Softwares Financeiros
attached mail follows:
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,
>
>
> <http://www.softpartech.com.br/> www.softpartech.com.br
>
>
> Thiago Henrique Pojda
> Desenvolvimento Web
> +55 41 3033-7676
> thiago.pojda
softpartech.com.br
> Excelência em Softwares Financeiros
>
>
Bojan Tesanovic
http://www.classicio.com/
http://www.real-estates-sale.com/
attached mail follows:
On Tue, Feb 26, 2008 at 3:07 AM, Andrés Robinet <agrobinet
bestplace.biz> 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.
attached mail follows:
On Tue, Feb 26, 2008 at 3:07 AM, Andrés Robinet <agrobinet
bestplace.biz> 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
attached mail follows:
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 <manuca
gmail.com> wrote:
> On Tue, Feb 26, 2008 at 3:07 AM, Andrés Robinet <agrobinet
bestplace.biz> 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
attached mail follows:
On Mon, Feb 25, 2008 at 10:39 PM, Manuel Barros Reyes <manuca
gmail.com> 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. :-\
<?
// Illustrates a way to serve a CSV file and ensure
// that the client is still active.
// Originally written for Manuel Barros Reyes on php-general
function enviarArchivo($contenido, $nombre_archivo = "") {
ignore_user_abort(1);
if($nombre_archivo == "") {
$nombre_archivo = date("dmyHi").".csv";
}
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$nombre_archivo");
header("Content-Length: ".strlen($contenido));
$arsenal_contenido = explode("\n",$contenido);
for($i=0;$i<count($arsenal_contenido);$i++) {
if(connection_status() != 0) {
$err = "La conexion ha estado cerrada. ";
$err .= "Estos datos no podian ser enviados:\n";
$err .= $arsenal_contenido[$i];
file_put_contents('error.txt',$err);
exit;
}
echo $arsenal_contenido[$i]."\n";
}
}
enviarArchivo(file_get_contents('test.csv'));
?>
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Hi gang:
I want to send a styled email via heredoc, can that be done?
$message = <<<EOT
Title: This is a title of the Event.
Time: This the time of the Event.
Please show up on time.
EOT
mail('example
example.com' , '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
attached mail follows:
> I want to send a styled email via heredoc, can that be done?
>
> $message = <<<EOT
> Title: This is a title of the Event.
> Time: This the time of the Event.
>
> Please show up on time.
> EOT
>
> mail('example
example.com' , 'An Event' , $message);
>
> If so, how do you style it?
>
> If not, how do you send stylized email?
The easiest way is this:
$message = <<<EOT
<span style="color: red">
Title: This is a title of the Event.
Time: This the time of the Event.
</span>
Please show up on time.
EOT
mail('example
example.com' , '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
attached mail follows:
tedd wrote:
> Hi gang:
>
> I want to send a styled email via heredoc, can that be done?
Yes.
> $message = <<<EOT
> Title: This is a title of the Event.
> Time: This the time of the Event.
>
> Please show up on time.
> EOT
>
> mail('example
example.com' , '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
attached mail follows:
tedd schreef:
> Hi gang:
>
> I want to send a styled email via heredoc, can that be done?
>
> $message = <<<EOT
> Title: This is a title of the Event.
> Time: This the time of the Event.
>
> Please show up on time.
> EOT
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('example
example.com' , '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 ;-)
attached mail follows:
On Tue, Feb 26, 2008 at 9:28 AM, tedd <tedd
sperling.com> wrote:
> Hi gang:
>
> I want to send a styled email via heredoc, can that be done?
>
> $message = <<<EOT
> 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 =<<<EOT
Title: This is the title of the Event.
Time: This is the time of the Event.
Please show up on time.
EOT;
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Tue, Feb 26, 2008 at 9:46 AM, Jochem Maas <jochem
iamjochem.com> wrote:
> style comes naturally to some of us ;-)
Well, if you know that, why do you keep acting so jealous of Tedd? ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
At 2:42 PM +0000 2/26/08, Richard Heyes wrote:
>>I want to send a styled email via heredoc, can that be done?
>>
>>$message = <<<EOT
>>Title: This is a title of the Event.
>>Time: This the time of the Event.
>>
>>Please show up on time.
>>EOT
>>
>>mail('example
example.com' , 'An Event' , $message);
>>
>>If so, how do you style it?
>>
>>If not, how do you send stylized email?
>
>The easiest way is this:
>
>$message = <<<EOT
><span style="color: red">
>Title: This is a title of the Event.
>Time: This the time of the Event.
></span>
>
>Please show up on time.
>EOT
>
>mail('example
example.com' , '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
attached mail follows:
At 3:46 PM +0100 2/26/08, Jochem Maas wrote:
>style comes naturally to some of us ;-)
:-)
Yes, but it eventually comes to <style="old">everyone</style>
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 9:52 AM -0500 2/26/08, Daniel Brown wrote:
>On Tue, Feb 26, 2008 at 9:28 AM, tedd <tedd
sperling.com> wrote:
>> Hi gang:
>>
>> I want to send a styled email via heredoc, can that be done?
>>
>> $message = <<<EOT
>> 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 =<<<EOT
>Title: This is the title of the Event.
>Time: This is the time of the Event.
>
>Please show up on time.
>
>EOT;
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
attached mail follows:
At 9:53 AM -0500 2/26/08, Daniel Brown wrote:
>On Tue, Feb 26, 2008 at 9:46 AM, Jochem Maas <jochem
iamjochem.com> 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
attached mail follows:
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 <style="old">everyone</style>
only if your markup is correct
"but it eventually comes to <span class="old">everyone</span>"
;-)
>
> Cheers,
>
> tedd
attached mail follows:
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 <style="old">everyone</style>
>
>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
attached mail follows:
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 <style="old">everyone</style>
>>
>> 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
>
attached mail follows:
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 <jochem
iamjochem.com>
To: tedd <tedd.sperling
gmail.com>
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 <style="old">everyone</style>
> >>
> >> 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
attached mail follows:
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
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
On Tue, Feb 26, 2008 at 10:38 AM, tedd <tedd.sperling
gmail.com> 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
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Tue, Feb 26, 2008 at 10:57 AM, Robert Cummings <robert
interjinn.com> 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
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
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
attached mail follows:
On Tue, Feb 26, 2008 at 11:28 AM, Ray Hauge <ray.hauge.lists
gmail.com> wrote:
>
> How's that for off topic?
>
Off-topic or not, welcome back. Looks like the last time you
posted here was 2006. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
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: tedd
sperling.com> Subject: [PHP] How do you send stylized email?> > Hi gang:> > I want to send a styled email via heredoc, can that be done?> > $message = <<<EOT> Title: This is a title of the Event.> Time: This the time of the Event.> > Please show up on time.> EOT> > mail('example
example.com' , '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>
_________________________________________________________________
attached mail follows:
On Tue, 2008-02-26 at 11:27 -0500, Daniel Brown wrote:
> On Tue, Feb 26, 2008 at 10:57 AM, Robert Cummings <robert
interjinn.com> 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
attached mail follows:
On Tue, Feb 26, 2008 at 11:37 AM, Paul Scott <pscott
uwc.ac.za> 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
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
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
attached mail follows:
On Tue, Feb 26, 2008 at 11:47 AM, Paul Scott <pscott
uwc.ac.za> 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/
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
> > 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.
attached mail follows:
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
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
On Tue, 2008-02-26 at 11:53 -0500, Daniel Brown wrote:
> On Tue, Feb 26, 2008 at 11:47 AM, Paul Scott <pscott
uwc.ac.za> 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. |
`------------------------------------------------------------'
attached mail follows:
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
attached mail follows:
Then I guess I shouldn't link to "Bushmills" either.
----- Original Message -----
From: Robert Cummings <robert
interjinn.com>
To: Daniel Brown <parasane
gmail.com>
Cc: Paul Scott <pscott
uwc.ac.za>, Debi Berkowitz <debiberkowitz
gmail.com>,
tedd <tedd.sperling
gmail.com>, 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 <pscott
uwc.ac.za> 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
>
>
attached mail follows:
On Tue, Feb 26, 2008 at 12:43 PM, Robert Cummings <robert
interjinn.com> 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
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Tue, 2008-02-26 at 13:14 -0500, Daniel Brown wrote:
> On Tue, Feb 26, 2008 at 12:43 PM, Robert Cummings <robert
interjinn.com> 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. |
`------------------------------------------------------------'
attached mail follows:
On 2/26/08, Ray Hauge <ray.hauge.lists
gmail.com> 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/
attached mail follows:
At 2:09 PM -0500 2/25/08, Daniel Brown wrote:
>On Mon, Feb 25, 2008 at 1:40 PM, Rick Pasotto <rick
niof.net> 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.
>
><?
> 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;
> }
>?>
>
>
>--
></Dan>
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
attached mail follows:
On Tue, Feb 26, 2008 at 9:39 AM, tedd <tedd.sperling
gmail.com> 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."
attached mail follows:
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
attached mail follows:
On Tue, Feb 26, 2008 at 9:39 AM, tedd <tedd.sperling
gmail.com> 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.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
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
>
>
attached mail follows:
On Tue, 2008-02-26 at 09:45 -0500, Dan Joseph wrote:
> On Tue, Feb 26, 2008 at 9:39 AM, tedd <tedd.sperling
gmail.com> 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. |
`------------------------------------------------------------'
attached mail follows:
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
attached mail follows:
---- tedd <tedd.sperling
gmail.com> 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
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
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.
Thanks,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Tue, Feb 26, 2008 at 10:16 AM, tedd <tedd.sperling
gmail.com> 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
attached mail follows:
On Tue, Feb 26, 2008 at 10:56 AM, tedd <tedd.sperling
gmail.com> 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."
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
On Tue, 2008-02-26 at 10:57 -0500, Andrew Ballard wrote:
> On Tue, Feb 26, 2008 at 10:16 AM, tedd <tedd.sperling
gmail.com> 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. |
`------------------------------------------------------------'
attached mail follows:
On Tue, 2008-02-26 at 11:00 -0500, Dan Joseph wrote:
> On Tue, Feb 26, 2008 at 10:56 AM, tedd <tedd.sperling
gmail.com> 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. |
`------------------------------------------------------------'
attached mail follows:
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 <tedd.sperling
gmail.com> 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.
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
attached mail follows:
On Tue, Feb 26, 2008 at 11:04 AM, Robert Cummings <robert
interjinn.com>
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."
attached mail follows:
On Tue, Feb 26, 2008 at 11:12 AM, Jim Lucas <lists
cmsws.com> 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.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
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
<?php
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?
Thanks,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Tue, Feb 26, 2008 at 11:54 AM, tedd <tedd.sperling
gmail.com> 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
>
> <?php
> 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
attached mail follows:
On Tue, Feb 26, 2008 at 11:54 AM, tedd <tedd.sperling
gmail.com> wrote:
> At present, I use the actual directories (http/https) to determine if