php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32034 setcookie
Submitted: 2005-02-20 11:19 UTC Modified: 2005-02-21 19:32 UTC
From: tshot at sancharnet dot in Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.3 OS: Fedora Core 1 - 2.4.22
Private report: No CVE-ID: None
 [2005-02-20 11:19 UTC] 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. 


Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-21 19:32 UTC] sniper@php.net
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.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Aug 15 09:01:27 2024 UTC