Hello,
I get this warning with my PHP code sometimes. It will come up, and
then after reloading the page once or twice, it will go away. Any
ideas? The code is below:
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_global s is enabled. You can disable this functionality
and this warning by setting session.bug_com pat_42 or
session.bug_com pat_warn to off, respectively. in Unknown on line 0
I understand that this has to do with using session_registe r, but I
don't use that anywhere in my code. My code looks like below:
<?php
session_start() ;
....
mysql_connect($ hostname, $user,$password );
mysql_select_db ($database);
$str_output = "<body>\n";
$str_output .= "<div class=\"dtree\" >";
$str_output .= "<p><a href=\"javascri pt: d.openAll();\"> open all</a> |
<a href=\"javascri pt: d.closeAll();\" >\n";
$str_output .= "Close all</a></p>\n";
$str_output .= "<script type=\"text/javascript\">\n ";
$str_output .= "d = new dTree('d');\n";
$str_output .= "d.add(0,-1,'Releases');" ;
$arr1 = array();
$arr2 = array();
$max_release = -1;
//Step 1
$sql_query = "SELECT RELEASE_INFO.*, RELEASE.XML_FIL ENAME FROM
RELEASE_INFO, RELEASE WHERE RELEASE.RELEASE _ID =
RELEASE_INFO.MA IN_REL_FILE_ID; ";
$sql_result = mysql_query($sq l_query);
$num_lines = 0;
$num_lines_2 = 0;
$arr_release = array();
$arr_rel_num = array();
while($sql_row = mysql_fetch_ass oc($sql_result) )
{
$arr1[release_num] = $sql_row[RELEASED_NUM];
$arr1[xml_filename] = $sql_row[XML_FILENAME];
$arr1[release_id] = $sql_row[MAIN_REL_FILE_I D];
//$arr1[dep_val] = $sql_row[NODE_ATTR_DETAI L_VAL];
array_push($arr 2,$arr1);
if($arr1[release_num] > $max_release)
{
$num_lines_2 = $num_lines_2 + 1;
$max_release = $arr1[release_num];
// Step 3
//$arr_release[$arr1[release_num]][release_id] =
$arr1[release_id];
$arr_release[$arr1[release_num]][release_id] = 0;
$arr_release[$arr1[release_num]][tree_node] =
$num_lines_2;
}
$num_lines = $num_lines + 1;
// Step 2
$str_output .= "d.add(".$num_l ines.",0,'Relea se
".$arr1[release_num]."','proc_check _xml.php?rel=". $arr1[release_num]."&par_id=-1','','main_fra me2');";
}
$num_lines = $num_lines + 1;
//Step 4
$sql_query = "SELECT R.XML_FILENAME, RI.RELEASED_NUM , RR.* FROM RELEASE
AS R, RELEASE_INFO AS RI, REL_RELATIONSHI P AS RR WHERE
RR.CURR_RELEASE _ID = R.RELEASE_ID AND RR.RELEASE_INFO _ID =
RI.RELEASE_INFO _ID ORDER BY RELEASED_NUM ASC, HAS_CHILD DESC;";
$arr_tree = array();
$sql_result = mysql_query($sq l_query);
$i2 = 0;
while($sql_row = mysql_fetch_ass oc($sql_result) )
{
//Step 5
$arr_tree[$i2][xml_filename] = $sql_row[XML_FILENAME];
$arr_tree[$i2][release_num] = $sql_row[RELEASED_NUM];
$arr_tree[$i2][parent_rel_id] = $sql_row[PARENT_RELEASE_ ID];
$arr_tree[$i2][curr_rel_id] = $sql_row[CURR_RELEASE_ID];
$arr_tree[$i2][has_child] = $sql_row[HAS_CHILD];
$arr_tree[$i2][release_info_id] = $sql_row[RELEASE_INFO_ID];
$i2 = $i2 + 1;
}
$arr_tree_size = count($arr_tree );
$finished_flag = -1;
for($i3 = 0;$i3 < $arr_tree_size; $i3++)
{
for($i4 = $i3;$i4 < $arr_tree_size; $i4++)
{
if ($arr_release[$arr_tree[$i4][parent_rel_id]] != "")
{
$str_output .=
"d.add(".$num_l ines.",".$arr_r elease[$arr_tree[$i4][parent_rel_id]][tree_node].",'".$arr_t ree[$i4][xml_filename]."','info_sessi on.php?rel_id=" .$arr_tree[$i4][curr_rel_id]."','','main_fr ame2');";
$arr_release[$arr_tree[$i4][curr_rel_id]][release_id] =
$arr_tree[$i4][curr_rel_id];
$arr_release[$arr_tree[$i4][curr_rel_id]][tree_node] = $num_lines;
$arr_tree[$i4] = 0;
$num_lines = $num_lines + 1;
}
}
}
$str_output .= "document.write (d);";
$str_output .= "//-->\n";
$str_output .= "</script>\n";
$str_output .= "</body>\n";
$str_output .= "</html>\n";
echo $str_output;
?>
Thanks,
Jay
(patel at cs dot utk dot edu) 0 1893 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Damien |
last post by:
Hi to all,
I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up
PHP 4.3.7, better-normalized MySQL ;o). So I've started using the
$_SESSION variable instead of register_globals and a couple "better
pratice" code. Not perfect, but better.
Problem : I'm testing everything with Firefox on my machine (IIS on
WinXP Pro), and everything is ok. As soon as I try MS IE 6, it doesn't
seem to keep the sessions from page to...
|
by: Phil Grimpo |
last post by:
I have a very odd situation here. I have an administration page, where
based on a users permissions, a recordset is called from the SQL server
which has a list of paths to "Module Menus". Each of these menus are then
placed into the page by calling Server.Execute(rs_Modules("ModulePath")).
This works fine for up to 15 "menus" After that, the session variables that
were set (not including those called by Global.ASA) are no longer set.
...
|
by: joseph conrad |
last post by:
Hi,
I tried to implement my own session handler in order to keep control on
the process
the drawback I foun it is not creating and storing in my cookie the
PHPSESSID variable anymore.
reading te documentation it seems it should do it anyway
any advice?
|
by: lawrence k |
last post by:
How can I find out where my script is outputting to the screen for the
first time?
My error logs are full of stuff like this:
PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
on line 14
|
by: cty |
last post by:
Title: Problem in session using php5
Good day,
I use php5+mySQL4+IIS5.x
Previuosly i use php4 and no error occur,
| |
by: mikeboston |
last post by:
Hi,
I am attempting to use php session variables on a server which is running Red Hat Linux, but the variables don't seem to be getting passed between pages. I have tried the same exact test script on my third party webhost, and it works just fine. Does anyone know of anything that needs to be changed in a default Red Hat php setup?
This is the test script that I am using:
http://php.about.com/od/advancedphp/ss/php_sessions.htm
This is...
|
by: KidQuin |
last post by:
I am having problems with session value between pages. Happening in both firefox and IE7. I go between page by links so I know it's not header changes.
I use session_start as the first line on the page creating the session and the new page. The problem just start when code was untouched.
I am using PHP 4.4.7 on an Apache Server. Any help or suggestions would be welcomed
here is my php.ini file
; Handler used to store/retrieve...
|
by: Erwin Moller |
last post by:
Hi group,
Does anybody know what causes the following Warning?
__________________________________________________
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...
|
by: Twayne |
last post by:
Hi,
If ever a newbie wants to know how much he has to learn yet, he only has
to look here<g>!! ANYway:
PHP 5.2.5; XP Pro SP2+, local Apache Server
My actual question is: How do I get a POST variable into a session
variable so I can use it in any other page I want to use it in?
Apparently posted variables are only available in the Form page in
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |