Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#505 2008-03-03 15:09:11

kelsta
New Member
Registered: 2006-05-31
Posts: 7

Re: ign_password_protect

Hi, I’ve been having trouble getting the pligin to work properly in IE7. Using 0.5b4 it works OK in Firefox, but in IE the behaviour I get it I enter credentials into the login form, which get accepted and the form dissappears, but if I then navigate away from the page I am no longer logged in. It seems the cookie isn’t getting set.

I’ve had a little poke about and looking at the cookies that I’m getting in Firefox, it seems the domain is getting set to “.co.uk” for a site served from foo.ukdomain.co.uk. I’m guessing that IE doesn’t accept cookies for a whole TLD like this (and that might actaully be a good thing it’s doing better than Firefox for once). If I change the code in the plugin to set the cookie for only the full subdomain of the site it seems to work in both browsers.

Changed

$d = explode('.', $_SERVER['HTTP_HOST']);
$domain = '.'.join('.', array_slice($d, -2, 2));

to

$domain = $_SERVER['HTTP_HOST'];

What’s the motivation for the slicing up in the first place? Is it intended to allow the cookie to work across subdomains of a domain? Maybe this should be optional?

Offline

#506 2008-03-07 20:14:30

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: ign_password_protect

I successfully installed and tested this plugin on my own development server. When I copied the installation to the live server, however, I get those errors whenever I’m logged in on the public side:

A problem occured while loading the plugin: ign_password_protect -> 
Warning: Cannot modify header information - headers already sent by 
(output started at /path/to/site/index.php:10) on line 509
A problem occured while loading the plugin: ign_password_protect -> 
Warning: Cannot modify header information - headers already sent by 
(output started at /path/to/site/index.php:10) on line 511

I compared diagnostics on both setups and they are virtually identical except for the following:

Working setup:

MySQL: 5.0.45-log
Register globals: 1

Nonworking setup:

MySQL: 4.1.20-log

I already tried uncommenting php_value register_globals 0 in .htaccess, no effect. Any ideas??

P. S. This occurs with both 0.4.2d and 0.5b4. I’m running TXP 4.0.5.

Last edited by alannie (2008-03-07 20:16:32)

Offline

#507 2008-03-07 22:18:08

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

@kelsta – the domain is sliced up to address some other issues, but there’s a flaw in the currently shipping version that doesn’t handle multiple tlds (i.e. .co.uk, etc.). On the plus side, I do have a fix that addresses most cases (though there are some fringe cases where it won’t apply).

@alannie – Disabling the register_globals is a good plan regardless, but that wouldn’t affect the output. What other plugins are you running? Is there anything else that might be outputting headers?


And then my dog ate my badger, and the love was lost.

Offline

#508 2008-03-07 23:27:14

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: ign_password_protect

Found the problem, it was whitespace at the very top of index.php (where I’d previously inserted a php “site maintenance” notice). D’oh!

Thanks for the tip!

Offline

#509 2008-03-07 23:29:24

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

Glad you got it sorted. I’ve been bitten by that whitespace bug more than once myself, so you have my sympathy.


And then my dog ate my badger, and the love was lost.

Offline

#510 2008-03-13 20:20:36

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: ign_password_protect

Hi igner,

I have a 4.05 site which uses a modified version (by Manfre) of version 0.5b4. I would like to upgrade to 4.06, but first need to confirm that it will work properly.

The changes are, as per Manfre:

“forces an authentication attempt as long as the username field is not empty. The unmodified behavior was to do nothing, unless a username and password were provided.”

I can email you the the version as I have it, if that would help. Thanks for the wonderful plugin!

One request: Is it possible to be able to search for users – I have about 5-6 pages of users, and its hard to find someone.

Offline

#511 2008-03-13 20:28:02

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

Jonathan – email me the version you have, and I’ll take a look at incorporating Manfre’s changes.

As for searching for users…I’ll put it on the wish list…but make no promises as to when.


And then my dog ate my badger, and the love was lost.

Offline

#512 2008-03-13 20:33:40

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: ign_password_protect

Hi – that was quick :-) I emailed you the plugin using the forum contact email form. Let me know if you need anything else…and thanks!

Offline

#513 2008-03-13 20:40:49

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

Better to respond now than forget to respond at all. I glossed over the 4.06 question on my previous response, but the correct answer is that in limited testing, the current version works fine in 4.0.6, as should manfre’s modified version.


And then my dog ate my badger, and the love was lost.

Offline

#514 2008-03-14 06:46:52

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: ign_password_protect

Hi igner, Nice work for password protecting..
I would like to use this but I have question on it.

First of all my senario is like this..

public_html/textpattern
public_html/index.php
public_html/products(lists the product by search & this is of different database rather than txp database)

Now I would like to place login box on front end in textpattern and u-name and password is valid then redirect to folder called products e.g http://localhost/products/index.php

Is this thing possible using this plugin? if yes, would help me.

Thank you
Sheru

Offline

#515 2008-03-18 07:57:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: ign_password_protect

Hi igner, just a heads up. Using ign_self_edit I get the error Call to undefined function ign_self_edit_form() and looking through the code, there is indeed no such function but two instances of it being called in the function ign_update_self. Perhaps it’s a function that has since been renamed or incorporated into something else.

Any chance of a quick fix or a pointer to a fix (e.g. is that function now ign_self_edit without the form)?

Thank you!


TXP Builders – finely-crafted code, design and txp

Offline

#516 2008-03-18 08:37:22

tjnuckolls
Member
From: Los Angeles, CA
Registered: 2005-03-23
Posts: 23
Website

Re: ign_password_protect

The ability to pass a dynamic category attribute (secure client section/portal) is exactly the functionality I NEED. I know I’ve written posts of encouragement before, and even donated to the cause, but as it is becoming supremely important to my web sites, here’s my plea.

Mr. Dale – You’ve mentioned before that you’ve got this working on your client site. If you could take a few moments to describe how you create a category for each client and load content dynamically, you’d be doing a great service for the Textpattern community. I’d even be happy to drop you a little somethin’ for the effort.

Igner – I don’t think I’m overstating things at all when I say that you’re plugin could provide the most important functionality currently missing from Textpattern. I’ve got no fewer than a dozen web sites (my own, clients, and non-profit organizations) which are dying for password protected “client” sections. And while I don’t know how many donations you’ve received for plugin development, I’m would be happy to further my contribution if it would bring about active development.

The bummer regarding volunteering my services is that plugin development for Textpattern is simply beyond my coding capability. But with specific instructions/goals I might be able to do okay, so if there’s anything I can do to help, and better yet, if there are things that you could task the community to do, please let us know. And for that matter, if there’s anything I/we can help with that’s keeping you from coding the plugin, throw those tasks this way as well.

What I’m trying to say, is how appreciative I am that this plugin exists, and I hope beyond hope that you’ll have time fairly soon to continue it’s development. And don’t forget we’re here to help!

Offline

Board footer

Powered by FluxBB