From:             tshot at sancharnet dot in
Operating system: Fedora Core 1 - 2.4.22
PHP version:      4CVS-2005-02-20 (stable)
PHP Bug Type:     Session related
Bug description:  setcookie

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 bug report at http://bugs.php.net/?id=32034&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32034&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32034&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32034&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32034&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32034&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32034&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32034&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32034&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32034&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32034&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32034&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32034&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32034&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32034&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32034&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32034&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32034&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32034&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32034&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32034&r=mysqlcfg

Reply via email to