473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with $_SESSION and header("Location:...

Session variables set before a header("Location: whatever") are not
being written.

And yes, before the header() call, I have session_write_close() but the
result is the same. This problem is with PHP 4.3.10 on my hosting
providers' server (and obviously I wouldn't like the hassle of changing
hosting providers), but it works OK on some other PHP 4 and PHP 5
servers.

Is there any workaround?

Sep 14 '06 #1
1 2219

he*********@gmail.com wrote:
Session variables set before a header("Location: whatever") are not
being written.

And yes, before the header() call, I have session_write_close() but the
result is the same. This problem is with PHP 4.3.10 on my hosting
providers' server (and obviously I wouldn't like the hassle of changing
hosting providers), but it works OK on some other PHP 4 and PHP 5
servers.

Is there any workaround?
Disregard. I'm really stupid. It seems that register globals was left
enabled on this server and the variables in the session were
overwritten by the variables in the script. Why would anyone be so lazy
to use register globals is beyond me....

Sep 14 '06 #2

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

Similar topics

11
by: Francisco Mendez | last post by:
I get the following message when trying to run my script: "Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/newcustomer.php:23) in...
13
by: Dave Smithz | last post by:
Hi there, I have a php script that does some form input validation. As it verifies each field if the field has incorrect data, it appends an error message to an $error array. E.g. if...
6
by: bissatch | last post by:
Hi, I am trying to use the following function: header("Location: http://www.mysite.co.uk/home/update/index.php"); ....but getting the following error: Warning: Cannot modify header...
5
by: Duderino82 | last post by:
I'm working on a very simple peace of php where basically there is a form and 3 buttoms. One refreshed the page, one posts the form, and another one (since this form contains values of a record)...
3
by: thomasg | last post by:
Hi, I am moving some scripts from a UNIX box to a Windows box. A data entry form calls a PHP script the updates the records from the form. After the script completes, The script redirects to...
2
by: hagenaer | last post by:
Hello, I'm building a simple shopping cart to work with PayPal. I'd like to have the user post his basket to my page, validate the input, then redirect him _with his validated form data_ to...
4
by: andre rodier | last post by:
Hello, I need to display or propose a jpeg image on a web page. When I need to display the image, I use this code : header("Content-Length: $fileSize") ; header("Content-Type: $type") ;...
6
by: webgenius | last post by:
I'm designing a small site and I have this structure in mind: index.php --------------- login fields. User enters login info. LoginCheck.php is called. LoginCheck.php -----------------------...
5
bilibytes
by: bilibytes | last post by:
hi, i am making a website with php OOP. i have a class called session: it has the attribues -logged_in; -user_name; -user_ip; -user_level;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
jinu1996
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...
0
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...

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.