Platform: Win2k Server, Apache 1.3, PHP 4.2.3
I understand that when using $_SESSION variables, using the
"session_regist er()" function should not be done. I have seen no
documentation pertaining the the "why" of this, but I am removing the
offending statements from my code anyway.
Prior to discovering this tidbit, I had been attempting to save some arrrays
in individually registered variables. But the arrays were not being saved
between pages.
I have also attempted to save the array in a $_SESSION variable (e.g.
$SESSION['XYZ']=$XYZ, xyz being an array); still no joy (the data seems to
be ending up in the $_SESSION variable, but again it is not saved between
page requests).
"register_globa ls" is set to "On" in the INI file.
So, to the PHP world at large I ask "what am I missing"?
thanks 4 6167
B-B wrote: I have also attempted to save the array in a $_SESSION variable (e.g. $SESSION['XYZ']=$XYZ, xyz being an array); still no joy (the data seems to be ending up in the $_SESSION variable, but again it is not saved between page requests).
Have you looked at session_start() ...
*************** *************** *************** ****
session_start() creates a session (or resumes the current one based on
the session id being passed via a GET variable or a cookie).
If you want to use a named session, you must call session_name()
<function.sessi on-name.html> before calling session_start() .
This function always returns TRUE.
Note:
If you are using cookie-based sessions, you must call session_start()
before anything is output to the browser.
session_start() will register internal output handler for URL rewriting
when trans-sid is enabled. If a user uses ob_gzhandler or like with
ob_start() <function.ob-start.html>, the order of output handler is
important for proper output. For example, user must register
ob_gzhandler before session start.
*************** *************** *************** **** "register_globa ls" is set to "On" in the INI file.
People here tell me it should be off....
--
Spam:newsgroup( at)cr*********@ verisign-sux-klj.com
EMail:<01100011 001011100110001 001110101011100 10011010110
110010101000000 011000110111001 001100001011110 10011011100
110000101110010 001011100110001 101101111011011 0100100000>
"B-B" <b~r~i~a~n-at-b~o~n~a~n~z~a~p ~r~e~s~s~-dotcom> schrieb: I have also attempted to save the array in a $_SESSION variable (e.g. $SESSION['XYZ']=$XYZ, xyz being an array); still no joy (the data seems to be ending up in the $_SESSION variable, but again it is not saved between page requests).
"register_globa ls" is set to "On" in the INI file.
Ooops. In that case your program might overwrite the variable.
So, to the PHP world at large I ask "what am I missing"?
Are you sure that your seesion id is transported to the next page via
gookies or get-parameter?
Regards,
Matthias
I did finally get things to work properly, thank you to those who responded.
"B-B" <b~r~i~a~n-at-b~o~n~a~n~z~a~p ~r~e~s~s~-dotcom> wrote in message
news:vo******** ****@corp.super news.com... Platform: Win2k Server, Apache 1.3, PHP 4.2.3
I understand that when using $_SESSION variables, using the "session_regist er()" function should not be done. I have seen no documentation pertaining the the "why" of this, but I am removing the offending statements from my code anyway.
Prior to discovering this tidbit, I had been attempting to save some
arrrays in individually registered variables. But the arrays were not being saved between pages.
I have also attempted to save the array in a $_SESSION variable (e.g. $SESSION['XYZ']=$XYZ, xyz being an array); still no joy (the data seems to be ending up in the $_SESSION variable, but again it is not saved between page requests).
"register_globa ls" is set to "On" in the INI file.
So, to the PHP world at large I ask "what am I missing"?
thanks
I am having the same problem and I have already posted a message on
the board, but its not visible to the public yet.
Could you please let me know ho did u get it to work. I have
register_global s OFF.
Thanks a bunch.
Avinash
"B-B" <b~r~i~a~n-at-b~o~n~a~n~z~a~p ~r~e~s~s~-dotcom> wrote in message news:<vo******* *****@corp.supe rnews.com>... Platform: Win2k Server, Apache 1.3, PHP 4.2.3
I understand that when using $_SESSION variables, using the "session_regist er()" function should not be done. I have seen no documentation pertaining the the "why" of this, but I am removing the offending statements from my code anyway.
Prior to discovering this tidbit, I had been attempting to save some arrrays in individually registered variables. But the arrays were not being saved between pages.
I have also attempted to save the array in a $_SESSION variable (e.g. $SESSION['XYZ']=$XYZ, xyz being an array); still no joy (the data seems to be ending up in the $_SESSION variable, but again it is not saved between page requests).
"register_globa ls" is set to "On" in the INI file.
So, to the PHP world at large I ask "what am I missing"?
thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Phil Powell |
last post by:
What is the most standardized method of utilizing the CURL functions
in PHP (version 4.3.2) to be able to retrieve the contents of a remote
URL that happens to be dependent upon $_SESSION for its content
display?
I've tried the following class methods for display and I have most
everything working until I get to a URL that requires $_SESSION:
class Timer extends View {
|
by: jerrygarciuh |
last post by:
Hi folks,
I am working with PHP 4.3.8, Linux, and Apache 1.3.31 on a third-level or
sub domain.
The following code will diplay foo, session_id(), and increment count over
refreshes:
<?php
session_start();
|
by: axlq |
last post by:
Someone please tell me if I've discovered a PHP bug.
I'm sitting in front of several computers on my home network, behind
a NAT firewall/router. I am testing my web site on these different
computers (running different browsers, logged in as different users,
etc.). My web site keeps track of users logged in through the use
of $_SESSION.
Here's the bizarre thing: All computers are logged off, then I log
into my web site with one...
|
by: Michael Windsor |
last post by:
I've been trying to integrate some PHP pages of my own with some
existing code. The details of this are for the support forums for that
code (where I have been asking questions), but I wonder if someone here
can enlighten me as to why the problematic code is having the effect it is.
For reasons I don't know, if the PHP version is 5 or greater,
register_long_arrays is false and $_SESSION exists, the following
statement is executed:
...
|
by: somecrazyguy |
last post by:
Take the following code, one would think that there was absolutely no link between $test and $_SESSION. But if you reload the page, guess what... "After=FAILED". Why? Because for some reason, writing to $test affects the $_SESSION variable $_SESSION.
session_start();
ini_set("session.gc_maxlifetime","3600");
if ($_REQUEST == "1") session_unset();
var_dump($_SESSION);
if (!$_SESSION) $_SESSION = "Test";
echo...
| |
by: dpinion |
last post by:
Greetings,
I am trying to do some simple session stuff. However it does not seem
as though the session variable is being created for my site. I am
running the latest version of PHP and apache that I installed as part
of WAMP. Machine is XP SP2.
Basically I am trying to do something simple such as:
<?php
|
by: Pseudonyme |
last post by:
Dear Sirs and Madams,
Receive as information that storing a MYSQL result under $_SESSION was
accelerating web page displays processes ? Absolutly needed but
impossible to get this working !
I try, but do not succeed in implement $_SESSION with MYSQL.
<?php
session_start();
|
by: sharonDonnelly |
last post by:
Hi
Really dumb problem that's got me beat. Can someone help.
The prolem: I'm trying to count the number of times an item has been clicked. There are many items. I want to create a session variable for each item as its clicked, and increment the value held by the session variable by 1 each time that item is clicked. My plan was to allow an item to be selected on one page - when a user selects an item, a numeric value will be passed to a...
|
by: JRough |
last post by:
I want to save two variables in a $_SESSION for use in another page:
$_SESSION = $mark;
$_SESSION = $num;
then on the other page I did this to get the value:
$mark =$_SESSION;
$num = $_SESSION;
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: 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...
| | |