Re: [phplib-users] phplib and bookmarker - some progress...
Brought to you by:
nhruby,
richardarcher
From: A. F. C. <af...@sh...> - 2009-12-12 04:41:48
|
On Tue, Dec 08, 2009 at 09:44:19PM -0600, Lindsay Haisley wrote: > On Tue, 2009-12-08 at 22:09 -0500, A. F. Cano wrote: > > Phplib hasn't been updated in a long time, is it also > > dead? First, thanks for replying and the info below. It's taken a while to digest and learn some of this stuff... > It's kinda dead, having been upstaged by PEAR, but a lot of us still Mmm... So I installed PEAR and read quite a bit of the docs, but the class names don't have a 1 to 1 relationship with the phplib classes. As I was looking at something simpler than a rewrite, like replacing class names with the newer ones from PEAR, this option got pushed to the back burner. > have installed code which depends on PHPlib. I've been migrating some > of this code to PEAR <http://pear.php.net/> routines and class by > writing libraries which mimic the PHPlib API but rely on PEAR for their > functionality. See <http://www.fmp.com/fmp/fmp_include/>. All the I downloaded these right away and as they were closer to what bookmarker depended on, it was easier to replace class names, but then I got into other problems, like functions that don't exist in the fmp_include files, so it was back to square 1. > ... > Check out Krumo at <http://sourceforge.net/projects/krumo/>. You'll > find it a big help. I still find, though, that using print or echo > calls sprinkled throughout a PHP script has its place :-) This was good. I installed it and it's been helping debug the problem, in combination with print statements. I ended up installing the latest version of phplib where bookmarker expects it, but I'm having the same problem as with the old version. The login screen never lets me through. With some print statements I've found that the global variables in the php code $username and $password are not set. The values are entered with some javascript code in a template form. Looking around I've found this: http://www.irt.org/script/1065.htm but in this case the kludgy fix does nothing. At the end of the javascript code there is document.login.submit() but I haven't found this function yet. This is the javascript code: <script type="text/javascript"> <!-- start Javascript function doChallengeResponse() { str = document.login.username.value + ":" + MD5(document.login.password.value) + ":" + document.login.challenge.value; document.login.response.value = MD5(str); document.login.password.value = ""; //document.write(str); //document.write(MD5(document.login.password.value)); //document.write(document.login.response.value); document.login.submit(); } // end Javascript --> </script> The commented write statements return what is expected, so the problem is between document.login.submit() and the php global variables. Since this used to work in the days of php3, I wonder if something has changed that deals with the transmission of the variables between javascript and php at the server. Any other ideas out there? Thanks again for replying. Making some slow progress... Augustine |