Hi All,

I'm having a problem with session variables under PHP 4.0.6 on a secure
server. I ran phpinfo and have attached the resulting page after the main
body of this message.

My test code looks like this

Filename: index.php

Page Start --------------

<?php
session_start();

$HTTP_SESSION_VARS['variable']="the variables value";

?>
<a href="index2.php">click here</a> to go to the next page

Page End ------


Next file
Filename: index2.php

Page Start --------------

<?php
session_start();

print_r($HTTP_SESSION_VARS);

echo "--&gt;".$HTTP_SESSION_VARS['variable']."&lt;--";
?>

Page End ------


Suffice to say it doesn't work. The first page displays

"click here to go to the next page"


as expected. However clicking on the link takes you to index2.php and the
following is displayed:


"Array ( ) --><--"


Namely that the session variable called "variable" is not set in the
session.


I have run the exact same code on a machine running PHP 4.2.3 (non secure
servers) and it works perfectly! And outputs:

"Array ( [variable] => the variables value ) -->the variables value<--"

Exactly as required!!



I hope that you can help, since I am getting frustrated after 4 days trying
to fix this problem.

Henry


----------------------------------------------------------------------------
--------------------------
Sorry about the formating but this is what I got from phpinfo from the
machine

PHP Version 4.0.6

....
Build Date Oct  7 2001
Configure Command  './configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs'
'--enable-track-vars' '--with-config-file-path=/etc' '--enable-magic-quotes'
'--enable-apc=shared' '--with-xml' '--enable-trans-sid' '--with-pgsql'
'--with-zlib'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
ZEND_DEBUG disabled
Thread Safety disabled

 This program makes use of the Zend scripting language engine:
Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies
    with Zend Optimizer v1.1.0, Copyright (c) 1998-2000, by Zend
Technologies




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

PHP 4.0 Credits

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

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference
 On On
allow_url_fopen
 1 1
arg_separator.input
 & &
arg_separator.output
 & &
asp_tags
 Off Off
auto_append_file
 no value no value
auto_prepend_file
 no value no value
browscap
 no value no value
default_charset
 no value no value
default_mimetype
 text/html text/html
define_syslog_variables
 Off Off
disable_functions
 no value no value
display_errors
 On On
display_startup_errors
 Off Off
doc_root
 no value no value
enable_dl
 On On
error_append_string
 no value no value
error_log
 no value no value
error_prepend_string
 no value no value
error_reporting
 2039 2039
expose_php
 On On
extension_dir
 ./ ./
file_uploads
 1 1
gpc_order
 GPC GPC
highlight.bg
 #FFFFFF #FFFFFF
highlight.comment
 #FF9900 #FF9900
highlight.default
 #0000CC #0000CC
highlight.html
 #000000 #000000
highlight.keyword
 #006600 #006600
highlight.string
 #CC0000 #CC0000
html_errors
 On On
ignore_user_abort
 Off Off
implicit_flush
 Off Off
include_path
 .:/usr/local/lib/php .:/usr/local/lib/php
log_errors
 Off Off
magic_quotes_gpc
 On On
magic_quotes_runtime
 Off Off
magic_quotes_sybase
 Off Off
max_execution_time
 30 30
open_basedir
 no value no value
output_buffering
 Off Off
output_handler
 no value no value
post_max_size
 8M 8M
precision
 14 14
register_argc_argv
 On On
register_globals
 On On
safe_mode
 Off Off
safe_mode_exec_dir
 no value no value
sendmail_from
 [EMAIL PROTECTED] [EMAIL PROTECTED]
sendmail_path
 /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i
short_open_tag
 On On
SMTP
 localhost localhost
sql.safe_mode
 Off Off
track_errors
 Off Off
upload_max_filesize
 2M 2M
upload_tmp_dir
 no value no value
user_dir
 no value no value
variables_order
 EGPCS EGPCS
y2k_compliance
 Off Off


xml
XML Support active


standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active
 1 1
assert.bail
 0 0
assert.callback
 no value no value
assert.quiet_eval
 0 0
assert.warning
 1 1
safe_mode_allowed_env_vars
 PHP_ PHP_
safe_mode_protected_env_vars
 LD_LIBRARY_PATH LD_LIBRARY_PATH
session.use_trans_sid
 1 1
url_rewriter.tags
 a=href,area=href,frame=src,input=src,form=fakeentry
a=href,area=href,frame=src,input=src,form=fakeentry


session
Session Support enabled

Directive Local Value Master Value
session.auto_start
 Off Off
session.cache_expire
 180 180
session.cache_limiter
 nocache nocache
session.cookie_domain
 no value no value
session.cookie_lifetime
 0 0
session.cookie_path
 / /
session.cookie_secure
 Off Off
session.entropy_file
 no value no value
session.entropy_length
 0 0
session.gc_maxlifetime
 1440 1440
session.gc_probability
 1 1
session.name
 PHPSESSID PHPSESSID
session.referer_check
 no value no value
session.save_handler
 files files
session.save_path
 /tmp /tmp
session.serialize_handler
 php php
session.use_cookies
 On On


posix
Revision $Revision: 1.28.2.1 $


pgsql
PostgreSQL Support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent
 On On
pgsql.max_links
 Unlimited Unlimited
pgsql.max_persistent
 Unlimited Unlimited


pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 3.4 22-Aug-2000


mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.32
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE
MYSQL_LIBS

Directive Local Value Master Value
mysql.allow_persistent
 On On
mysql.default_host
 no value no value
mysql.default_password
 no value no value
mysql.default_port
 no value no value
mysql.default_socket
 no value no value
mysql.default_user
 no value no value
mysql.max_links
 Unlimited Unlimited
mysql.max_persistent
 Unlimited Unlimited


zlib
ZLib Support enabled
'zlib:' fopen wrapper enabled
Compiled Version 1.1.3
Linked Version 1.1.3


Zend Optimizer
Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled


apache
APACHE_INCLUDE
APACHE_TARGET
Apache Version Apache/1.3.6
Apache Release 10306100
Apache API Version 19990320
Hostname:Port secure.########.com:443
User/Group httpd(15)/11
Max Requests Per Child: 30<br>Keep Alive: on<br>Max Per Connection: 100
Timeouts Connection: 300<br>Keep-Alive: 15
Server Root /etc/httpd
Loaded Modules mod_php4, mod_auth_pam, mod_perl, mod_ssl, mod_setenvif,
mod_so, mod_unique_id, mod_example, mod_usertrack, mod_headers, mod_expires,
mod_cern_meta, mod_digest, mod_auth_db, mod_auth_anon, mod_auth, mod_access,
mod_rewrite, mod_alias, mod_proxy, mod_userdir, mod_speling, mod_actions,
mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info,
mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_referer,
mod_log_agent, mod_log_config, mod_define, mod_env, mod_mmap_static,
http_core


....


PHP License
This program is free software; you can redistribute it and/or modify it
under the terms of the PHP License as published by the PHP Group and
included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions
about PHP licensing, please contact [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to