Re: [nyphp-talk] PHP $_SESSION

2008-06-06 Thread anthony wlodarski
Two days later and it is a quote issue... Glad the bug was cleared. -Anthony On Jun 5, 2008, at 9:05 PM, Tim Lieberman wrote: Woot. On Jun 5, 2008, at 6:57 PM, Néstor wrote: FOUND THE PROBLEM In the php.ini file there was an extra double quote '"' I found it by a miracle while I was

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
Woot. On Jun 5, 2008, at 6:57 PM, Néstor wrote: FOUND THE PROBLEM In the php.ini file there was an extra double quote '"' I found it by a miracle while I was going line by line on the php.ini file. I do not know how it got there. as soon as I removed it then I restarted the service for

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
Is it possible that safe mode is turned on? -Tim On Jun 5, 2008, at 6:31 PM, Néstor wrote: WOW, I am getting this on my /var/log/httpd/error_log file [Thu Jun 05 17:29:46 2008] [error] [client 10.100.1.67] PHP Warning: Unknown: Failed to write session data (files). Please verify that the

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
FOUND THE PROBLEM In the php.ini file there was an extra double quote '"' I found it by a miracle while I was going line by line on the php.ini file. I do not know how it got there. as soon as I removed it then I restarted the service for httpd and it is working. I can go home know

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
WOW, I am getting this on my /var/log/httpd/error_log file [Thu Jun 05 17:29:46 2008] [error] [client 10.100.1.67] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp\n\n; Whether to use cookies.\nsession.use_cooki

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
root owns the directory but is set to allow everyone 777 On Thu, Jun 5, 2008 at 5:08 PM, Tim Lieberman <[EMAIL PROTECTED]> wrote: > /tmp is usually easy to write to, but it sure seems like apache doesn't > have permission to write there. > Who owns /tmp? What permissions are are on the directory

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
So strange. Anything in the apache error_log? -Tim On Jun 5, 2008, at 6:04 PM, Néstor wrote: the permission for /tmp is 777 On Thu, Jun 5, 2008 at 5:01 PM, Néstor <[EMAIL PROTECTED]> wrote: No sess files in /tmp _SERVER["HTTP_COOKIE"] --> PHPSESSID=ttl1fo7uv30sq4hbi8fkq4v683 On Thu, Jun

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
/tmp is usually easy to write to, but it sure seems like apache doesn't have permission to write there. Who owns /tmp? What permissions are are on the directory? -Tim On Jun 5, 2008, at 6:01 PM, Néstor wrote: No sess files in /tmp _SERVER["HTTP_COOKIE"] --> PHPSESSID=ttl1fo7uv30sq4hbi8fk

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
the permission for /tmp is 777 On Thu, Jun 5, 2008 at 5:01 PM, Néstor <[EMAIL PROTECTED]> wrote: > No sess files in /tmp > > _SERVER["HTTP_COOKIE"] --> PHPSESSID=ttl1fo7uv30sq4hbi8fkq4v683 > > > > On Thu, Jun 5, 2008 at 4:06 PM, John Campbell <[EMAIL PROTECTED]> > wrote: > >> On Thu, Jun 5, 200

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
No sess files in /tmp _SERVER["HTTP_COOKIE"] --> PHPSESSID=ttl1fo7uv30sq4hbi8fkq4v683 On Thu, Jun 5, 2008 at 4:06 PM, John Campbell <[EMAIL PROTECTED]> wrote: > On Thu, Jun 5, 2008 at 6:59 PM, Néstor <[EMAIL PROTECTED]> wrote: > > The session variables are empty. The save path is /tmp > > Not

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
SSH into the box: cd / ls -l -- what are the owner and permissions on /tmp? cd /tmp ls do you see php session files? -Tim On Jun 5, 2008, at 5:09 PM, Néstor wrote: I tested the same small program on my other server and the value changes everytime. PHP works on both the old an the new syste

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
I tested the same small program on my other server and the value changes everytime. PHP works on both the old an the new system What should I check that I might be missing on one system compare to the other so I can pass SESSION information. Remeber my old system is RHEL 3/apache 1.39/ php 4.3.2

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread John Campbell
On Thu, Jun 5, 2008 at 6:59 PM, Néstor <[EMAIL PROTECTED]> wrote: > The session variables are empty. The save path is /tmp Not what I meant. From ssh, type: cd /tmp ls Do you see files that start with sess? > I do see the PHPSESSID on the phpinfo page. I know that. Do you have a cookie for y

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
I tested this small program and the value is always 1 On Thu, Jun 5, 2008 at 3:53 PM, John Campbell <[EMAIL PROTECTED]> wrote: > > I assume you are testing with a simple page like > > session_start(); > echo ++$_SESSION['foo']; > > The number should increase on every refresh. Does it just prin

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
The session variables are empty. The save path is /tmp I do see the PHPSESSID on the phpinfo page. It has to do with the php.ini set up but except for the differences I mentioned on a previous email I do not see much differences. I will try it on a small page like you mentioned. :-) On Thu, J

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread John Campbell
On Thu, Jun 5, 2008 at 4:30 PM, Néstor <[EMAIL PROTECTED]> wrote: > I was wrong, there is a SESSION section is just that I was searchin for > _SESSION > on the page and I was not findng it. > > session.save_path/tmp > I assume you are testing with a simple page like http://lists.nyphp.org/mailman

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread David Krings
You can attach the HTML or even zip it up and then attach it. Or just post the sections asked for. Néstor wrote: I tried sending the phpinfo data but the message was flag for being too long. :-) On Thu, Jun 5, 2008 at 1:21 PM, John Campbell <[EMAIL PROTECTED] > wrot

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
I tried sending the phpinfo data but the message was flag for being too long. :-) On Thu, Jun 5, 2008 at 1:21 PM, John Campbell <[EMAIL PROTECTED]> wrote: > > I am sorry, that was not what I meant. I was talking about the output > of phpinfo. Can you provide a link to the output of phpinfo() o

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
The php.ini on my RHEL 3/php4.3.2 shows ; PHP 4.2 and less have an undocumented feature/bug that allows you to ; to initialize a session variable in the global scope, albeit register_globals ; is disabled. PHP 4.3 and later will warn you, if this feature is used. ; You can disable the feature and

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
I was wrong, there is a SESSION section is just that I was searchin for _SESSION on the page and I was not findng it. this is the session information - session Session Support enabled Registered save handlers files user Registered serializer handlers php

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread John Campbell
On Thu, Jun 5, 2008 at 3:29 PM, Néstor <[EMAIL PROTECTED]> wrote: > The login page set mysession id > the second page checks the session ids and redirects to login page if no > match > > This is the output oh my header_list before just before redirecting to the > login > page: > array(4) { >

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
Interesting that the SESSION data is not there but I can the HTTP_COOKIE PHPSESSID=ttl1fo7uv30sq4hbi8fkq4v683 which just happens to be my session_id(). Still no SESSION section :-( On Thu, Jun 5, 2008 at 12:29 PM, Néstor <[EMAIL PROTECTED]> wrote: > The login page set mysession id > the second

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
The login page set mysession id the second page checks the session ids and redirects to login page if no match This is the output oh my header_list before just before redirecting to the login page: array(4) { [0]=> string(23) "X-Powered-By: PHP/5.1.6" [1]=> string(38) "Expires: Thu, 1

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
phpinfo() and the below code does not show any session info. I can see the session_id() in mu login page before I call the next php page. Then I look at the session info on the second page there is not session info. Remember this code I wrote about 3 years ago and it works on my other linux syste

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread John Campbell
On Thu, Jun 5, 2008 at 3:00 PM, Néstor <[EMAIL PROTECTED]> wrote: > phpinfo() does not show the SESSION section > > On Thu, Jun 5, 2008 at 11:44 AM, John Campbell <[EMAIL PROTECTED]> wrote: Well that is clearly a problem. Can you post the header section? It also seems strange that your posted v

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
phpinfo() does not show the SESSION section On Thu, Jun 5, 2008 at 11:44 AM, John Campbell <[EMAIL PROTECTED]> wrote: > > > Can you post the session section from php_info() ... it might give some > clues. > > -John C. > ___ New York PHP Community Talk

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread anthony wlodarski
Do this to see what's in the $_SESSION variable. "; print_r($_SESSION); print ""; ?> On Jun 5, 2008, at 2:31 PM, Néstor wrote: yes On Thu, Jun 5, 2008 at 11:15 AM, Tim Sailer <[EMAIL PROTECTED]> wrote: On Thu, Jun 05, 2008 at 11:05:35AM -0700, Néstor wrote: > To answer the last 3 postings > >

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread John Campbell
On Thu, Jun 5, 2008 at 2:09 PM, Néstor <[EMAIL PROTECTED]> wrote: > My previous system's php: > PHP 4.3.9 (cgi) (built: Nov 24 2004 08:48:16) > session variables work > > My new system's php: > PHP 5.1.6 (cli) (built: Jan 15 2008 04:57:50) > session variables do not work Can you post the session s

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
yes On Thu, Jun 5, 2008 at 11:15 AM, Tim Sailer <[EMAIL PROTECTED]> wrote: > On Thu, Jun 05, 2008 at 11:05:35AM -0700, Néstor wrote: > > To answer the last 3 postings > > > > I get the session_id() and save it in $_SESSION['mysession'] > > then in every page I compare them if not the same then I

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
How can I check to see that the problem is that the session files are writable to the disk? How do I catch the error? my session.path.save points to /var/lib/php/session Thanks, On Thu, Jun 5, 2008 at 11:14 AM, Tim Lieberman <[EMAIL PROTECTED]> wrote: > There's a section in the phpinfo() outp

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Sailer
On Thu, Jun 05, 2008 at 11:05:35AM -0700, Néstor wrote: > To answer the last 3 postings > > I get the session_id() and save it in $_SESSION['mysession'] > then in every page I compare them if not the same then I send the user back > to > the login page: > if($_SESSION['mysession'] != session_id(

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
There's a section in the phpinfo() output called session. Compare those sections between the two php versions. If you don't see anything obvious, post at least the php5 config here, and maybe we'll see something. It sounds to me like wherever PHP5 is trying to save session files on disk

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
My previous system's php: PHP 4.3.9 (cgi) (built: Nov 24 2004 08:48:16) session variables work My new system's php: PHP 5.1.6 (cli) (built: Jan 15 2008 04:57:50) session variables do not work :-( ___ New York PHP Community Talk Mailing List http://lists

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
To answer the last 3 postings I get the session_id() and save it in $_SESSION['mysession'] then in every page I compare them if not the same then I send the user back to the login page: if($_SESSION['mysession'] != session_id() ){ // redirect to the HR admin page header("Location:/logi

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread David Krings
Néstor wrote: I understand this. Like I said it is not working on PHP 5.1. I do the session_start() and then I put the session_id() into my $_SESSION['mysession']; The problem is that my $_SESSION['mysession'] is empty on php 5.1 when it was not in php 4.1. Out of curiosity, why do you store

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Tim Lieberman
What are the session settings you get from phpinfo()? -Tim On Jun 5, 2008, at 11:44 AM, Jorge Lopez wrote: You wouldn't happen to have a custom session handler object? -Jorge On Jun 5, 2008, at 1:23 PM, Néstor wrote: I understand this. Like I said it is not working on PHP 5.1. I do the se

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Jorge Lopez
You wouldn't happen to have a custom session handler object? -Jorge On Jun 5, 2008, at 1:23 PM, Néstor wrote: I understand this. Like I said it is not working on PHP 5.1. I do the session_start() and then I put the session_id() into my $_SESSION['mysession']; The problem is that my $_SESSION

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
I understand this. Like I said it is not working on PHP 5.1. I do the session_start() and then I put the session_id() into my $_SESSION['mysession']; The problem is that my $_SESSION['mysession'] is empty on php 5.1 when it was not in php 4.1. Apparently a logs of people where having this probli

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread David Krings
Hi! I found that calling session_start() before doing anything else seems to be the only way to make that work reliably. I make sure that it is the first thing a script executes. Also, just as a test, add this at the top of the script If that doesn't show any results something is really w

Re: [nyphp-talk] PHP $_SESSION

2008-06-05 Thread anthony wlodarski
The better question is how do you build it currently? Without that I can't figure out how it might be breaking. Also don't forget to call session_start(); otherwise $_SESSION won't resume where it left off. -Anthony On Jun 5, 2008, at 12:47 PM, Néstor wrote: HELP! I am going crazy t

[nyphp-talk] PHP $_SESSION

2008-06-05 Thread Néstor
HELP! I am going crazy trying to figure a problem. I have an existing code that I wrote and it works(miracle!) and I am porting it from php 4.1 to php 5.1 I just realized that my $_SESSION array is empty on php 5.1 Did something changed? What am I missing? Thanks, Nestor :-) ___