Re: mysqldump problem from PHP

From: Date: Tue, 24 Oct 2006 07:58:45 +0000
Subject: Re: mysqldump problem from PHP
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-243561@lists.php.net to get a copy of this message
Roman Neuhauser wrote:
# edward@labhut.com / 2006-10-23 16:34:16 +0100:
It appears that it could be because the user that runs the scripts is not allowed to. When I run them on the commandline, I run them as the root user.
    that's very simple to check (man su)
yes I know of CRONtabs but wont this still leave us with the user permission of running mysqldump? because essentially it will still be a PHP file to run the shell command to create the dump file?
    Are you concerned about what user it runs as or what language
    it's written in?
No, cron will typically run as root. You don't need to involve PHP.
    How are those two things connected at all in the first place?
It looks to me as if you are trying to use web scripting (PHP) to do the sysadmin on your server, for which other methods are more suitable.
    Those would be? What makes PHP unsuitable for non-web programming?
I think the point was php doesn't *need* to be used for everything - use the best tool for the job. mysqldump is provided on the system and doesn't need to be called through php - what's the point of doing it that way? I use php for non-web programming at times when I can't find something else to do what I want.. most of the time though there's a tool already out there somewhere that does exactly what I want already (for sys admin tasks). -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#243561) next »