Click here to Skip to main content
15,887,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

when I tried to execute a command using exec() function to call 'mysqldump'from php I got:

'mysqldump' is not recognized as an internal or external command,
operable program or batch file.

but when I run the same command directly from CMD its working fine.

I am using php Laravel framework



would you please help me with some advice?

Best regards

What I have tried:

I checked system environment and everything is ok,
Posted
Comments
Somar Rateeb 15-Jun-21 15:09pm    
I added
'dump' => [
'dump_binary_path' => 'C:\Program Files (x86)\Plesk\MySQL\bin', // only the path, so without `mysqldump` or `pg_dump`
'use_single_transaction',
'timeout' => 60 * 5, // 5 minute timeout
],

to database.php but the same issue
Wendelius 15-Jun-21 15:14pm    
Is the mysqldump utility installed on the same computer where you're running php?
Richard MacCutchan 16-Jun-21 5:59am    
You must provide the full path to the program in your exec call.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900