Gianni
|
| Posted: 04/29/2002, 6:26 AM |
|
Hi,
I have a problem when trying to log with a form prepared with CodeCharge.
The login form appear correctly but after entering username and password,
the server keeps presenting me the login form, as if I mistyped something or
userlevel is unsufficient.
I checked many times username, passwords and levels but it seems a problem
with session handling.
On the server session files are saved correctly (in c:/php/essiondata) and it
looks like the server doesn't read them when loading the next page after login.
Can someone help please me get out of this? I really don't know what to do anymore.
Server: Windows NT4 SP6
WebServer: OReilly Website 3
Language: PHP 4.2.0
DBMS: MySQL 3.23
Thank you
|
|
|
 |
Nicole
|
| Posted: 04/29/2002, 7:19 AM |
|
1) Please make sure that cookie are turned on
2) Could be a time synchronization issue when cookie expires because server
has wrong time.
|
|
|
 |
Jon Westfall
|
| Posted: 04/29/2002, 7:38 AM |
|
Make sure that your didn't use any reserved names as the column names in your database. I had used 'password' but it caused the problem you've described, so i renamed it to 'pass' and it works fine. Their is an article in support.codecharge.com about this as well.
|
|
|
 |
Gianni
|
| Posted: 04/29/2002, 10:38 PM |
|
Thank you Nicole,
cookies are turned on and server time is correct.
I suppose this might be a PHP bug on Windows platform, because I transferred
all the project on a Linux server with Apache (without any modification!) and it works perfectly.
For the moment I'll leave it on the Linux box.
Thanks anyway.
|
|
|
 |
Gianni
|
| Posted: 04/29/2002, 10:42 PM |
|
Jon,
reserved word for PHP?
|
|
|
 |
jjtoubia
|
| Posted: 04/29/2002, 11:30 PM |
|
NOTE TO ALL PHP DEVELOPERS: If you want your current programs to continue working, do not upgrade your installation of PHP. If you are on a hosting provider and they upgrade anytime soon...you are going to experience a world of problems.
Your host (or your server) is using the new PHP 4.2.0 build. There has been major modifications to this version that alot of PHP developers will run into. This will also be a change that CodeCharge needs to take heed to as the generated code will not work anymore with the 4.2.0 build. The reason for this is because external variables (from the environment, the HTTP request, cookies or the web server) are no longer registered as global variables. This means that you can no longer access variables posted to the PHP script by just using the variable name ($variable) or the HTTP method ($HTTP_POST_VARS['variable']). This is the same for cookies and sessions.
I believe this is the new method for accessing variables, I will double check and post tommorow
Example using a variable named $variable
Posted variables: $_POST['variable']
Get variables: $_GET["varaible']
Cookies: $_COOKIE['variable']
Sessions: $_SESSION['variable']
Files: $_FILE['variable'] & others apply to this
There are more and I will post them as soon as I am updated on them all.
Everybody let CodeCharge know so we can continue to use CodeCharge after the new PHP release.
|
|
|
 |
jjtoubia
|
| Posted: 04/30/2002, 12:21 AM |
|
Well I think I may have spoken too soon. I have numerous scripts that I have distributed around and when a fellow PHP developer told me about the changes...I paniced. After posting these messages I was thinking about it and thought to myself that why would PHP do something so stupid. Well they are not stupid...only me. I went to php.net to research this alittle more for myself and found out that these variables are still available if set. THANK GOD! I wish I could delete this post but I dont think I can. If nothing else, atleast you all know the new changes...
Forgive me!
|
|
|
 |