Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Session Not Working On Page 3


session ..cant get it to work on page 3 it will not display anyhting on page 3
whhat i do wrong Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Session Is Working Correctly The Files In /var/lib/php/session Are Not 0 Size
I have two server with almost the same environtment, the only difference is on one apache was built from source and another was rpm.

OS: Fedora Core 3
apache 2.0.54
php 5.0.4

On one box session is working correctly the files in /var/lib/php/session are not 0 size when they are expected to hold some session data storing from scripts.

But this is not case for another box. The actual session files are created but they are not filled with data as it is expected and they are always 0 size and session variables are empty. Code:

View Replies !
Session Not Working
For some reason this code is not working, it's worked fine with newer versions of php but now i'm on 4.1.2 and it's not, I've already done some tests and $_SESSION is working fine on the server and there's nothing wrong with the form the page is getting the variables and everything but something is wrong in the script and it's not registering the sessions.

The index page just calls the verify function which keeps sending me back to the login in page because for some reason $_SESSION[username] is not getting registered

The login page is just a basic form with the username and password fields. login2.php calls the login function, i tested and it is recieving the vars from the form just fine just not registering them so that when it redirects me to the index page and verify() is run it redirects me to the login page because the var is not found. PHP Code:

View Replies !
MySql Session Not Working
This is my first time using php and sessions. I am trying to follow
what I recently read, but it isn't working as I was expecting. Please
tell me what I'm doing wrong?

I have defined my session handlers in a session handler include file,
sessions.php. This file calls session_set_save_handler() and also calls
session_start(). Each handler function operates correctly when I login
- the data is put into the session table.

After successful login, the user is redirected to /path/index.php, which
includes sessions.php. session_start() is called again, but the
$_SESSION global has no data.

I know the individual pieces of code are working properly, because at
one point in the process they individually worked. But when I put it
all together, it just keeps going back to the login page.



View Replies !
Working With Session Variables
I have this code:

$itemCode["$basketCount"] = $id ;

Both of the variables on the left are session variables.

So this now has to become:

$_SESSION['itemCode']["$_SESSION['basketCount']"] = $id;

if register_globals are turned off.

however that doesnt compile, so how should it be done properly?



View Replies !
Register_globals Is On Just Because Session Was Not Working
I am using Ubuntu hoary, kernel 2.6.10-5-386, apache 2, php 4 with the
following configuraton:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 1
session.cookie_path = /tmp
session.cookie_domain =
session.serialize_handler = php
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=,fieldse t="
register_globals = On

Apache is running on port 2139.

register_globals is on just because session was not working, but when I
changed, when i access my server from it self (localhost) the session
worked.

View Replies !
Session Not Working In Folders
We just moved a script to a clients server.

We developed in PHP 4 and everything worked fine. The clients server is PHP 5.

Sessions work perfect when its in the main public_html directory.

When a user goes to a folder ie oursite.com/folder/ the session is no longer there.

Is there any changes in the versions that would cause a session to no longer be valid when you enter a folder?

View Replies !
Session Check Is Not Working
I have a session which bounce's out the user if the session doesn't contain their UserID. I aint even changed the code in any way the only substantial change i have done is copy n pasted the script to a different pc and now it won't work at this pc. But it still does on the other computer even though they are 100% the same. Code:

View Replies !
Session Stop Working
I have problem in session and i dont know why it stop working without any reason
so i have to close the broswer and open it again to make it work.

View Replies !
Session Not Working Change In Php.ini?
i do a lot of coding on a development box, and then i just push stuff onto a server when i get a big chunk of it done. well, i recently redid my server just installed xampp on it to get php, apache, mysql working easily.

my problem is, on my development machine, which is also running php, mysql, and apache on linux, ive programmed using SESSION's, and things are working great on this box, but when i pushed it all onto the server, the SESSION stuff doesnt seem to be working the same.

is there something i need to change in php.ini?

i built my development machine so long ago, i dont remember everything i did.

i can try something on my development machine and it works fine, and then when i try it on my server, my error checking is telling me that the SESSION's arent set.

