Tried to upgrade

Installation issues with WoWRoster

Re: Tried to upgrade

Postby shan_aya » Tue Oct 24, 2006 4:01 am

hi,
same thing to me...

update not.. blah blah ^^

.htaccess on root block all my site ( hoster = free.fr ) almost i have other htaccess file on other folder...

and

addons must have "certified" working on 1.7.1 or they works as is ?
shan_aya
WR.net Journeyman
WR.net Journeyman
 
Posts: 132
Joined: Fri Aug 11, 2006 12:58 pm

Tried to upgrade

Postby zanix » Tue Oct 24, 2006 7:29 am

Mikycol wrote:i cant turn off register_globals.

Any solutions??

I found a globals destroyer function in phpbb 3
I'll post the code in a following post



shan_aya wrote:addons must have "certified" working on 1.7.1 or they works as is ?

No, for the most part, existing addons should work ok

The certified thing is just addons that conform to a set of rules
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Tried to upgrade

Postby zanix » Tue Oct 24, 2006 7:37 am

Ok, I found a register_globals destroyer that phpBB3 uses

File upgrade.php

Before
Code: Select all
define('DIR_SEP',DIRECTORY_SEPARATOR); 


Insert
Code: Select all
// Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
    
deregister_globals();
}


/*
* Remove variables created by register_globals from the global scope
* Thanks to Matt Kavanagh
*/
function deregister_globals()
{
    
$not_unset = array(
        
'GLOBALS' => true,
        
'_GET' => true,
        
'_POST' => true,
        
'_COOKIE' => true,
        
'_REQUEST' => true,
        
'_SERVER' => true,
        
'_SESSION' => true,
        
'_ENV' => true,
        
'_FILES' => true,
    );

    
// Not only will array_merge and array_keys give a warning if
    // a parameter is not an array, array_merge will actually fail.
    // So we check if _SESSION has been initialised.
    
if (!isset($_SESSION) || !is_array($_SESSION))
    {
        
$_SESSION = array();
    }

    
// Merge all into one extremely huge array; unset
    // this later
    
$input array_merge(
        
array_keys($_GET),
        
array_keys($_POST),
        
array_keys($_COOKIE),
        
array_keys($_SERVER),
        
array_keys($_SESSION),
        
array_keys($_ENV),
        
array_keys($_FILES)
    );

    foreach (
$input as $varname)
    {
        if (isset(
$not_unset[$varname]))
        {
            
// Hacking attempt. No point in continuing.
            
exit;
        }

        unset(
$GLOBALS[$varname]);
    }

    unset(
$input);
Last edited by zanix on Tue Oct 24, 2006 7:43 am, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Tried to upgrade

Postby Dreadan » Tue Oct 24, 2006 7:45 am

Hey Zanix do we need to run the upgrade for 1.7 to 1.7.1? I'm getting the same error these guys are and I have registered globals turned off.

Never mind I changed the version in the database and it went.
Last edited by Dreadan on Tue Oct 24, 2006 8:02 am, edited 1 time in total.
Dreadan
WR.net Apprentice
WR.net Apprentice
 
Posts: 50
Joined: Tue Jul 04, 2006 7:42 pm

Tried to upgrade

Postby shan_aya » Wed Oct 25, 2006 12:18 pm

wow,
that's works for me ^^
good job Zanix,
thx
shan_aya
WR.net Journeyman
WR.net Journeyman
 
Posts: 132
Joined: Fri Aug 11, 2006 12:58 pm

Tried to upgrade

Postby Bajah » Thu Oct 26, 2006 8:19 pm

I get this:

Code: Select all
Upgrade Roster     
   
Looks like you've loaded a new version of Roster

Your Version: 1.7.0
New Version: 1.7.1


With an Upgrade button.

I hit Upgrade, I get the select which version you're upgrading from with a dropdown box (though I'd assume it knows this already from the previous screen). I leave it on 1.7.0 and hit Upgrade (again).

Then I get:

Code: Select all
Upgrade Error
 
You have already upgraded Roster
Or you have a newer version than this upgrader


I tried the earlier fix, changing the .htaccess file regarding the register globals. When I did that, it just completely stopped working and started giving me error 500s. I went to check my error log and this is what I see:

