|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
MySQL 5 - Can't mysqldump using system("") in php. Works in console.
Hi, I'm having a strange problem. I can backup my db from console using "mysqldump -uuser -ppassword db > /home/name/db/db.sql".
But if I try to run a .php script with system command it does nothing. PHP Code:
Any ideas? |
|
#2
|
|||
|
|||
|
any errors? maybe set error_reporting to E_ALL then run the script. see if anything shows up. you could also try other functions that do pretty much the same thing like exec() or shell_exec().
|
|
#3
|
|||
|
|||
|
I have error reporting set to E_ALL & ~E_NOTICE. I've tried both exec and shell_exec both returned empty page.
Edit: I've tried echoing $BuP and it returns correct values on everything and correct path for file write. Could it be something with permissions if I run this script from web browser? Edit 2: I've added a cronjob for the php file. It seems to be working through cron. Last edited by AnonG : August 27th, 2009 at 04:20 PM. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > MySQL 5 - Can't mysqldump using system("") in php. Works in console. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|