View Replies !
Session Variable Has Been Set To 0 Not Working
I just want a very simple way to log on to a site. When you have been logged in a session variable ($_SESSION['acces']) is set to 1. You can now visited different pages while the variable still stays on 1. When you are logged in it is possible to log out again. Once you have been logged out the $_SESSION['acces'] variable is set to 0 and it isn't possible to log out any more. The weird thing now is that when you go back to pages where you were before (when you were still logged in) you SOMETIMES get a page where you can log out again. Haven't got a clue how this is possible since the same variable has been set to 0 just earlier.

View Replies !
Session In Function Not Working
The function works great, but on the following pages the session does not get set to the right value (or any value at all). Here is my code: Code:

$_SESSION['totalCost'] = $totalCost;

session_start() is set on both pages and other $_SESSION array variables are being read just fine, but none of those is set inside a function.

View Replies !
Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2:
<? php session_start();
$s=$_POST['sSelected'];
session_register("s"); ?>

in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>

The form var displays the first time the page loads. The session var
displays only after reloading the page2.

View Replies !
Session Functions Not Working With Windows XP, Php 4.3.4
i have two simple pages, test.php and test2.php

test.php contains:

<?php
session_start();
$_SESSION['test']="blah";
?>

and test2.php contains:

<?php
session_start();
print $_SESSION['test'];
?>

in the php.ini file, my session save path is set to /tmp. i dont even know
where to look for the tmp folder. also, when i go to test2.php after
accessing test.php, the page is blank and it doesnt print "blah".

as i mentioned in the title, im using windows xp (home edition) with PHP
4.3.4 and apache 1.3

View Replies !
Mini Session Script Not Working
why this script is not working correctly. 

<?php
session_start();
if (isset($_SESSION['record_number'])) {
  $_SESSION['record_number'] = 0;
}
?>
The error I am getting is this...

Parse error: syntax error, unexpected '{' in /home/carlos/web/my-program/test.php on line 3

I have beat my proverbial head against the wall on this one.  I just don't get it. 

View Replies !
Server SESSION Not Working Properly.
i have wrote the following script but , it works 100% ok in my WAMP, but when i have uploaded it in server then its not working properly though it dosent shows any warning or error but sesson is not working.

ithe path and of the session save folder is also correct and i foxed CHMOD 777 for the folder. Code:

View Replies !
Login Session Code Not Working
im trying to get the sessions working for my login page the code doesnt give me any error messages but it doesnt seem to restrict any access either this is wot i have so far: Code:

View Replies !
Is There A Session ID That Exists When You Start A Session On A PHP Page?
Is there a session ID that exists when you start a session on a PHP
page? I have noticed that it sometimes is passed in the URL. How do I
get this session ID even if it doesnt exist in the URL?

View Replies !
Session Variable Is Created And Set To True Not Working
I have a private area in my site. The user enters the username and password, then clicks "enter" and the session is created and also a session variable is created and set to true. Every page of the private area, checks whether this session variable is set to true and then if so, it gives you access, otherwise it redirects to a noaccess page.
The user moves arround the private area, do whatever he/she has to do and then logs out. Then the session is destroyed and the session variable also.

Now if the user clicks the back button of the explorer, is redirected to a noaccess page, fine, and so on as long as the user navigates back in the session, but when the user gets to the log on page, it recovers the POSTDATA and sets againg the session variable to true and anyone can see then the private area. I have set the page not to be cached, but it does not work. how to solve this problem?

View Replies !
Php Session Problems When Working With A Windows Client Program
I am currently involved in a project that involves a windows client
program written in delphi and a web application written in php. I
have made several php pages for the delphi program to do requests via
the http component from INDY. the problems I am having are:

1) the first request from delphi app to php web app is the
authenication. In which user sends username + password to the php app.
If authenication is valid, a session is started and the sid is
returned to the client. All subsequent requests from delphi app to
php web app will have this sid as one of the arguments in the POST
form request (this is one of the function in the INDY component for
delphi). Even the sid is passed to the subsequent pages, the session
global array is still undefined. However if I open up a web browser
and create my own string request to the login page then the next page,
the global array would be defined (using var_dump + echo to see the
array) what is the problem?

2) does the above problem has anything to do with the http referer
field?

