To those that can save me from myself:
I have a site that has been working perfectly for a few years now, under
PHP 4.2.3. Since later versions of PHP run so much more quickly, I wanted
to update this site to one of those later versions. Being a very cautious
person, I started with 4.3.11, since it was the highest version of the next
PHP increment. When I tried this version, my session file kept getting
rebuilt (with the same name) as though the session file found was old. The
same thing has happened to me all the way to version 5.0.4.
The site runs on a Linux box. I am running the CGI version on all of these
PHP compiles. Other than the PHP version change, all else is the same (I
cloned my working box and only change the PHP executable on it).
Thanks,
Vincent
P.S.
If you wish to e-mail me directly please do so at the following
address (less the anti-spam *'s):
*v*i*n*c*e*n*t*@*s*a*g*e*-*i*n*c*.*c*o*m* 7 1406
*** Name wrote/escribió (Tue, 30 Aug 2005 21:24:14 GMT): I have a site that has been working perfectly for a few years now, under PHP 4.2.3. Since later versions of PHP run so much more quickly, I wanted to update this site to one of those later versions. Being a very cautious person, I started with 4.3.11, since it was the highest version of the next PHP increment. When I tried this version, my session file kept getting rebuilt (with the same name) as though the session file found was old. The same thing has happened to me all the way to version 5.0.4.
A test you can do: backup php.ini and replace it with the old one from
4.2.3. If that way it works, compare settings and see what's different.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Alvaro G Vicario <al******************@telecomputer.com> wrote in
news:1r****************************@40tude.net: *** Name wrote/escribió (Tue, 30 Aug 2005 21:24:14 GMT): I have a site that has been working perfectly for a few years now, under PHP 4.2.3. Since later versions of PHP run so much more quickly, I wanted to update this site to one of those later versions. Being a very cautious person, I started with 4.3.11, since it was the highest version of the next PHP increment. When I tried this version, my session file kept getting rebuilt (with the same name) as though the session file found was old. The same thing has happened to me all the way to version 5.0.4.
A test you can do: backup php.ini and replace it with the old one from 4.2.3. If that way it works, compare settings and see what's different.
orry, I've tried the easy stuff (and some pretty tough stuff too). This
may be needed additional information. If I recreate PHP with all the same
configuration options, except to make it an Apache module, it works fine.
I would keep it this way, however, our security setup won't allow it on the
production system.
Now I'm no PHP expert. Was there a big (or subtle) change in how sessions
were handled between 4.2.x and future versions? I noticed there are
additional INI entries, but they seem to deal with 4.2.x compatibility and
security.
Thanks,
Vincent
*** Name wrote/escribió (Wed, 31 Aug 2005 13:27:01 GMT): orry, I've tried the easy stuff (and some pretty tough stuff too). This may be needed additional information. If I recreate PHP with all the same configuration options, except to make it an Apache module, it works fine. I would keep it this way, however, our security setup won't allow it on the production system.
Have you been able to reproduce the problem with a four line script? If so,
could you please paste it here?
In any case, I realize I don't really understand what your problem is.
Session file is supposed to be rebuilt when you change session data :-?
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Alvaro G Vicario <al******************@telecomputer.com> wrote in
news:zi******************************@40tude.net: *** Name wrote/escribió (Wed, 31 Aug 2005 13:27:01 GMT): orry, I've tried the easy stuff (and some pretty tough stuff too). This may be needed additional information. If I recreate PHP with all the same configuration options, except to make it an Apache module, it works fine. I would keep it this way, however, our security setup won't allow it on the production system.
Have you been able to reproduce the problem with a four line script? If so, could you please paste it here?
In any case, I realize I don't really understand what your problem is. Session file is supposed to be rebuilt when you change session data :-?
<?
session_start();
session_register("count");
$count=$count+1;
echo $count;
?>
<EOF - test.php>
<BOF - php-cgi.ini (as it pertains to sessions)>
session.register_globals=1
session.bug_compat_42=1
session.bug_compat_warn=0
<EOF - php-cgi.ini end>
When I run this, count always displays as 1. I have done traces on the
server and it shows that the file is created the first time and then
getting opened with O_TRUNC each following time, rather than updated.
Thanks,
Vincent
*** Name wrote/escribió (Fri, 02 Sep 2005 16:07:00 GMT): <? session_start(); session_register("count"); $count=$count+1;
You modify $count *after* storing it in session data?
echo $count; ?>
[...] session.register_globals=1
When I run this, count always displays as 1.
From manual:
"If you want your script to work regardless of register_globals, you need
to instead use the $_SESSION array as $_SESSION entries are automatically
registered. If your script uses session_register(), it will not work in
environments where the PHP directive register_globals is disabled."
I particularly find it very easy to write insecure scripts when
register_globals is set to 'on' so I always use $_SESSION. I don't think it
worth trying to debug a script that relies on register_globals.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Alvaro G Vicario <al******************@telecomputer.com> wrote in
news:lm***************************@40tude.net: *** Name wrote/escribió (Fri, 02 Sep 2005 16:07:00 GMT): <? session_start(); session_register("count"); $count=$count+1;
You modify $count *after* storing it in session data?
echo $count; ?> [...] session.register_globals=1
When I run this, count always displays as 1.
From manual:
"If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled."
I particularly find it very easy to write insecure scripts when register_globals is set to 'on' so I always use $_SESSION. I don't think it worth trying to debug a script that relies on register_globals.
Sorry, but I did read this part of the manual. Maybe I'm
misunderstanding it.
I thought, since I have register_globals set to "1," that I was okay.
In any event, using $_SESSION fixes my sample. However, my production
script
already uses $_SESSION, so I have nothing I can change (it also has
register_globals=1)
there. I can't post my production script (you wouldn't want it anyway.
It is about a
thousand lines long [don't look at me. I didn't design the
monstrosity.]).
I guess, at this point, I'm on my own again. If I figure out what is
happening and get
things running, I'll post the solution.
Thanks,
Vincent
Name <e-****@company.com> wrote in
news:Xn*****************************@199.45.49.11: Alvaro G Vicario <al******************@telecomputer.com> wrote in news:lm***************************@40tude.net:
*** Name wrote/escribió (Fri, 02 Sep 2005 16:07:00 GMT): <? session_start(); session_register("count"); $count=$count+1;
You modify $count *after* storing it in session data?
echo $count; ?> [...] session.register_globals=1
When I run this, count always displays as 1.
From manual:
"If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled."
I particularly find it very easy to write insecure scripts when register_globals is set to 'on' so I always use $_SESSION. I don't think it worth trying to debug a script that relies on register_globals.
Sorry, but I did read this part of the manual. Maybe I'm misunderstanding it. I thought, since I have register_globals set to "1," that I was okay.
In any event, using $_SESSION fixes my sample. However, my production script already uses $_SESSION, so I have nothing I can change (it also has register_globals=1) there. I can't post my production script (you wouldn't want it anyway. It is about a thousand lines long [don't look at me. I didn't design the monstrosity.]).
I guess, at this point, I'm on my own again. If I figure out what is happening and get things running, I'll post the solution.
Thanks, Vincent
This paticular problem is now solved. I don't know why the
manifestation of this was the loss of session data, but the
problem was that I did not have the ORACLE_HOME enviroment
variable set.
Thanks for everyone's support,
Vincent This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jason Telisch |
last post by:
I read and reread the PHP manual about sessions, and I have a quick
question. What causes the session id to change? I tried destroying the
session and unsetting the session vars, but it maintains...
|
by: Paul Yanzick |
last post by:
Hello,
I am trying to develop a book tracking application for my capstone in
school, and am running into a problem.
The application is an ASP.Net application written in C#. The first page you...
|
by: Nad |
last post by:
Good day,
I have a question about the Page.Session property used in ASP.NET
This property is defined as follows:
public virtual HttpSessionState Session {get;}
and HttpSessionState is a...
|
by: Elliot M. Rodriguez |
last post by:
I am seeking some advice on an issue I am facing concerning session state.
I have an app that relies on 2 session values being set at the start. These
session values set the stage for data that...
|
by: ASP.Confused |
last post by:
As you can tell from my previous posts on this issue...I'm really confused
:-/
I have a few ASP.NET web applications on my web host's "https" server. Our
web host has a single "bin" folder for...
|
by: N. Demos |
last post by:
Hello,
I'm learning ASP.NET, and am having a strange problem with some example
code from the book I'm using. The code increments and displays the value
stored in a session variable when the "Add"...
|
by: UJ |
last post by:
I have a page where the user can upload a video file. As you can guess, this
may take a while. Is there a way I can change the session timeout for just
this one page? I would also want to change...
|
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= |
last post by:
I tried:
<sessionState timeout="1">
</sessionState>
bounced IIS, and after 1 minute still had a session.
???
--
thanks - dave
|
by: pim |
last post by:
Dear All,
What I was wondering is how safe it is to store user_id or username or
anything like that in session. I usualy store a bunch of info in a
session so I do not need to search the...
|
by: Josh |
last post by:
I run a Joomla website and am familiar with php in some but not all
aspects. Currently I am trying to find some solutions related to
session handling.
Am I correct in saying that "login" is kept...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |