ID:               15506
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Analyzed
 Bug Type:         Session related
 Operating System: Linux RH7
 PHP Version:      4.1.1


Previous Comments:
------------------------------------------------------------------------

[2002-02-11 10:45:13] [EMAIL PROTECTED]

The auto global _SESSION is not being created with session.auto_start
on for my Linux Apache/PHP installation.  It works however when running
on my Win98 laptop using Apache and the PHP 4.1.1 binary from php.net.

I ran this script on both platforms:

<?php
print '<pre>'; print_r(array_keys($GLOBALS)); print '</pre>';
?>

Win32 output:
Array
(
    [0] => HTTP_POST_VARS
    [1] => _POST
    [2] => HTTP_GET_VARS
    [3] => _GET
    [4] => HTTP_COOKIE_VARS
    [5] => _COOKIE
    [6] => HTTP_SERVER_VARS
    [7] => _SERVER
    [8] => HTTP_ENV_VARS
    [9] => _ENV
    [10] => HTTP_POST_FILES
    [11] => _FILES
    [12] => _REQUEST
    [13] => HTTP_SESSION_VARS
    [14] => _SESSION
    [15] => GLOBALS
)

Linux output:
Array
(
    [0] => HTTP_POST_VARS
    [1] => _POST
    [2] => HTTP_GET_VARS
    [3] => _GET
    [4] => HTTP_COOKIE_VARS
    [5] => _COOKIE
    [6] => HTTP_SERVER_VARS
    [7] => _SERVER
    [8] => HTTP_ENV_VARS
    [9] => _ENV
    [10] => HTTP_POST_FILES
    [11] => _FILES
    [12] => _REQUEST
    [13] => GLOBALS
)

I've verified that the php.ini files are identical (minus path
differences).  I have register_globals Off and transparent SID
enabled.

PHP 4.1.1 configuration:

./configure  --enable-trans-sid --with-apxs=/usr/local/apache/bin/apxs
--with-imap --with-imap-ssl=/usr/local/ssl
--with-openssl=/usr/local/ssl --with-kerberos=/usr/kerberos

Apache 1.3.23 with mod_ssl
PHP application in /usr/local/apache/zeus with appropriate VirtualHost
and Directory directives in Apache httpd.conf

/usr/local/apache/zeus contains this .htaccess file

php_flag register_globals off
php_flag short_open_tag off
php_flag asp_tags off

# allow_call_time_pass_reference has been deprecated but xml_set_object
requires it
php_flag allow_call_time_pass_reference on

php_flag session.use_trans_sid on
php_value session.save_handler files
php_value session.save_path /usr/local/apache/zeus/sessions
php_flag session.auto_start on
php_flag session.use_cookies off
php_value session.name ZEUSSID
php_value session.cookie_lifetime 0
php_value session.cookie_path /
php_value session.cache_limiter nocache
php_value session.serialize_handler php

php_value include_path
/usr/local/apache/zeus/php/xAPP;/usr/local/apache/zeus/php

<Files app>
  Forcetype application/x-httpd-php
</Files>

I have AllowOverride set to All in the Apache conf file to allow all
this to work.

I have verified the permissions on the sessions directory. The owner of
the directory is the Apache user. The sessions are being created but no
data is being saved in them--$_SESSION is not available.

My scripts are built on auto-start and using $_SESSION to keep things
as simple as possible.

I've tried removing the .htaccess file, using the default session
config (from the distribution) and using explicit session_start() at
the top of the page and still $_SESSION is not created (works on Win32
though).  Added a bogus value to $_SESSION after session_start() does
not work either--still 0 byte session files.  Only creates a normal PHP
hash called $_SESSION.  It appears that the session module is not
registering $_SESSION or $HTTP_SESSION_VARS as globals.

Thanks,

Vic Ivers

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15506&edit=1

Reply via email to