3) this problem that I am having has been asked before on google
group, but somehow the person who asked it didnt' put down the
solution for it. (this only involves the web only) when I login on a
page and return with a session id, then I log out.. the user is
redirected to the login page again. However if the user login again
(with a different login account), he would be presented with the same
session ID as before. a different sesson id is presented only if the
user restart the browser. why is that happening?

View Replies !
Two PHP Scripts On One Page Not Working?
I have two small PHP scripts running on a test page

Both scripts work perfectly when there is one script on a page. However, if I place two on the page (one above the other), the second script will not render. I get no PHP error messages - the script will just not render.

I think the PHP Scripts are OK as they were automatically generated by RSS Feed Burner and both do run separately.

There may be an issue with having separate calls of some kind on the page or my server might not be set right. I did a server test that I think shows that it is OK but I am not sure. The only think I have in my htaccess file for PHP is: "AddType application/x-httpd-php .htm .html" .

I am new to PHP and was wondering if anyone can see why both scripts will not run together?

View Replies !
Calendar Page Not Working (in IE)
I have been hard at work on this one and my computer broke so I haven't been able to resolve this problem for a bit, I open the webpage in IE and it doesn't show up but in FF it shows up just fine, anyone able to give me a hand on this one, it was working fine awhile back but now for some reason it seems to have broken. Code:

View Replies !
Flash Not Working On Page
I have inserted Flash animation on my page as normal (using Dreamweaver)- only it won't display in the browser for this site - which has various php/mysql pages on it - but this one is a simple html page - which displays the html - but not the Flash ?

The flash displays in the browser if I insert it into a page on another site - which does not use php/mysql.

Is it to do with the set up of the site which uses php/mysql ? - e.g. the fact there's testing server settings. My sites/servers are hosted remotely - and not on my own machines.

View Replies !
Login Page Not Working
I have a database installed that can accept a csv file.
when I installed onto a new server, it wont upload.  is there anything obvious in the phpinfo that could be causing this? also, the login page wont work on this server.
just reloads the page again when submitting the user and pass Code:

View Replies !
Working With Sessions And Storing Credit Card Info Inside A Session
have a security concern working with sessions and storing credit card info inside a session, going to the payment gateway, redirecting back to my page and doing a soap connection and processing the order with the session variables, and then destroying the session afterwards.

is it safe enough to store credit card information in this manner, can hackers get to this? cause its possible to view POST variables with a firefox plugin.

or is it safer to write it to a temporary database table, do what i need to do and then delete the row?

View Replies !
Get Two Dropdown Lists Working On A Page
i am trying to get two dropdown lists working on a page. How do i go about this. For example, I have 1 table which holds countries and cities. When a user selects a country in the first dropdown list, i'd like the second dropdownlist populate with a list of cities etc. from my database.

View Replies !
Working With Dates On The Modify Page
I have a column in a table called testimonialDate. It is of type 'date'. When trying to modify a record, I can get it to display nicely on the modify page using:

$testDate = $testrow['testimonialDate'];
$testDate2 = strtotime($testDate);
$newdate=date("m-d-Y", $testDate2);

then <?=$newdate?>

However, when I change the displayed date and hit the modify button, it blanks out the testimonialDate column in the record selected.

I've found a lot of hints on the internet for displaying, but how do I send the info back up?
I'm also having issues trying to add a record. Typing in 3-3-2003 in text field results in 2003-3-20 in database.

Can I get some hints or a link to a good tutorial?

View Replies !
$HTTP_REFERER Not Working On Index Page
I'm using $HTTP_REFERER in various parts of my site and it works well. When I use $HTTP_REFERER on my index page to see where members are coming from before they log into my site it won't work. Perhaps this has something to do with the previous page being from an outside site?

View Replies !
I Can't Get Info.php Working On PWS Win98 The Page Cannot Be Displayed
Can someone help me?
I have tried php-4.3.4-installer
I have tried php-4.3.4-Win32
If someone has PWS running PHP4 on windows 98
I would appreciate any help. thank-you

View Replies !
Drop Down Based On First, Working, But How Do I Keep The Value If Page Reloaded?
I have a drop down list that is populated via MySQL. Once an item is selected a second drop down appears, again populated by MySQL. I know how to keep the value for the first drop down, if the page is reloaded.... but the second one is where I am having the issue.

