I'm interested in (only) logging to a mysql database.
So a web application can detect new incoming files from which the transfer is completed, like the proftpd xferlog.
I made some changes to /usr/local/directadmin/custombuild/configure/proftpd/configure.proftpd
added:
--with-modules=mod_ratio:mod_readme:mod_tls:mod_sql:mod_sql_mysql
--with-includes=/usr/local/include/mysql
--with-libraries=/usr/local/lib/mysql
After compiling "proftpd -l" outputs:
Compiled-in modules:
- mod_sql.c
- mod_sql_mysql.c
- etc...
So sql should be working?
Added to proftpd.conf:
SQLLogFile /var/log/proftpd/debug
SQLConnectInfo database@localhost user password
SQLLog RETR,STOR incoming
SQLNamedQuery incoming FREEFORM "INSERT INTO test(test) VALUES ('foo')"
Restarting proftpd outputs no errors.
Tested the query through phpmyadmin with the same user/password, is working well.
But after uploading some files the database remains empty. Also the sql debug log remains empty.
The proftpd xferlog shows the upload, something like:
Mon Jun 22 12:42:59 2009 0 x.x.x.x 14172 /usr/home/user/test.rtf b _ i r user ftp 0 * c
I'm using the right config file, also tested it with the -c option.
Anyone?