I have been working with Linux/Apache/Mysql/PHP for about three years now with little trouble. I am working with an ISP that has PHP version 4.2.3, and my scripts (testing/development) work fine. I just upgraded my local server to PHP version 4.3.1, and upgraded again today to 4.3.2. The same scripts do not work on my local server. The problem seems to be in the session management system, and it seems to have something to do with cookie management. The sample scripts in the PHP manual for sessions and cookies work fine on my ISP's older PHP, but the persistant cookie will not set on my local, new version. Session cookies work fine. My local tmp directory (/tmp) is working fine; GD works as does file upload. I cannot see why the persistant cookie will not write to my client. In fact, I set my browser to "prompt", and the persistant cookie isn't even sent, while the session cookie is.
<?php
$value = 'testing...';
$result1 = setcookie ("TestCookie", $value); // works fine
$result2 = setcookie ("TestCookie", $value, time()+3600, "/", "", 0); / expire in 1 hour (doesn't work)/
echo $result1 . ", " . $result2; // echos "1" in both cases, but no cookie is received.
?>