View Full Version : [fixed] PHP 4.1.2 CGI / VB 2.2.7 Log-In / Log-out issues...
agustin
Sat 31st Aug '02, 11:39pm
I made the upgrade to my forums on Friday... Now no member nor admin can log in or log off of the forums...
I have already cleared cookies and trashed all Cache files...
Numerous browser testing results in the same issue with not letting me log-in or out.
-----------------------------
What is going on? I know I had this very problem during the 2.2.6 upgrade and I am stumped.
Steve Machol
Sun 1st Sep '02, 12:11am
What is happening when you try to login? Are you getting any errors?
If PHP is running as a CGI module, then you may need to make some changes to the PHP files and permissions for them to run. See this thread for details:
http://www.vbulletin.com/forum/showthread.php?s=&threadid=53952
agustin
Sun 1st Sep '02, 12:21am
No error messages occur.
Registered USERS and ADMINS input their USERNAME and PASSWORD, click LOGIN and are returned back to a blank USERNAME and PASSWORD field again.
....................
In the past I had to setup the php.ini file to allow register_globals to ON. I am at a loss.
Steve Machol
Sun 1st Sep '02, 12:25am
You upgraded from 2.2.6? Are you sure you uploaded the vB 2.2.7 files then ran the upgrade20.php script? The only way I can see something like this happen is if you failed to do these things.
agustin
Sun 1st Sep '02, 1:00am
If I log into the admin CP... I can enter the message boards successfully logged in using the link located at the top of the CP.
I can post and everything is fine for me.
NOW here is the exact problem:
A user cannot log in from the forum log in screen. When an attempt is made to log in, that user is bounced back to an empty login page, thus being trapped in an endless cycle of trying to login.
Again ALL Cookies are cleared... All CACHE files deleted.
I upgraded from 2.2.6 and I am running PHP 4.1.2 with NO php.ini alterations any longer.
Steve Machol
Sun 1st Sep '02, 2:37pm
Originally posted by smachol
Are you sure you uploaded the vB 2.2.7 files then ran the upgrade20.php script? The only way I can see something like this happen is if you failed to do these things.
agustin
Sun 1st Sep '02, 2:53pm
Yes the upgrade20.php was run. Followed the install instructions to the T. Can I get a better answer than quoting a previous response?
Steve Machol
Sun 1st Sep '02, 2:59pm
Originally posted by agustin
Can I get a better answer than quoting a previous response? Perhaps, but I thought it would be important to get the answers to my original questions first.
Upload the phpinfo.php file from the 'extras directory of the zip file to your forums directory. Then post the URL here.
agustin
Sun 1st Sep '02, 3:03pm
PHP INFO (http://www.agustin.net/phpinfo.php)
Steve Machol
Sun 1st Sep '02, 3:18pm
Thanks. Nothing unusual there. Are you sure that you are not supposed to modify your php files for CGI as in the post in my previous message? Regardless, fill out a support ticket at:
http://www.vbulletin.com/members/support_form.php
Be sure to include the login info to your Admin CP, FTP and phpMyAdmin.
Scott MacVicar
Mon 2nd Sep '02, 1:59pm
Sorted.
FYI,
This was a bug created in 2.2.7 due to the changing in coding in global.php to work out the current script in execution. As this site was running php as a CGI one of the script values was set to that instead of the actual file.
Fix:
Replace
if ($HTTP_SERVER_VARS['SCRIPT_NAME']) {
$currentscript = strtolower($HTTP_SERVER_VARS['SCRIPT_NAME']);
} else {
$currentscript = strtolower($HTTP_SERVER_VARS['PHP_SELF']);
}
with
if ($HTTP_SERVER_VARS['SCRIPT_NAME'] and substr( $HTTP_SERVER_VARS['SCRIPT_NAME'] , -strlen('.php') ) == '.php' ) {
$currentscript = strtolower($HTTP_SERVER_VARS['SCRIPT_NAME']);
} else {
$currentscript = strtolower($HTTP_SERVER_VARS['PHP_SELF']);
}
agustin
Tue 3rd Sep '02, 10:08am
You guys kick ass! Fast and Responsive. I was getting a little worried but you guys solved my forum problem and even gave an explanation to what was wrong. :)
:cool:
Tansau
Tue 3rd Sep '02, 5:29pm
FYI: The $currentscript bug fix posted above also fixed a very odd problem that I was having:
I have an installation set for Forums to not be viewable by unregistered visitors (Guests). When I upgraded to 2.2.7, no one could log in any longer. They would enter name and password, then simply be dumped back at the login screen.
If I changed settings to allow Guests to view the Forums, they could log-in/log-out with no problems at all.
Tested it on another install as well; took a guest-allowed forum and disabled guest viewing of forums, and no one could login any longer.
Tried the $currentscript fix, and that solved this problem.
FYI
agustin
Tue 3rd Sep '02, 8:08pm
Looks like a 2.2.8 patch needs to be released... :p
Paul
Wed 4th Sep '02, 2:11am
Is this problem only relevant to php as a CGI?
Scott MacVicar
Wed 4th Sep '02, 8:19am
yes it is.
John
Tue 10th Sep '02, 12:49pm
Official fix:
Replace
if ($HTTP_SERVER_VARS['SCRIPT_NAME']) {
$currentscript = strtolower($HTTP_SERVER_VARS['SCRIPT_NAME']);
} else {
$currentscript = strtolower($HTTP_SERVER_VARS['PHP_SELF']);
}
with
if ($HTTP_SERVER_VARS['SCRIPT_NAME'] and substr( $HTTP_SERVER_VARS['SCRIPT_NAME'] , -strlen('.php') ) == '.php' ) {
$currentscript = strtolower($HTTP_SERVER_VARS['SCRIPT_NAME']);
} else {
$currentscript = strtolower($HTTP_SERVER_VARS['PHP_SELF']);
}
Scotth
Tue 10th Sep '02, 8:21pm
Originally posted by John
Official fix:
Replace
In what module? Global.php?
Scott
Scott MacVicar
Tue 10th Sep '02, 8:29pm
global.php in the root folder, only affects people running php as a cgi.
Scotth
Tue 10th Sep '02, 8:35pm
Originally posted by PPN
global.php in the root folder, only affects people running php as a cgi.
Thanks for the ultra-quick reply, Scott!
Scott
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights