php-general Digest 25 Jun 2006 11:27:26 -0000 Issue 4204
Topics (messages 238579 through 238589):
Re: STRING TO ASCII CHARACTERS
238579 by: John Hicks
Re: Cookie Question
238580 by: John Meyer
238582 by: Robert Cummings
238585 by: Larry Garfield
Re: Extracting XMP tags from pictures
238581 by: tedd
238583 by: M. Sokolewicz
238584 by: tedd
238586 by: Dotan Cohen
238587 by: tedd
238588 by: Dotan Cohen
mail() returns false but e-mail is sent ?
238589 by: Leonidas Safran
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Ahmed Saad wrote:
On 23/06/06, cajbecu <[EMAIL PROTECTED]> wrote:
$data .= "&#".ord(substr($string,$i,1)).";";
and I think there's no need for substr.. just
$data .= "&#".$string[$i].";";
/ahmed
And, for the record, you are not converting a string to ASCII, rather an
ASCII string to its decimal equivalent.
-J
--- End Message ---
--- Begin Message ---
tedd wrote:
At 6:26 PM -0400 6/23/06, Tom Ray [Lists] wrote:
I've run into something rather odd with cookies today. I'm working with this
admin section on a site and I'm setting a cookie that is supposed to be good
for one hour. So in the cookie I have time()+3600 and all was well or that was
until someone fired up IE. It seems that IE refused to set the cookie. After
much swearing at IE, I found that if I set it to time()+7200 the cookie would
be set.
Not if that wasn't odd enough, in Firefox if I logged in at 6PM the cookie said
it would expire at 8PM which is correct. However, when I logged in via IE at
6PM it said the cookie would expire at 23:00 hours (11PM for those who don't
know)...so my question is...why is this happening and why does IE do this? I
checked in Opera, Mozilla and Netscape and they all work the same as
Firefox.....
You answered the question yourself, you're testing IE. It sounds like M$ is
trying to make time to adapt to their standard.
But, you're not alone -- try Google with "IE cookies expiration"
tedd
BTW, I have a question: which is the preferred way to handle variables
on the client side: cookies or sessions? Or are there situations where
one should be used and the other should be used in these other situations.
--
Online library -- http://pueblonative.110mb.com
126 books and counting.
--- End Message ---
--- Begin Message ---
On Sat, 2006-06-24 at 10:51, John Meyer wrote:
> tedd wrote:
> > At 6:26 PM -0400 6/23/06, Tom Ray [Lists] wrote:
> >> I've run into something rather odd with cookies today. I'm working with
> >> this admin section on a site and I'm setting a cookie that is supposed to
> >> be good for one hour. So in the cookie I have time()+3600 and all was well
> >> or that was until someone fired up IE. It seems that IE refused to set the
> >> cookie. After much swearing at IE, I found that if I set it to time()+7200
> >> the cookie would be set.
> >>
> >> Not if that wasn't odd enough, in Firefox if I logged in at 6PM the cookie
> >> said it would expire at 8PM which is correct. However, when I logged in
> >> via IE at 6PM it said the cookie would expire at 23:00 hours (11PM for
> >> those who don't know)...so my question is...why is this happening and why
> >> does IE do this? I checked in Opera, Mozilla and Netscape and they all
> >> work the same as Firefox.....
> >
> > You answered the question yourself, you're testing IE. It sounds like M$ is
> > trying to make time to adapt to their standard.
> >
> > But, you're not alone -- try Google with "IE cookies expiration"
> >
> > tedd
> BTW, I have a question: which is the preferred way to handle variables
> on the client side: cookies or sessions? Or are there situations where
> one should be used and the other should be used in these other situations.
Ummm, how are you implementings sessions? Usually it's done by
cookies... or with trans_sid. Either way you shouldn't really be making
a distinction here. Unless of course you mean literally storing the data
in the client side cookie, versus storing a unique ID there that maps to
something in your database or filesystem... in which case go for the
latter, but make sure your ID is long enough and random enough to be
secure. Usiong PHP's built in session stuff usually works quite well and
saves you needing to do the low level work of linking up the cookie with
the data.
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. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
On Saturday 24 June 2006 09:51, John Meyer wrote:
> BTW, I have a question: which is the preferred way to handle variables
> on the client side: cookies or sessions? Or are there situations where
> one should be used and the other should be used in these other situations.
If it's a variable that you want the user to be able to hold onto for days,
weeks, or months at a time (such as a "remember me" function for blog
comments, for example), then use cookies, but NEVER store a username or
password, even encrypted, in a cookie.
For everything else, use PHP's session handling, particularly the cookie-saved
version.
Remember, cookies are user-supplied data. That means it is not to be trusted.
A session key is hard to hijack, or at least harder than it is to fake a
non-random-key cookie. It's easier to hijack if it's in the URL GET string
rather than a cookie.
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
At 1:44 PM +1000 6/24/06, chris smith wrote:
>This link:
>http://www.photography-on-the.net/ee/beta/cs_xmp_to_exif.php
>
>was on this page:
>http://www.php.net/manual/en/function.exif-read-data.php
>
>The manual usually has something useful.
I continue to be amazed by the amount of information contained therein -- quite
a collection of work.
While we're on the subject, I tried to see how exif_read_data() works -- but,
my tests come back:
Fatal error: Call to undefined function: exif_read_data() in
In looking at the manual, it says that I need (PHP 4 >= 4.2.0, PHP 5).
However, my phpinfo says my version is 4.3.11.
Any ideas as to why it's a undefined function for me?
tedd
PS: The ee_extract_exif_from_pscs_xmp() function works -- but I can't find an
image that has any info.
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
tedd wrote:
At 1:44 PM +1000 6/24/06, chris smith wrote:
This link:
http://www.photography-on-the.net/ee/beta/cs_xmp_to_exif.php
was on this page:
http://www.php.net/manual/en/function.exif-read-data.php
The manual usually has something useful.
I continue to be amazed by the amount of information contained therein -- quite
a collection of work.
While we're on the subject, I tried to see how exif_read_data() works -- but,
my tests come back:
Fatal error: Call to undefined function: exif_read_data() in
In looking at the manual, it says that I need (PHP 4 >= 4.2.0, PHP 5).
However, my phpinfo says my version is 4.3.11.
Any ideas as to why it's a undefined function for me?
tedd
PS: The ee_extract_exif_from_pscs_xmp() function works -- but I can't find an
image that has any info.
the exif extension needs to be enabled for them to exist? :)
(and on windows:
Windows users must enable both the php_mbstring.dll and php_exif.dll
DLL's in php.ini. The php_mbstring.dll DLL must be loaded before the
php_exif.dll DLL so adjust your php.ini accordingly.)
- tul
--- End Message ---
--- Begin Message ---
At 6:04 PM +0200 6/24/06, M. Sokolewicz wrote:
>tedd wrote:
>>
>>While we're on the subject, I tried to see how exif_read_data() works -- but,
>>my tests come back:
>>
>> Fatal error: Call to undefined function: exif_read_data() in
>>
>>Any ideas as to why it's a undefined function for me?
>>
>
>the exif extension needs to be enabled for them to exist? :)
>(and on windows:
> Windows users must enable both the php_mbstring.dll and php_exif.dll DLL's
> in php.ini. The php_mbstring.dll DLL must be loaded before the php_exif.dll
> DLL so adjust your php.ini accordingly.)
>- tul
-tul:
Okay, according to phpinfo mbstring is installed, but what do I look for to
confirm if exif is installed, or not -- "exif"? If so, then I guess that it's
not installed because I can't find it.
I'll check with my server and see what he says.
Thanks.
tedd
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On 24/06/06, tedd <[EMAIL PROTECTED]> wrote:
PS: The ee_extract_exif_from_pscs_xmp() function works -- but I can't find an
image that has any info.
You can use a picture of my friend Yehuda:
http://dotancohen.com/xmp_test.jpg
Dotan Cohen
http://what-is-what.com
--- End Message ---
--- Begin Message ---
At 8:24 PM +0300 6/24/06, Dotan Cohen wrote:
>On 24/06/06, tedd <[EMAIL PROTECTED]> wrote:
>>PS: The ee_extract_exif_from_pscs_xmp() function works -- but I can't find an
>>image that has any info.
>
>You can use a picture of my friend Yehuda:
>http://dotancohen.com/xmp_test.jpg
>
>Dotan Cohen
>http://what-is-what.com
Dotan:
I did try that picture, but I couldn't extract exif/xmp data from it.
Thanks.
tedd
PS: No offense, but that picture creeps me out.
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On 24/06/06, tedd <[EMAIL PROTECTED]> wrote:
Dotan:
I did try that picture, but I couldn't extract exif/xmp data from it.
I did manage to get the last tags in the hierarchy out of it. My tag
"Places->Sarid" came out as "Sarid", and "People->Yehuda" came out as
"Yehuda".
PS: No offense, but that picture creeps me out.
I wasn't about to put up a picture of my sexy redhead wife!
Dotan
--- End Message ---
--- Begin Message ---
Hello,
I'm wondering about the behavior of the mail() function.
$sent = mail($destination, $subject, $content, $headers);
I use some optional header parameters:
"From:[EMAIL PROTECTED]: 1.0\r\nContent-Type: text/plain;
charset=ISO-8859-1\r\nContent-Transfer-Encoding: quoted-printable\r\n".
Can that be source of error? I can see no error in the apache error_log.
I have special caracters in the subject line, which are converted first on php
side to comply with standard. Here also, no error on apache error_log.
The result of mail() is false but the e-mail is sent! Returning true, but
e-mail doesn't reach destination can make sense; in this case, it's strange,
isn't it?
I'm using PHP v. 5.04 on a Linux Fedora Core 4 distri with Postfix 2.2.2.
I'd be glad if somebody could explain me what to do in order to get correct
response when e-mail is passed to MTA...
Thanks,
LS
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
--- End Message ---