473,657 Members | 2,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session_start and form with post method?

I'm starting a session with session_start. That works fine. I can see
the $_SESSION variables from other php pages. However, when I go to an
external website and call one of the php pages from a form
(method=post), session_start() starts a new session and kills the old
one. Can someone tell me why this happens and how to prevent it from
happening. My php pages are being called from an external web site. I
need to get the session created in login.php to be valid later in
"upload.php ", eg.

Is there some problem with forms and POST causing new sessions to
start?

here is my phpinfo: http://68.115.203.26/phpinfo.php

thanks,
Roger

Jul 17 '05 #1
3 2372
*** Roger Lord wrote/escribió (Tue, 14 Sep 2004 10:43:00 -0400):
I'm starting a session with session_start. That works fine. I can see
the $_SESSION variables from other php pages. However, when I go to an
external website and call one of the php pages from a form
(method=post), session_start() starts a new session and kills the old
one.


Just a crazy idea... Check the external site HTML source and look for a
hidden form variable called PHPSESSID. You have an option called
session.use_onl y_cookies set to Off so PHP may be confused by the
aforementioned form field if the remote field uses url_rewriter.ta gs to
rewrite forms.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Jul 17 '05 #2
On Tue, 14 Sep 2004 17:15:01 +0200, Alvaro G Vicario
<al************ ******@telecomp uteronline.com> wrote:
*** Roger Lord wrote/escribió (Tue, 14 Sep 2004 10:43:00 -0400):
I'm starting a session with session_start. That works fine. I can see
the $_SESSION variables from other php pages. However, when I go to an
external website and call one of the php pages from a form
(method=post), session_start() starts a new session and kills the old
one.


Just a crazy idea... Check the external site HTML source and look for a
hidden form variable called PHPSESSID. You have an option called
session.use_on ly_cookies set to Off so PHP may be confused by the
aforemention ed form field if the remote field uses url_rewriter.ta gs to
rewrite forms.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions


No, that didn't make any difference. Use_only_cookie s is now on.
Jul 17 '05 #3
On Tue, 14 Sep 2004 17:15:01 +0200, Alvaro G Vicario
<al************ ******@telecomp uteronline.com> wrote:
*** Roger Lord wrote/escribió (Tue, 14 Sep 2004 10:43:00 -0400):
I'm starting a session with session_start. That works fine. I can see
the $_SESSION variables from other php pages. However, when I go to an
external website and call one of the php pages from a form
(method=post), session_start() starts a new session and kills the old
one.


Just a crazy idea... Check the external site HTML source and look for a
hidden form variable called PHPSESSID. You have an option called
session.use_on ly_cookies set to Off so PHP may be confused by the
aforemention ed form field if the remote field uses url_rewriter.ta gs to
rewrite forms.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions


Ok, I found it. It was zone-alarm. I had "cookie control" set to
medium:
"Blocks cookies from tracking sites"
"Allows cookies for personalized services"

If I turn cookie control off in zone-alarm ("Allows all cookies") then
it works.

It sounds to me that 'medium' ought to work. Anyone know why it
doesn't? Also, I have cookies enabled in the browser (firefox).
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
11144
by: Chris Allen | last post by:
Hi I'm new to PHP and I'm trying to create a Login Form. Once the user has logged in then he shouldn't have to log in again. The trouble is I'm getting a new session ID between every page and so it doesn't recognise the user. I've used Session_Start() which I thought was meant to maintain the session variables between pages but it doesn't do work. Any ideas or FAQ's?
2
3208
by: Paul | last post by:
Dear experts, I have a problem with session_start() and JavaScript. In IE6 (but not Mozilla) the first time the page below loads the JavaScript doesn't work (clicking on the graphic should write 'click' in the form entry box). After you hit refresh it works fine. IE doesn't report any error (reporting is turned on). It also works fine if I remove the "session_start()". Is this an IE bug or am I doing something wrong? Is there a fix or...
3
2207
by: Trogdor | last post by:
I set up a server on an AMD 650 machine running gentoo linux. I installed Apachie 2, MySQL 4.1 and PHP 4.3.11 I use another computer on my local net (192.168.0.x) to access the server as a client. MySQL works perfectly. I have created and queried databases with no problem. Apachie 2 appears to work with no problem. I can call up web pages in the expected maner.
1
8924
by: Mercy | last post by:
Hi, I'm a newbie. I was trying to figure out how to use the Session_start method? The reference books I'm reading say that a session STARTS when "session_start" is called. But ... in their sample code... I never see that explicitly called. Is it supposed to be called from the Global.asa file (still not sure what that is...) Is "session_start" a server-side scripting thing? Or a client-side scripting thing? I'd really appreciate a nice...
5
1724
by: paladin.rithe | last post by:
I'm running into an issue with session_start(). I see that you can't run it twice, otherwise it causes an issue. That's fine, and makes sense. I also saw some ideas on how to get around this if you need to run it more than once, and I get those as well, but none are working for me. Here's a mockup of what I have: index.php info.php lib/common.php
2
1841
by: IchBin | last post by:
I am getting the error message below when ever I try to start my script on two different servers. I am not getting any errors off of my PC. I have looked around and found the answer a simple one. I can not stop the error in my script. The session_start() is the first thing that happens before any Headers are created. Any one have any suggestions. Include the start of the code that uses the session var. Warning: session_start(): Cannot...
4
5934
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world, however and am really struggling with managing sessions in PHP, based on my experiences with managing sessions in ASP. 99.9% of the feedback I have seen when dealing with the errors has referred to having whitespace before the <?php or after the...
5
7178
by: siyaverma | last post by:
Hi, I am new to php, i was doing some small chnages in a project developed by my collegue who left the job and i got the responsibility for that, After doing some changes when i run it on my local server it was working fine but giving some errors those are Notice: Undefined index: phplogin in C:\Inetpub\wwwroot\sampleft\index.php on line 116 Notice: Undefined variable: username in C:\Inetpub\wwwroot\sampleft\index.php on line 116 ...
6
1752
by: microguy | last post by:
I am kind of new on PHP. I could not figure out what went wrong on my ph. Here is code: <?php include 'dbc.php'; $user_email = mysql_real_escape_string($_POST); if ($_POST=='Login')
0
8384
marktang
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...
1
8499
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,...
0
7314
agi2029
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...
1
6162
isladogs
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...
0
5630
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();...
0
4150
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...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.