Perhaps you need to install DBI mysql drivers or similar. The way to troubleshoot is to look at the asterisk FULL log for a line that says something like
Executing /usr/local/fop2/recording_fop2.pl blah blah blah
Where blah blah blha are the actual parameters of the command being executed. Copy the whole command, and then in the command line run that very same command, as the "asterisk" user if you run asterisk with any user other than root.
If there are errors, you will see them on the console.
My bet is that you have some missing perl modules, most probably perl DBI or DBI-mysql
Best regards,