Posts Tagged ‘code’

Code is the foundation of all devices we use today. Whether it’s a smartphone, an HDTV or a simple wireless mouse, everything runs on code, code is the driving force behind our digital world. It powers hardware, and it powers websites. It powers simple features like clicking a key on your keyboard, and it powers advanced features like HD streaming video on Youtube.

PHP exec() and mysqldump – Error Code 3 and other errors

PHP exec() command is heavily used, but sometimes when using mysqldump and other commands the results can be confusing and difficult to debug.

Namely, when tables are crashed, exec()’s $retVal might end up as either 2 or 3, and the table may or may not show as Crashed when doing a “SHOW TABLE STATUS”. Try to do a mysqldump, and look at the very end of the file to check for an error. Alternatively, just attempt to REPAIR TABLE on the table after the last table it successfully backed up.

It is best to always treat any value in $retVal as an error.