* joe <>:
> Thanks for the quick response, but i'm nu further. I made a shell script
> with the following lines:
>
> echo test1 > /opt/guide/www.secretaressebank.nl/HTML/dev/dbdump.txt
> mysqldump --user=username --password='password' dbname tablename >> file.txt
> echo test2 >> /opt/guide/www.secretaressebank.nl/HTML/dev/dbdump.txt
>
> When i exec this from the bash, it works just fine. But when i run it
> through a CGI-script, it 'forgets' to execute the second and most important
> line. Does it have anything to do with the rights? The CGI-script's rights
> are 755, the shell script's are 777.
It looks like the problem is that the CGI environment path is different
than your bash path -- which means it can't find where the mysqldump
executable is. In bash, type 'which mysqldump', and then copy the full
path it gives you to both your shell script and perl script -- I think
you'll find it works now.
The next thing to do if it doesn't work is to find out whether or not
the mysqldump executable has permissions that allow the CGI environment
to execute it. If it's permissions allow execution by the CGI
environment's user, group, or world permissions, than it should work; if
not, well, you're pretty much hosed.
--
Matthew Weier O'Phinney
http://weierophinney.net/matthew/