Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2005-11-23 16:45:52

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Mmm, after seeing this last posts, I have tried to do a backup with rss_admin_db_manager and I get the following error:

Warning: unlink(/home/elefante/public_html/cluster/files/1132763980-elefante_txp2.sql): No existe el fichero o el directorio in /home/elefante/public_html/cluster/textpattern/lib/txplib_misc.php(455) : eval()’d code on line 82
BACKUP FAILED. ERROR NO: 127

I’m with 4.0.2
It used to worki in 4.0.1

I have tested in various TXP installation (in same enviroment) and all have the same problem.
The “db_manager” tab seems to work as expected, but the function of “db_backup” tab doesnt work.

Last edited by maniqui (2005-11-23 17:03:48)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#86 2005-12-15 22:29:30

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Thanks for a great plugin! I would like for the backup functionality to also be available to my managing editors and content editors, so that they can make a database backup before making changes. I’ve already tried editing permissions in admin_config.php for tab.extensions, but it still doesn’t seem to allow managing editors and content editors to view the plugin’s db backup interface.

Is there some other change I need to make?

Offline

#87 2006-01-06 18:19:23

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

> maniqui wrote:

BACKUP FAILED. ERROR NO: 127

I get the same error, using 4.0.3

Offline

#88 2006-01-07 04:09:30

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Based on some previous research I think error code 127 means “program not found” meaning the path the mysql and/or mysqldump are incorrect but I haven’t tested this above 4.0.1 yet.

alannie – You’ll need to add a line of code to the plugin to do that. Just replace the first line of the plugin code with this:

<code>
if (@txpinterface == ‘admin’) { add_privs(‘rss_db_bk’,‘1,2,3’);
</code>

Offline

#89 2006-01-16 21:45:03

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

I recently upgraded to MySQL 4.1.16 and now am getting errors with the rss_admin_db_manager plugin (v4.0.2). I’m running Textpattern v4.0.3 When I try to back up my database, I get this:

BACKUP FAILED. ERROR NO: 2

Debug mode shows this (I’ve x’d out username and password):

/usr/local/mysql-standard-4.1.16-apple-darwin7.9.0-powerpc/bin/mysqldump -hlocalhost -uxxx -pxxx —add-drop-table urm > /Library/WebServer/Documents/_urm/files/1137447510-urm.sql

I’ve checked to make sure I’m using the correct mysql and mysqldump paths. The username and password are correct as well. All other database functionality in Textpattern seems to work fine, and phpMyAdmin works. Is there something else I need to check, or is it an issue with the plugin and MySQL 4.1.16?

Thanks,
Alicia

Offline

#90 2006-01-16 21:51:21

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

By the way, I am running PHP 4.3.11 on Apache 1.3.33 .

Offline

#91 2006-01-17 14:03:43

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

I would check to see if anything changed in the mysql syntax. If possible try running the command from a command line and you should get a better error message.

Offline

#92 2006-01-17 15:57:42

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Thanks for looking into this, wilshire. I ran the command from Terminal (OS X) and got this error message (username x’d out):

mysqldump: Got error: 1044: Access denied for user ‘xxx’@‘localhost’ to database ‘urm’ when using LOCK TABLES

I don’t know if this has anything to do with it, but the other day when I upgraded mysql on my other machine, I had authentication problems (couldn’t access database at all from TXP or phpMyAdmin), because MySQL 4.1 uses a new password hashing algorithm and I had set up the database password after upgrading. I resolved it by setting the password to use the old authentication protocol . I didn’t have to do that on this machine, however, because the database password was already in place before I upgraded, but could this issue be somehow affecting the plugin authentication? Database backups via rss_admin_db_manager don’t work on either machine.

Offline

#93 2006-01-17 18:24:05

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

There is an option for the plugin to turn off table locking. Did you try that?

Offline

#94 2006-01-17 20:36:33

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

I just now turned off table locking, and it appears to work. Thanks!

Offline

#95 2006-02-18 03:45:59

23:59:59
New Member
From: a clock near you
Registered: 2006-01-25
Posts: 6
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

I have two bug fixes for rss_admin_db_manager:

1) Password uses characters parsed by shell

I had the same problem reported by others here where the mysqldump command would fail because the password has characters that are parsed by the shell. Here’s the fix:

Change:
<notextile>
<pre> $mysql_hup = ‘ -h’.$DB->host.’ -u’.$DB->user.’ -p’.$DB->pass;
</pre>
</notextile>

To:
<notextile>
<pre> $mysql_hup = ‘ -h’.$DB->host.’ -u’.$DB->user.’ -p’.escapeshellcmd($DB->pass);
</pre>
</notextile>

2) Restore fails to create table

When restoring backup files, I was getting the error “FAILED TO RESTORE: 1”, and when running the command from shell mysql reported “ERROR 1064”. This occurred on both of the setups I use (local = mysql 3.23.58, isp = mysql 4.0.25).

The problem is that table txp_priv has column names that are numeric (1, 2, 3, etc). I have been able to fix this by having mysqldump enclose all table names in create table with “`” by using the “-Q” flag to “mysqldump”:

Change:
<notextile>
<pre> $backup_cmd = $rss_dbbk_dump.$mysql_hup.’ —add-drop-table ‘.$lock.$DB->db.’ | gzip > ‘.$backup_path; } else { $backup_cmd = $rss_dbbk_dump.$mysql_hup.’ —add-drop-table ‘.$lock .$DB->db.’ > ‘.$backup_path;
</pre>
</notextile>

To:
<notextile>
<pre> $backup_cmd = $rss_dbbk_dump.$mysql_hup.’ -Q —add-drop-table ‘.$lock.$DB->db.’ | gzip > ‘.$backup_path; } else { $backup_cmd = $rss_dbbk_dump.$mysql_hup.’ -Q —add-drop-table ‘.$lock .$DB->db.’ > ‘.$backup_path;
</pre>
</notextile>

After making this patch, any dumps made by the patched version will restore without error. For previous dumps, you will first need to manually edit the sql file and where the creation of the table txp_priv is performed, enclose the numeric column names with single backquotes (`) and they too will restore correctly.

I am a little surprised no one mentioned this yet. Either some installs of mysql/mysqldump are adding these quotes by default, or people are simply overlooking the missing table since all the other tables are restored.

Could these these fixes be included in the next release?

Thanks.

Offline

#96 2006-03-12 06:40:17

dquirk
Member
Registered: 2005-10-22
Posts: 12

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

I’m on Textdrive and I can’t seem to eliminate the error below—are there any Textdrive users who know how to eliminate this error when trying to do a database backup? What should the mysqldump and mysql paths be?

Warning: unlink(/users/home/dquirk/domains/oregoncleanwater.org/web/public/files/1142136201-oregoncleanwater.sql) [function.unlink]: No such file or directory in /users/home/dquirk/domains/oregoncleanwater.org/web/public/textpattern/lib/txplib_misc.php(459) : eval()’d code on line 82
BACKUP FAILED. ERROR NO: 127

Offline

Board footer

Powered by FluxBB