Is it possible to have a page reload and echo not only the first dropdown value, but also the second within the <select> tags?

View Replies !
Submit Page A D Working With $_post Data
I am working with data that I pull from one of tables in my data base and format it into tables for ever entry on my webpage. In each table I place a check box called review (see code below): Code:

View Replies !
Php Code Embedded Inside Html Page Not Working.
How do I make or workaround in my Apache server to parse *.html files
for
<?php ?> code embedded in it?

Currently php recognises <?php ?> tag only if the file has a *.php
extension. Any php code inside *.html or *.htm is ignored.

Since I dont have admin access to the server or admin person, changing
the php configuration is out of choice. Now I have to go thru echo
and print statemnets to get it work. But it looks very cumbersome and
prone to errors.

View Replies !
Changed Page From .htm To And My Drop Down Menu Stoped Working
I have been building a rottweiler site for a friend. I just installed "The Search Engine Project" so I need to change one of my pages from .htm to .php so I can integrate the search results window into my layout.

But, whenever I change the page from .htm to .php my menu, a project 7 css drop down menu, stoppes working. Why is this? Code:

View Replies !
Links Stopped Working - Use PATH/index.php?p=PAGE In My URL
i have just moved my website from one server to another, on the first my pages worked perfect (not considering markup) but now my links just won't work anymore...

i use PATH/index.php?p=PAGE in my URL, it worked well on the other server, but after i switched it just stopped working...

and i have no clue where to find the error... it just keeps showing the first page...

View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this:

<?php
session_start();
session_unregister($SESSION);
session_destroy();
unset($SESSION);?>

In each page I have this other script
#accesscontrol.php
<?
session_start();
if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo
{ #Maybe I use after. } else
{echo "<h1>Sorry...</h1>";
echo "<A href = "index.php"><H4> Login Univernet</H4> </A>";
session_destroy();
exit;}?>

The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.

View Replies !
Set Page URL Session
Please would you tell me how to set session on page URL?

all i want to do is when click on a link(say "Continue Shopping"), it will go back to the last viewed search result page (for customers continue add items to their shopping cart).

is it possible?

View Replies !
How To Set Page Session
im stuck in setting the session on page URL. what i want to do is re-direct the customers back to the last search result page (from which they added an item to the shopping cart) for them to continue shopping after they click on the "continue shopping" button. someone told me need to set session on the last search result page viewed, but i don't know how.

View Replies !
Set The Session Variable To Read The Session Variable In The Next Page.
I have a PHP web app, that runs with Register global off. It sets $_SESSION variables that are used in other pages. The script works fine on my server that runs Apache2 and PHP 5.0.1.

But when I move the scrip to my hosting company that runs , IIS and PHP5.0.2, they don't work. It seems that its not able to set the session variable to read the session variable in the next page. cvWhat should I be checking ? Has anybody faces this situation before ?

View Replies !
Start A Session On Page
im trying to start a session on my page... and it kind of works... after initializing the session, and assigning a value to that variable, when i print that variable... it prints the value, but also shows some error messages...

This is my code...
session_start();
session_register('userNum');
$userNum = mysql_result($res,0,"userId");
printf($userNum);

These are my errors...
Warning: Cannot send session cookie - headers already sent
by (output started at 'examplesiteandpage':2)
in 'examplesiteandpage' on line 8

Warning: Cannot send session cache limiter - headers already
sent by (output started at 'examplesiteandpage':2)
in 'examplesiteandpage' on line 8

Does anyone know why this happens? The variable is still created, and the value assigned... but i get the errors... thanks

View Replies !
Session And Search Page
In my search page "search.php" (where the form is) I have set the session: PHP Code:

View Replies !
How To Pass Session Id To Another Page?
I have a script for loggin to a site. My problem is that I want to pass the session Id to another page but I dont know how to do this. what is the correct way to pass another page the session id for security issues?

my another page is: pagina_entrada.htm in this page I have the script for checking if it is the real session id if not it is refused the page This is the script in each page belong to site. All pages has this script first. Is tthis correct? Code:

View Replies !
Sharing Session With ASP.Net Page
Is there a way of sharing sessions between PHP and ASP.Net 2.0 page if they are both in the same directory?

Let's say I have a PHP page page1.php with the following code:

View Replies !
When Using SESSION, It Gives BLANK Page
I installed PHP 5.2, MySQL (latest version) and Apache 2 on Win XP. it works OK except SESSIONS when I have a file beginning like this, it gives a blank page:

session_start();
if (isset ($_SESSION['loggedin']) && isset ($_SESSION['time']))
{

I think it must be about php installation.and yes it works on other servers, but on my pc, it gives a blank page. Code:

View Replies !
Pass XID Via A Session Along Each And Every Page
the user sets up the account and adds each subuser as part of his "group". they share an XID inside the database. so user XID = 001 and subuser XID=001 so i know they belong to the same group.

I want to be able to pass this XID via a session along each and every page. So one of my functions in my application would be to list all submembers with this XID. when the main user signs in, how can he carry this XID over every single page he visits? (There is no telling when the main user wants to perform the function above)

So login would include username and password, but in the background i want the XID to be passed along somehow after login. So obviously the username password and XID would be in the same table. Would i pass information in an array? how does the script know to hit this one table. I guess im having trouble putting 2 and 2 together.

View Replies !
Session Destroys Only A Page Later?
This is the code that I'm using to check if someone is logged in or not.  This code is on every page because there is a login or logout button on every page.

if (!isset($_SESSION['user'])){
echo '<a href="login.php">LOGIN</a>';
}else{
echo '<a href="logout.php">LOGOUT</a>';
}

In the flow of my php document this checking if the user is logged in happens after the actual login or logout script.  Because of this, I assumed that as soon as someone logs in, the code would reflect the change.  For some reason, on the page that logs me in, the code still thinks that the session is not set yet and therefore I still see the login option.  Same thing with logout.  It takes for me to click on another page for the code to finally change.  Any ideas what is going on?

View Replies !
Session Slowing Page Down.
I'm writing a script that uses php sessions to track logged-in users, as well as to pass some variables around. Everything works find on my computer. However, when one of my colleagues access the script, the page takes about 5x longer to load.

While a page will load in less than a second for me, it takes about 4-5 seconds for him. When a page loads in 4 seconds for me, it takes about 15-20 seconds for him. Code:

View Replies !
Page Not Recognizing Session
I am trying to do a very simple login form and register a session in order to validate the user on a particular section of my web site. Code:

View Replies !
Page Protected, Session
i would like to restrict user to go into a page if he knows the url to it. how do i go about it? i have created a page to do the user login verification and set sessions to it. Code:

View Replies !
Session Is Not Being Carried On To The Next Page
I made my login page and you can login but then the session is not being carried on to the next page Code:

View Replies !
Sessions: It Don't Carry The Session To The Other Page
I have a problem with sessions, the session is created on the check page(check.php) sucessfully but it don't pass the session to the next page. PHP Code:

View Replies !
Creating A Session Variable On Every Page
I'm using PHP 4.4.4 with Apache 2.2. What I want is that if a
customer visits any page of the top level directory of my site with
this string passed in the URL's query string, "RID=xxx", I would like
a session variable called "RID" with the value "xxx" to be created.
However, I would like to avoid putting this code

session_start();
if (!empty($_REQUEST['RID'])) {
$_SESSION['RID'] = trim(strtoupper($_REQUEST['RID']));
} // if

on every page in my top level directory. Does anyone know a more
efficient way?

View Replies !
Password Protected Page - Session Id Can't Be Used.
I try loging in and it brings me back to the same page or it tells me my session id can't be used. Here is the password code i used. Code:

View Replies !
Pass The Session Variables To A Second Page.
Ive got a problem with our server. I checked it and i cant login to our webmail(horde) and all other sites that  requires logging in. So far i think it has something to do with session variables not being written or not being able to pass the session variables to a second page.

Error messages:
Undefined index: uid
Undefined index: sid

Here's our server specs:
Linux Dedicated server
Fedora Core 3
Plesk 7.5.4
PHP 4.3.11

Im not that well versed with handling servers to i dont know were to start.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved