#32034 [Opn->Bgs]: setcookie
| From: | sniper@php.net | Date: | Mon, 21 Feb 2005 18:32:25 +0000 |
| Subject: | #32034 [Opn->Bgs]: setcookie | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74346@lists.php.net to get a copy of this message | ||
ID: 32034
Updated by: sniper@php.net
Reported By: tshot at sancharnet dot in
-Status: Open
+Status: Bogus
-Bug Type: Session related
+Bug Type: *General Issues
Operating System: Fedora Core 1 - 2.4.22
PHP Version: 4CVS-2005-02-20
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
This is not any support forum and you're using "ancient" version of PHP
anyway: Update first to 4.3.10..
And then ask further question on the php-general mailing list.
Previous Comments:
------------------------------------------------------------------------
[2005-02-20 11:19:12] tshot at sancharnet dot in
Description:
------------
Unable to set cookie. The cookie is deleted showing expiry
time of about 1 year behind. I tried with different values
for time. This happens during setting of cookie.
---------------------------
When checking in phpinfo(), it shows (PHP version is
4.3.3)
Set-Cookie
font_type=deleted; expires=Sat, 21-Feb-2004 10:27:12 GMT
Set-Cookie
font_size=deleted; expires=Sat, 21-Feb-2004 10:27:12 GMT
and my time returns
Sunday 20th of February 2005 03:57:13 PM
Below is the confirue option as reported in phpinfo(). And
my installation is default that occurs during Linux
installation
'./configure' '--host=i386-redhat-linux'
'--build=i386-redhat-linux'
'--target=i386-redhat-linux-gnu' '--program-prefix='
'--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com'
'--mandir=/usr/share/man' '--infodir=/usr/share/info'
'--cache-file=../config.cache'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d'
'--enable-force-cgi-redirect' '--disable-debug'
'--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2'
'--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr'
'--with-gd' '--enable-gd-native-ttf' '--with-gdbm'
'--with-gettext' '--with-ncurses' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl'
'--with-png' '--with-pspell' '--with-regex=system'
'--with-xml' '--with-expat-dir=/usr'
'--with-dom=shared,/usr' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr' '--with-xmlrpc=shared'
'--with-pcre=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-bcmath' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--without-oci8' '--with-pear=/usr/share/pear'
'--with-imap=shared' '--with-imap-ssl' '--with-kerberos'
'--with-ldap=shared' '--with-mysql=shared,/usr'
'--with-pgsql=shared' '--with-snmp=shared,/usr'
'--with-snmp=shared' '--enable-ucd-snmp-hack'
'--with-unixODBC=shared' '--enable-memory-limit'
'--enable-bcmath' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal'
'--enable-mbstring' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--with-apxs2=/usr/sbin/apxs'
Reproduce code:
---------------
setcookie("font_type", "$type_sel", mktime(0, 0, 0, 2, 26, 2005)) ;
setcookie("font_size", $size_sel, ($tm=(time()-3600))) ;
Expected result:
----------------
Cookie variable should be set.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32034&edit=1