hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Web development help please, this is baffling the crap out of me
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Web development help please, this is baffling the crap out of me

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-04-2006, 07:26 PM
FirestormNetworks FirestormNetworks is offline
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Chicago
Posts: 68

Web development help please, this is baffling the crap out of me


ok, I have a site that's using a signup form for people to enter a bunch of information, then I'm storing it in session variables until the final submission, when I then insert it all into the database in 1 shot. The point of this is to keep from cluttering up the database with half-entered forms and whatnot.

What I've found, when using IE7 to do the signup form, for some odd reason that I haven't been able to determine, the session value "username" (e.g. $_SESSION['username']) keeps getting reset from what's posted from the form values to the string "iecssfix".

I have put echos into the pages to see what's in the session values, and what is being sent to the page through http post, and there's nothing in the post itself that would be doing this. I've also did a grep on the entire directory structure of the website's account, and that string does NOT appear in any file in the entire site.

Google has 0 hits for the string "iecssfix", so I'm struggling here. I've talked to 2 other developer friends, and neither of them can figure out where the hell it's coming from either.

This only happens with IE of course, but it has to be supported on this site, so I'm lost... has *anyone* ever seen this?

Thanks

Reply With Quote


Sponsored Links
  #2  
Old 12-04-2006, 09:51 PM
zwolf zwolf is offline
WHT Addict
 
Join Date: Nov 2006
Posts: 168
Hi, I did a quick search on Google, and it seems it may be a bug with ie7. Check out: http://www.google.com/search?num=30&...ariables&meta=

Damn m$ cr@py software.

Reply With Quote
  #3  
Old 12-05-2006, 02:04 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
I cannot replicate your problem on IE7 here. Please give a simple test case of what you are experiencing.

I tested it by creating a form, then submitting it via post to another PHP script, where I store the information in a session, then checking the session in a third script and I didn't see the bug you mention (I also stored it in 'username').

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
Sponsored Links
  #4  
Old 12-05-2006, 02:08 AM
FirestormNetworks FirestormNetworks is offline
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Chicago
Posts: 68
https://www.wetrainamerica.com/signup.php is the page that the problem exists on.

if you go through the steps (just put in bogus info if you want), after the second page you'll see the error. The top 2 arrays that are being echoed are session and post, top and bottom respectively

Reply With Quote
  #5  
Old 12-05-2006, 02:20 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
That doesn't help me much, unless you show me the code.

Edit:

Remove <style type="text/css">.imcm .imsubc{background-image:url(ie_css_fix);}</style> and try it again.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise


Last edited by Burhan; 12-05-2006 at 02:30 AM.
Reply With Quote
  #6  
Old 12-05-2006, 02:22 AM
zwolf zwolf is offline
WHT Addict
 
Join Date: Nov 2006
Posts: 168
Just wondering is the problem only with the variable "username"? If yes, have you tried to name it to say "username1" or something else?

Reply With Quote
  #7  
Old 12-05-2006, 02:25 AM
FirestormNetworks FirestormNetworks is offline
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Chicago
Posts: 68
Code:
foreach($_POST as $key => $value) {
        if(!empty($value)) {
            $_SESSION[$key] = $value;
        }else{
            $_SESSION[$key] = "none";
        }
}
That's what moves the data into the session variables. I should also mention that I've tried this with IE6, Firefox, and Opera and it doesn't happen.

Reply With Quote
  #8  
Old 12-05-2006, 02:27 AM
FirestormNetworks FirestormNetworks is offline
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Chicago
Posts: 68
Quote:
Originally Posted by zwolf
Just wondering is the problem only with the variable "username"? If yes, have you tried to name it to say "username1" or something else?
I haven't, but I would rather find the root cause of this, as I can't believe that MS would be so stupid as to intentionally rewrite that session value somehow. There are thousands of sites that use a session variable named "username".

Reply With Quote
  #9  
Old 12-05-2006, 02:40 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
Quote:
as I can't believe that MS would be so stupid as to intentionally rewrite that session value somehow.
You are quite right, as they are not.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
  #10  
Old 12-05-2006, 02:41 AM
zwolf zwolf is offline
WHT Addict
 
Join Date: Nov 2006
Posts: 168
Are you using IE7 Beta Version 1 by chance? I found a few sites discussing session problems with this version, that seems to have been fixed in more recent updates.

Reply With Quote
  #11  
Old 12-05-2006, 02:42 AM
FirestormNetworks FirestormNetworks is offline
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Chicago
Posts: 68
Quote:
Originally Posted by zwolf
Are you using IE7 Beta Version 1 by chance? I found a few sites discussing session problems with this version, that seems to have been fixed in more recent updates.
No, this is straight from windows update.

Reply With Quote
  #12  
Old 12-05-2006, 03:00 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
Your problem is not IE, its with your script as I am unable to reproduce the error here using IE 7.0.5730.11 (the latest from Windows update as of 04/12/2006).

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
  #13  
Old 12-05-2006, 03:06 AM
FirestormNetworks FirestormNetworks is offline
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Chicago
Posts: 68
I have to ask, did you submit the second step? The issue doesn't appear until the 3rd step of the page, so if you didn't go far enough, you wouldn't have seen it.

When it echos the session values upon submission of the first page, it's right, it's only after you submit the second page that it happens.

edit: that's the same version of IE7 I am using.

Reply With Quote
  #14  
Old 12-05-2006, 03:26 AM
zwolf zwolf is offline
WHT Addict
 
Join Date: Nov 2006
Posts: 168
It's strange because if it is simply a script error, wouldn't it reflect in IE6 and other browsers?

How about trying to save as another session variable name on the 2nd page , pass that variable to the third page, and then fill "username' on the third page with the other variable. Just a suggestion.

I am curious though if fyrestrtr has the same problem on the third page. I am using IE6.


Last edited by zwolf; 12-05-2006 at 03:30 AM.
Reply With Quote
  #15  
Old 12-05-2006, 03:41 AM
zacharooni zacharooni is online now
Community Guide
 
Join Date: Apr 2005
Posts: 1,277
Warning: Cannot modify header information - headers already sent by (output started at /home/wetrain/public_html/signup.php:29) in /home/wetrain/public_html/signup.php on line 48

__________________
Lead Systems Engineer @ PacificHost
Incredible. Amazing. Reliable. PacificHost.
Visit us at https://www.pacifichost.com/

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
PaaS Cloud DotCloud Partners with Web Development Language Opa Web Hosting News 2011-12-20 19:58:56
AMD Names Senior Vice President and Chief Technology Officer Web Hosting News 2011-10-19 17:23:35
Cloud Security Firm Alert Logic Names VP of Business Development Web Hosting News 2011-09-20 13:43:14
Web Host SoftLayer Offers Microsoft WebMatrix to Windows Server Customers Web Hosting News 2011-09-09 14:17:10
Digital Realty Trust Acquires Massive $4.34M Data Center Site in Melbourne Web Hosting News 2011-09-08 14:35:19


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?