|
Posted by Els on 03/07/07 23:19
Rik wrote:
> Els <els.aNOSPAM@tiscali.nl> wrote:
>
>> Rik wrote:
>>
>>> Change:
>>>>>>> if($row['passwd']==$_SERVER['PHP_PW']) $verified = true;
>>> To:
>>> if($row['passwd']==md5($_SERVER['PHP_PW'])) $verified = true;
>>
>> Still won't work.
>> It's most likely something I'm doing wrong, like where in the script I
>> place the lot, but I can't figure out what it is.
>> Thanks for your help anyway, I'll keep the code so I may use it if I
>> need to do the same thing some time outside Joomla.
>
> If it doesn't work:
>
> 1. Enable error_reporting if it isn't on already
> (ini_set('display_errors',true);error_reporting(E_ALL);
>
> 2. var_dump() the variables you are using in strategic places, to check
> wether they contain what you think they should. For instance, right before
> the above line you could use
> var_dump($row['passwd'],$_SERVER['PHP_PW'],md5($_SERVER['PHP_PW']));
I have no idea where I can put those two lines, as any place I tried
so far gives me an unexpected ';' for the display_errors line.
I then used the var_dump line by itself, but of course, if I put it in
the 'not verified' part, it will display only if I press Cancel. The
output then gives NULL NULL string(32) "[my md5 password strong]", but
I think that doesn't mean much, because of the Cancel button.
> Keep in mind that for headers to work, they have to be sent before any
> other output.
That was my first thought too, but since it is not a clean cut one
page php script, there is no place I can pinpoint as 'before any other
output'.
> Seems to go OK if you get a prompt for a username & password
> though.
Yes, but that's all I get...
For now, I'll have to dismiss this mission as too complicated for me.
Thanks again for your help, but I'll have to find different ways to go
about what I need to accomplish.
> On a side note: you do know I made the table- and fieldnames up, as I have
> no idea how they're called in Joomla?
Yes :-)
--
Els http://locusmeus.com/
Now playing: Live - [Untitled]
Navigation:
[Reply to this message]
|