Show Bid Request
PHP Sessions problem
Bid Request Id: 74075
|
|
|
Posted by: |
CBL (92 ratings)
(Software buyer rating 9.98)
|
Non-action Ratio: |
Very Good - 14.00%
|
Buyer Security Verifications: |
Excellent
|
Approved on: |
Jul 19, 2003 2:08:01 PM EDT
|
Bidding Closes: |
Jul 21, 2003 2:07:26 PM EDT
|
Viewed (by coders): |
184 times
|
Deadline: |
7/23/2003 7:58:23 PM (3 days after 7/20/2003 7:58:23 PM)
|
|
|
|
Description:
Since my ISP rebuilt PHP and turned Register Globals off, my Sessions are now broken.
According to the PHP site:
====
If you want your script to work regardless of register_globals, you need to use the $_SESSION array. All $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where register_globals is disabled.
====
So I changed it to:
=====page1.php====
<?
GLOBAL $_SESSION;
$_SESSION['myvar']="myvalue";
print $_SESSION['myvar'];
?>
<a href="page2.php">test</a>
====page2.php====
<?
GLOBAL $_SESSION;
print $_SESSION['myvar'];
?>
=================
It displays the value in Page 1, but not in Page 2. If I take GLOBAL out then it throws an error in Page 2.
Does anyone have a work around? (Other than passing via URL/Post, PHP plugin, or turning Register_Globals on!)
Deliverables: 1) Complete and fully-functional script.
Platform:
PHP (Latest version) (Linux)
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
|
$15 (USD)
|
Jul 20, 2003 7:45:43 AM EDT
|
10
(Excellent)
|
|
|
I can have a test page for you whenever you like, displayed on my webspace (where register_globals is off).
|
|
|
|
This bid was accepted by the buyer!
|
$4 (USD)
|
Jul 20, 2003 8:11:04 AM EDT
|
10
(Excellent)
|
|
|
I've placed a bid for $15 above. I feel too guilty (that's why I've put in a bid of 4 -can't be 0 or less than 4). If you choose me, all that I ask, providing I do the work how you want, is that you give me a good rating :)
Many thanks,
Chris
|
|
|
|
|
|