ID: 21312 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Session related Operating System: Windows 2000 Server PHP Version: 4.3.0 New Comment:
PHP 4.3.0, Apache/1.3.27, RedHat Linux 7.3. The same problem with Horde webmail. Webmail works fine, but it shows that f warning each time on login page: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 I've tried to play with register_globals session.bug_compat_42 session.bug_compat_warn in /etc/php.ini file, each time I've restarted apache of course :) but no luck. Please, tell me what's wrong? Previous Comments: ------------------------------------------------------------------------ [2003-01-12 13:06:47] [EMAIL PROTECTED] Is anyone taking a look at this? I just want to know how long I should wait. Sorry if this sounds impatient, it isnt meant to be. I am just wondering. :) Charles ------------------------------------------------------------------------ [2003-01-03 10:38:26] [EMAIL PROTECTED] Tryed that and still the same results. ------------------------------------------------------------------------ [2003-01-03 10:22:52] [EMAIL PROTECTED] Try adding this to your php.ini file: session.bug_compat_42 = 1 session.bug_compat_warn = 0 ------------------------------------------------------------------------ [2003-01-01 12:19:47] [EMAIL PROTECTED] i've the same problem with linux (apache 1.3.27) + mysql. contents of nearly all variable are exchanged! with a small function i had fixed this temporarly: function dp_session_register($variable) { global ${$variable}; if(is_null(${$variable})) ${$variable}=""; return session_register($variable); } i hope, this will fixed as soon as posible. thanks. daniel prior ------------------------------------------------------------------------ [2002-12-31 08:59:20] [EMAIL PROTECTED] <?php session_start(); $source = $_SERVER["HTTP_REFERER"]; session_register("source"); $connection = mssql_connect('server','UserName','password'); $sql = "select * from tbl;"; echo "$sql $connection<br>"; $sql_result = mssql_query($sql,$connection); $num = mssql_num_rows($sql_result); $retVal = "Records = ".$num; if ($num > 0) { mssql_data_seek($sql_result,0); $row = mssql_fetch_object($sql_result); $retVal = $row->Text; } mssql_free_result($sql_result); echo $retVal; ?> In this case the mssql_query fails with: PHP Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource. if I simply comment the $source = $_SERVER... it succeeds. If I change session_register to $_SESSION["source"] = $source; it succeeds. I am not sure how these are related. What is even weirder is the echo "$sql $connection<br>"; They echo what is expected when it works. When it doesnt whichever was defined first is the value for both. IE When it fails as it is written select * from tbl_Texts; select * from tbl_Texts; If you change $connection = mssql_connect('server','UserName','password'); $sql = "select * from tbl;"; to $sql = "select * from tbl;"; $connection = mssql_connect('server','UserName','password'); it echos Resource id #3 Resource id #3 I will in the future use $_SESSION but there are alot of files to change if this wont be fixed. Thanks Charles Killmer ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21312&edit=1