![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Linux Support Linux - Operating Systems and Applications Support |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2008
Posts: 2
OS: xp
|
PureFTP problem with MySQL
I have been running Pure-FTP for years using a network database server for authentication. The configurations of both have not changed, but I had to rebuild the FTP server.
The FTP Authentication is failing with a "Wrong sql parameters" warning. The query is correct, it is being sent to the database server, and the result is correct. The problem seems to be in the Pure-ftp code. The failure is on the mysql_real_query routine and appears to be caused by a mismatch in the query length. Has anyone encountered this problem, and is there a work around? I am running Mandriva linux (have tried both 2006.0 and 2007.0) as the os for pureftp. MySQL version 5.0.19 is running on another platform under Mandriva 2006.0. The database server is working flawlessly for several other machines, and I assume it is returning correct results for PureFTP. There are no errors in the mysqld log. The tables are InnoDB and transactions are enabled. In case there was something creeping in, I replaced the PureFTP configuration files with a backup copy (Known to be working), and it still did not work. There is a perl script (Log analyzer) running on the same server which is working correctly with the database server, so it is not a communication problem between the boxes. The internal network used for database communications is not firewalled. Help Last edited by Triskelion_ca : 05-04-2008 at 08:39 PM. |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Oct 2007
Location: Littleton, Colorado USA
Posts: 436
OS: xp 64 sp2 Fedora Core 8 (vmware xp core 8 x32) Minix
|
Re: PureFTP problem with MySQL
Could there be some kind of encryption that is now on by default? The SQL server is expecting an in the clear (not-encrypted) UserID and password, but the new Pureftp is encrypting the session. I do know that some forms of TCP/IP encryption protocols are not one letter encrypted produce one character of output. More characters will be output than were input (or visa-versa). The data part of the ftp session would send the wrong number of characters because it is encrypted.
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: May 2008
Posts: 2
OS: xp
|
Re: PureFTP problem with MySQL
Which session is the new pureftp encrypting? The one with the FTP client or the one with the database server?
I have tried both WS-FTP and command line as a client. The login is getting to the ftp server daemon and the database server is receiving the correct query for the password. I have taken the query out of the mysqld log and pasted it into the server command line and it returns the correct result, with no error reported by MySQL. I have verbose logging on for both the pureftp daemon and the mysql daemon. Nothing appears in the logs that would give me a clue where to look. I simply get pureftp telling me that the authentication failed and that damn default message "Wrong sql parameters'. As you may have guessed, I have looked into the pureftp source, and the message is kicked out as a result of the return value of mysql_real_query( handle, query, strnlen(query)). If the length of the query string is calculated as part of the call, how can there be an error, unless there is a string termination that is being treated differently by the two systems. I am at a loss here, and I have to wonder if I can't see the answer because I am too deep in the problem. |
|
|
|
![]() |
| Thread Tools | |
|
|