Forum Moderators: coopster

Message Too Old, No Replies

$HTTP_COOKIE_VARS question

script using it not working. Why?

         

walkman

3:29 am on Mar 26, 2005 (gmt 0)



I have this "Save Listing" feature and it uses $HTTP_COOKIE_VARS. I have no doubt that the programer did it correctly, but it's not working. Do I need to enable something on my server (apache, php, or both)? Also, is there a better way to do that save thingie, maybe mysql?

any suggestions?

thanks,

coopster

12:08 pm on Mar 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



What kind of error messages do you get? Can you see the cookie being set in the browser?

walkman

1:58 pm on Mar 26, 2005 (gmt 0)



Just checked the cookies folder and no cookie is set. Ican see the cookies from other sites, such as this, accessed today, but none from my site.

coopster

2:26 pm on Mar 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Well then either your browser is not allowing the site to set cookies or the script has not been programmed and tested correctly. The PHP set_cookie() [php.net] function is a good place to start reading and troubleshooting.

One red flag that is going up right away here is the use of $HTTP_COOKIE_VARS which has been deprecated. Hopefully you are running a recent version of PHP which means you are at the very, very least using PHP >= 4.1.0 where the $_COOKIE [php.net] superglobal was introduced.

walkman

3:14 pm on Mar 26, 2005 (gmt 0)



My php:
PHP 4.3.8 (cli) (built: *** ** 2004 14:**:**)

Tried it on firefox too and didn't work. I access many sites with subscriptions and cookies are saved.

thanks for the suggestions,