Code: Select all
[Thu Oct 26 10:13:25 2006] [alert] /home2/public_html/.htaccess: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration


I'm confused :(
Last edited by Bajah on Thu Oct 26, 2006 8:19 pm, edited 1 time in total.
<img src="http://sok.bajah.com/rosteraddons/siggen/sig.php?member=Bajah ">
User avatar
Bajah
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Mon Aug 14, 2006 7:08 pm

Tried to upgrade

Postby PleegWat » Thu Oct 26, 2006 9:25 pm

Do you have register globals on?
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Tried to upgrade

Postby Tyrax » Thu Oct 26, 2006 9:36 pm

zanix wrote:Ok, I found a register_globals destroyer that phpBB3 uses

File upgrade.php

Before
Code: Select all
define('DIR_SEP',DIRECTORY_SEPARATOR); 


Insert
Code: Select all
// Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
    
deregister_globals();
}


/*
* Remove variables created by register_globals from the global scope
* Thanks to Matt Kavanagh
*/
function deregister_globals()
{
    
$not_unset = array(
        
'GLOBALS' => true,
        
'_GET' => true,
        
'_POST' => true,
        
'_COOKIE' => true,
        
'_REQUEST' => true,
        
'_SERVER' => true,
        
'_SESSION' => true,
        
'_ENV' => true,
        
'_FILES' => true,
    );

    
// Not only will array_merge and array_keys give a warning if
    // a parameter is not an array, array_merge will actually fail.
    // So we check if _SESSION has been initialised.
    
if (!isset($_SESSION) || !is_array($_SESSION))
    {
        
$_SESSION = array();
    }

    
// Merge all into one extremely huge array; unset
    // this later
    
$input array_merge(
        
array_keys($_GET),
        
array_keys($_POST),
        
array_keys($_COOKIE),
        
array_keys($_SERVER),
        
array_keys($_SESSION),
        
array_keys($_ENV),
        
array_keys($_FILES)
    );

    foreach (
$input as $varname)
    {
        if (isset(
$not_unset[$varname]))
        {
            
// Hacking attempt. No point in continuing.
            
exit;
        }

        unset(
$GLOBALS[$varname]);
    }

    unset(
$input);


Worked for me. Thanks!
Tyrax
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Jul 28, 2006 7:51 am

Re: Tried to upgrade

Postby Bajah » Thu Oct 26, 2006 10:01 pm

PleegWat wrote:Do you have register globals on?

I don't know? ;)
I assumed since it wasn't working as stated above and having the same problem that they were.
<img src="http://sok.bajah.com/rosteraddons/siggen/sig.php?member=Bajah ">
User avatar
Bajah
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Mon Aug 14, 2006 7:08 pm

Tried to upgrade

Postby zanix » Fri Oct 27, 2006 2:20 am

Bajah -
Did you try my fix?
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Tried to upgrade

Postby Bajah » Fri Oct 27, 2006 7:15 pm

zanix wrote:Bajah -
Did you try my fix?

Yessir!
<img src="http://sok.bajah.com/rosteraddons/siggen/sig.php?member=Bajah ">
User avatar
Bajah
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Mon Aug 14, 2006 7:08 pm

Re: Tried to upgrade

Postby Remind » Sat Oct 28, 2006 2:44 pm

Hi Bajah,

I had the same problem than you and found the solution.

When i saw zanix fix i quickly copy/paste the code using notepad.

But when pasting, notepad does not format your code as it is formatted in html, so there are no breaking row.

So my code was on one line, and the first line is a comment so the register variables were not deregister.

Simply reformat your code in upgrade.php and it will work.

Thx Zanix ;)
Remind
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Sep 14, 2006 1:25 am

Re: Tried to upgrade

Postby bobling » Sat Nov 25, 2006 6:46 am

Remind wrote:Hi Bajah,

I had the same problem than you and found the solution.

When i saw zanix fix i quickly copy/paste the code using notepad.

But when pasting, notepad does not format your code as it is formatted in html, so there are no breaking row.

So my code was on one line, and the first line is a comment so the register variables were not deregister.

Simply reformat your code in upgrade.php and it will work.

Thx Zanix ;)


Thanks for that explanation I've just spent the last hour tearing my hair out :thumright:
User avatar
bobling
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Wed Aug 02, 2006 3:12 am

Previous

Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron