Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Upgrade to 6.01.12 problem

Asked Modified Viewed 8,807 times
B
borisp71
B
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
asked
Junior Member

Hi,
I just upgrade to 6.01.12 my site. When I try from Admin panel to backup database , but it is impossible. When I click on backup (put some pass) site react but just do like reload and I can not save nether sql nether gz.
Where is problem
0 replies

29 posts

T
T-N-Z
T
T-N-Z 10
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 10 threads in the forums
answered
Member

same problem i have
0 replies
B
BBK
B
BBK 10
{{{
var yo= 'BBK!'
window.alert(yo)
}}}
  • Member, joined since
  • Contributed 105 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

same here :(
0 replies
T
T-N-Z
T
T-N-Z 10
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 10 threads in the forums
answered
Member

well now we need to wait for v6.01.13 :D :D:D
0 replies
I
idea4IT
I
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
answered
Junior Member

same too
there is a problem with the administration/db_backup.php!
use the one I added to the thread.
I updated it on my own and it works in the way it should.


The changes are highlighted:
<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Database Backup developed by CrappoMan
| email: simonpatterson@dsl.pipex.com
+----------------------------------------------------*/
require_once "../maincore.php";

if (!checkrights("DB") || !defined("iAUTH") || $aid != iAUTH) fallback("../index.php");

if(isset($_POST['btn_create_backup'])){
   $user_password = [color=#ff0000]md5([/color]md5($_POST['user_password'])[color=#ff0000])[/color];
   if ($user_password != $userdata['user_password']) fallback(FUSION_SELF.$aidlink);
   $db_tables = $_POST['db_tables'];
   if(count($db_tables)>0){
      $crlf = "\n";
      ob_start();
      @ob_implicit_flush(0);
      echo "#----------------------------------------------------------".$crlf;
      echo "# PHPFusion SQL Data Dump".$crlf;
      echo "# Database Name: $db_name".$crlf;
      echo "# Table Prefix: ".$db_prefix."".$crlf;
      echo "# Date: ".date("d/m/Y H:i")."".$crlf;
      echo "#----------------------------------------------------------".$crlf;
      dbquery('SET SQL_QUOTE_SHOW_CREATE=1');
      foreach($db_tables as $table){
         @set_time_limit(1200);
         dbquery("OPTIMIZE TABLE $table");
         echo $crlf."#".$crlf."# Structure for Table ".$table."".$crlf."#".$crlf;
         echo "DROP TABLE IF EXISTS $table;$crlf";
         $row=dbarraynum(dbquery("SHOW CREATE TABLE $table"));
         echo $row[1].";".$crlf;
         $result=dbquery("SELECT * FROM $table");
         if($result&&dbrows($result)){
            echo $crlf."#".$crlf."# Table Data for ".$table."".$crlf."#".$crlf;
            $column_list="";
            $num_fields=mysql_num_fields($result);
            for($i=0;$i<$num_fields;$i++){
               $column_list.=(($column_list!="")?", ":"")."".mysql_field_name($result,$i)."";
            }
         }
         while($row=dbarraynum($result)){
            $dump="INSERT INTO $table ($column_list) VALUES (";
            for($i=0;$i<$num_fields;$i++){
               $dump.=($i>0)?", ":"";
               if(!isset($row[$i])){
                  $dump.="NULL";
               }elseif($row[$i]=="0"||$row[$i]!=""){
                  $type=mysql_field_type($result,$i);
                  if($type=="tinyint"||$type=="smallint"||$type=="mediumint"||$type=="int"||$type=="bigint"||$type=="timestamp"){
                     $dump.=$row[$i];
                  }else{
                     $search_array=array('\\','\'',"\x00","\x0a","\x0d","\x1a");
                     $replace_array=array('\\\\','\\\'','\0','\n','\r','\Z');
                     $row[$i]=str_replace($search_array,$replace_array,$row[$i]);
                     $dump.="'$row[$i]'";
                  }
               }else{
               $dump.="''";
               }
            }
            $dump.=');';
            echo $dump.$crlf;
         }
      }
      $contents = ob_get_contents();
      ob_end_clean();
      $file = stripinput($_POST['backup_filename']).".sql";
      require_once INCLUDES."class.httpdownload.php";
      $dl = new httpdownload;
      $dl->use_resume = false;
      if ($_POST['backup_type'] == ".gz") {
         $dl->set_mime("application/x-gzip gz tgz");
         $dl->set_bydata(gzencode($contents,9));
         $dl->set_filename($file.".gz");
      } else {
         $dl->set_mime("text/plain");
         $dl->set_bydata($contents);
         $dl->set_filename($file);
      }
      $dl->download();
      exit;
   }
   fallback(FUSION_SELF.$aidlink);
}

require_once BASEDIR."subheader.php";
require_once ADMIN."navigation.php";
include LOCALE.LOCALESET."admin/db-backup.php";

if (!isset($action)) $action = "";

if (!isset($_POST['btn_do_restore']) && $action != "restore") {
   $backup_files = makefilelist(ADMIN."db_backups/", ".|..|index.php", true);
   if (is_array($backup_files) && count($backup_files) > 0) {
      for ($i=0;$i < count($backup_files);$i++) {
         @unlink(ADMIN."db_backups/".$backup_files[$i]);
      }
   }
}

if (isset($_POST['btn_cancel'])) {
   @unlink(ADMIN."db_backups/".$_POST['file']);
   redirect(FUSION_SELF.$aidlink);
}

if (isset($_POST['btn_do_restore'])) {
   $user_password = [color=#ff0000]md5([/color]md5($_POST['user_password'])[color=#ff0000])[/color];
   if ($user_password != $userdata['user_password']) {
      fallback(FUSION_SELF.$aidlink);
   }
...



Hey digi, please update the update packages!

Best regards
Fabio Niephaus
Edited by idea4IT on 17-10-2007 18:12,
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

Hmm the file db_backup.php is not in the upgrade.

Why should it be that file that does the error??

Btw. I have the same problem too.
Edited by smokeman on 17-10-2007 17:52,
0 replies
I
idea4IT
I
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
answered
Junior Member

the file db_backup.php is the file for the backup function of the admin panel. Just open the backup function and see the url.
Digi forgots to update the double md5's in this file. I just added them!

please tell me, if it doesn't work!

Fabio
Edited by idea4IT on 17-10-2007 17:57,
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

I have now tested - and it works fine!

Thumbs up to you,
Fabio!!
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Yup, that works. GJ.

Add:

if(isset($_POST['btn_create_backup'])){
   $user_password = md5[b](md5[/b]($_POST['user_password'])[b])[/b];


and

if (isset($_POST['btn_do_restore'])) {
   $user_password = md5[b](md5[/b]($_POST['user_password'])[b])[/b];
   if ($user_password != $userdata['user_password']) {


to make your backup work with double hasehed MD5's.
0 replies
I
idea4IT
I
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
answered
Junior Member

yes sveinungs,
while your are posting your reply I edited my first one and added the information about how to change and update this file
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Good job :D
0 replies
T
T-N-Z
T
T-N-Z 10
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 10 threads in the forums
answered
Member

@idea2web , thanks it's works
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Absolutely my mistake, sorry folks.
0 replies
S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
answered
Member

digi

please read the comments to the update news. there is a setuser.php problem i think.
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

I have a problem that new users cant login. It says: Wrong username or password.

The problem is only there if the activation via email is off.
When it is on - there is no problem?
0 replies
B
Basti
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

Digi, did you update the two packages?
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Yer
0 replies
S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
answered
Member

digi

is there any error with setuser.php
we cant login to our sites after the update ?
0 replies
T
T-N-Z
T
T-N-Z 10
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 10 threads in the forums
answered
Member

i can login to site after update,everything works good
0 replies
I
idea4IT
I
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
answered
Junior Member

I got this problem too, but I think you shoudl copy the login part from the new maincore.php in your own.
I mean this part:
if (isset($_POST['login'])) {
$user_pass = md5($_POST['user_pass']);
$user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($_POST['user_name']));
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name' AND (user_password='".md5($user_pass)."' OR user_password='$user_pass')");
if (dbrows($result) != 0) {
$data = dbarray($result);
if ($data['user_password'] == $user_pass) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_password='".md5($user_pass)."' WHERE user_id='".$data['user_id']."'");
}
$cookie_value = $data['user_id'].".".$user_pass;
if ($data['user_status'] == 0) {
$cookie_exp = isset($_POST['remember_me']) ? time() + 3600*24*30 : time() + 3600*3;
header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'");
setcookie("fusion_user", $cookie_value, $cookie_exp, "/", "", "0");
redirect(BASEDIR."setuser.php?user=".$data['user_name'], "script");
} elseif ($data['user_status'] == 1) {
redirect(BASEDIR."setuser.php?error=1", "script");
} elseif ($data['user_status'] == 2) {
redirect(BASEDIR."setuser.php?error=2", "script");
}
} else {
redirect(BASEDIR."setuser.php?error=3");
}
}


just search for "if(isset($_POST['login'])" in your maincore.php and overwrite the if-clause

Fabio
Edited by idea4IT on 17-10-2007 22:16,
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 29 posts
  • Votes 0 votes
  • Topic users 10 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet