backup: System program "mysqldump" not found in $PATH. Please check with your sysadmin for further assistance.
he_who_shall_no... - June 19, 2007 - 12:45
| Project: | backup |
| Version: | 5.x-4.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | dmuth |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
My ISP told me that they have those programs installed.
So, I ran the commands from Devel's php block. Everything worked fine.
echo system('mysqldump --help');mysqldump Ver 10.9 Distrib 4.1.21, for pc-linux-gnu (i686)
By Igor Romanenko, Monty, Jani & Sinisa
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
Default options are read from the following files in the given order:
/etc/my.cnf /var/lib/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqldump client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
...............echo system('tar --help');GNU `tar' saves many files together into a single tape or disk archive, and
can restore individual files from the archive.
Usage: tar [OPTION]... [FILE]...
Examples:
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
......................and finally
echo system('gzip --help');gzip 1.3.3
(2002-03-08)
usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
-c --stdout write on standard output, keep original files unchanged
-d --decompress decompress
-f --force force overwrite of output file and compress links
.............................the path is:
/sbin: /usr/sbin: /bin: /usr/bin: /usr/X11R6/binthe errors:
* mysqldump program NOT found or executable
* tar program NOT found or executable
* gzip program NOT found or executable
#1
Can you try running:
echo system('which mysqldump');
and tell me what you get?
Thanks,
-- Doug
#2
/usr/bin/mysqldump/usr/bin/mysqldump
#3
If
drupal_set_message($file2 . ' = ' . is_file($file2));is called from backup_search_path($file) after the
$file2 = $value . '/' . $file;line then
* /sbin/mysqldump false* /usr/sbin/mysqldump false
* /bin/mysqldump false
* /usr/bin/mysqldump false
* /usr/X11R6/bin/mysqldump false
* /sbin/tar false
* /usr/sbin/tar false
* /bin/tar false
* /usr/bin/tar false
* /usr/X11R6/bin/tar false
* /sbin/gzip false
* /usr/sbin/gzip false
* /bin/gzip false
* /usr/bin/gzip false
* /usr/X11R6/bin/gzip false
is displayed.
the ls for mysqldump is:
echo system('ls -l /usr/bin/mysqldump');-rwxr-xr-x 1 root root 1213268 Aug 5 2006 /usr/bin/mysqldump#4
correction. The command was:
drupal_set_message($file2 . ' ' . var_export(is_file($file2), true));#5
got it:
echo print_r(stat('/usr/bin/mysqldump'), true);returns
warning: stat(): open_basedir restriction in effect. File(/usr/bin/mysqldump) is not within the allowed path(s): (/home/vrencian:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/vrencian/public_html/project/modules/contrib/devel/devel.module(657) : eval()'d code on line 1.It seams that, for security reasons, the isp restricted the 'open_basedir'. A lot of ISPs does that.
Probably you must modify or skip this test.
Thanks.
#6
Hi,
I haven't had my morning coffee yet, so let me see if I understand the situation on your end:
- You can successfully execute the "mysqldump" program from within PHP/drupal
- However, trying to access the file via stat() fails, because the directory mysqldump resides in is not in the php_basedir parameter.
Is this accurate? Did I miss anything?
Thanks,
-- Doug
#7
Exactly. This is what is happen.
#8
I'm getting the same behavior with a php4.x server. In my case I'm my own ISP, due to renting my own server. The config is managed by the plesk admin console, and I just traced in the config files a setting of open_basedir to be "DOCROOT:/tmp". There's no parameter named php_basedir.
#9
So, is there a fix or workaround for this, or what? :)
#10
I'm getting this on WinXP and 5.x-4. I have verified that mysqldump.exe is present and in the system path.
#11
Hi, I am running a Plesk server. Can someone state clearly a step-by-step list of instructions to get this running? Where exactly are you logging into run these commands. And please confirm that once you had finished that you were able to get the back ups to work.
Thanks.
#12
I am experiencing the same thing. Although it reports that the executables cannot be found, I can run mysqldump and all the other required programs through PHP and Drupal. In order to make the backup successfully through bypassing this, I commented out
$error = truein backup.module.#13
Hi, in my site, drupal and mysql are on different servers.
Is there a solution in that case?
If I find the mysqldump program, can I store it on the drupal server (e.g. at the root of drupal)
and configure the backup module to use it?
Where can I find the mysqldump program and the other two programs that are reported as missing?
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Programs that will be used:
mysqldump program NOT found or executable
tar program NOT found or executable
gzip program NOT found or executable
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Thank you for any help,
Michael
http://www.24Hsoftware.com
#14
What ever happen to the simple backup all my stuff and download it into a neat little directory within 20 seconds, wordpress plugins do this with the greatest of ease along with other cms setups, how hard can it be ? This mod is way too complicated. I'll manually back up myself until an easier one comes along. Think CMS fast easy and simple :))
#15
Two words: edge cases
I'd *love* to see how Wordpress does it. Can you link me?
#16
I suspect this goes along with my preference to only back up the database most of the time.
#17
I"d say in most cases just backing up the database is all you need, I'm surprised phpmyadmin doesn't have this built in to schedule backups, the files you can retrive anytime.
modxcms has a plugin that backs up not only the database but all the directory files in a neat little bundle and does it within 10-20 seconds, wordpress also has plugins that do something similar in a very short time. None of these entail any complicated mysqldump terminology nor did they require the entire site directory to be chomd to 777 just to get it working
What does "edge cases" mean ? I'm unfamiliar with that term
I checked out the backup_migrate mod and it does the job nicely.
#18
"edge cases" means those things which happen a very small amount of the time, but will cause stuff to totally break.
An example of an edge case is not being able to find the mysqldump program. I had to write code to deal with that after problems were reported.
An additional difficulty I have is in reproducing some of the issues. There are SO many differently configured systems out there, and I cannot reproduce them all.
The reason why I don't back up just the database is that all of the Drupal sites I host are more than just data--they're also file downloads, stylesheets, etc. I *could* download them separately, but that would be an extra step. I first wrote this module with the intention of being able to back up the entire site in a single step.
Hope that answers folks' questions.
-- Doug
#19
I'm having the same problem as NancyW. I'm on WinXP, using Drupal 5.7, and I get the error that mysqldump doesn't exist in $PATH, even though it does exist in the path.